From 66d52d8cd2271ad26b96b1a32c468adf9fec7637 Mon Sep 17 00:00:00 2001 From: yonatanzunger <30514250+yonatanzunger@users.noreply.github.com> Date: Wed, 18 Nov 2020 13:03:40 -0800 Subject: [PATCH] Update the melody96:zunger keymap (#10888) * Update the melody96/zunger layout to make typing Romance languages easier. Move the combining accents to fn + (keys used by Mac OS for that purpose), and move the fn key to be the one adjacent to the space bar, since one needs to type combinations of that a lot more than one needs to type Greek letters in normal use. (As determined by experiment) Also clean up the comments. Co-authored-by: Yonatan Zunger --- keyboards/melody96/keymaps/zunger/keymap.c | 143 ++++++++++++--------- 1 file changed, 79 insertions(+), 64 deletions(-) diff --git a/keyboards/melody96/keymaps/zunger/keymap.c b/keyboards/melody96/keymaps/zunger/keymap.c index bedb77a4b7..d396de6839 100644 --- a/keyboards/melody96/keymaps/zunger/keymap.c +++ b/keyboards/melody96/keymaps/zunger/keymap.c @@ -55,58 +55,17 @@ enum layers_keymap { // TODO: It would also be nice to be able to put the actual code points in here, rather than // numbers. +// Accent marks +#define CMB_GRV H(0300) +#define CMB_AGU H(0301) +#define CMB_DIA H(0308) +#define CMB_CIR H(0302) +#define CMB_MAC H(0304) +#define CMB_CED H(0327) +#define CMB_TIL H(0303) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* The diagram below shows five rows for each key: from top to bottom, the QWERTY layer, the - * GREEK layer, the SHIFTGREEK layer, the CADET layer, and the SHIFTCADET layer. (The single - * diagram is to make it easier to see what goes where with this many layers!) - * - * ,---------------------------------------------------------------------------- - * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY - * | ` | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ⁻ | ⁺ | ⁽ | ⁾ | | | | | GREEK - * | ` | ₁ | ₂ | ₃ | ₄ | ₅ | ₆ | ₇ | ₈ | ₉ | ₀ | ₋ | ₊ | ₍ | ₎ | | | | | SHIFTGREEK - * | ¬ | | | | | | | | | | | | | | | | | | | CADET - * | ∅ | | | | | | | | | | | | | | | | | | | SHIFTCADET - * |---------------------------------------------------------------------------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | - * | ` | ¡ | | £ | | | | | ° | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | - * | ` | ¿ | | € | | | | | | | | | ≁ | BKSPC |LCK| | ⊗ | | - * | | ̀ | ́ | ̂ | ̃ | ̈ | ̄ | | | | | | ± | BKSPC |LCK| | × | | [3] - * | | | | | | | | | | | | | ∓ | BKSPC |LCK| | | | - * |---------------------------------------------------------------------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | - * | | θ | ω | ε | ρ | τ | ψ | υ | ι | ο | π | | | | | | | | - * | | Θ | Ω | Ε | Ρ | Τ | Ψ | Υ | Ι | Ο | Π | | | | | | | | - * | | ∧ | ∨ | ∩ | ∪ | ⊂ | ⊃ | ∀ | ∞ | ∃ | ∂ | ∈ | | | * | * | * | | [1] - * | | ℚ | | | ℝ | ⊆ | ⊇ | | ℵ | ∄ | | ∉ | | | * | * | * | | - * |-----------------------------------------------------------------------| + | - * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | ⊕ | - * | CTRL | α | σ | δ | φ | γ | η | ϑ | κ | λ | ⋯ | ⋅ | RET | | | | | - * | CTRL | Α | Σ | Δ | Φ | Γ | Η | | Κ | Λ | … | ∴ | RET | | | | | - * | CTRL | ⟘ | ⊤ | ⊢ | ⊣ | ↑ | ↓ | ← | → | ↔ | | | RET | * | * | * | | [1] - * | CTRL | Å | | ∇ | | ⇑ | ⇓ | ⇐ | ⇒ | ⇔ | | | RET | * | * | * | | - * |-----------------------------------------------------------------------|---| - * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | - * | SHIFT | ζ | ξ | χ | ς | β | ν | μ | ≪ | ≫ | ∫ |SHFT | | | | | | - * | SHIFT | Ζ | Ξ | Χ | ✔ | Β | Ν | Μ | ≲ | ≳ | |SHFT | | | | | | - * | SHIFT | | | ≠ | ≈ | ≡ | ≤ | ≥ | | | ÷ |SHFT | | * | * | * | | [1] - * | SHIFT | ℤ | | ℂ | ≉ | ≢ | ℕ | | | | |SHFT | | * | * | * | | - * |-----------------------------------------------------------------------|ENT| - * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | [2] - * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | - * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | - * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | - * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | - * `---------------------------------------------------------------------------' - * - * [1] CADET + numpad moves the mouse. SHIFT+CADET+NUMPAD moves it more quickly. CADET+5 - * clicks the mouse, and SHIFT+CADET+FIVE right-clicks. - * [2] The Greek letters in this row are the three modifier keys (GREEK, CADET, FN), - * not the Unicode Greek letters. - * [3] The accent marks in this row are combining accent marks, which may be put after - * a character to combine it. In order, they are grave, acute, circumflex, tilde, - * diaresis (umlaut), and macron. - */ // NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the // switch on the KC_GRV key; change back to KC_ESC once this is fixed. [_QWERTY] = LAYOUT_hotswap( @@ -115,10 +74,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_GREEK,KC_CADET,MO_FN, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO_FN, KC_GREEK,KC_CADET,KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* The Greek layers. Shown here are the QWERTY layer (for visual reference) and the two Greek + * layers. + * ,---------------------------------------------------------------------------- + * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY + * | ` | ₁ | ₂ | ₃ | ₄ | ₅ | ₆ | ₇ | ₈ | ₉ | ₀ | ₋ | ₊ | ₍ | ₎ | | | | | SHIFTGREEK + * | ` | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ⁻ | ⁺ | ⁽ | ⁾ | | | | | GREEK + * |---------------------------------------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | + * | ` | ¿ | | € | | | | | | | | | ≁ | BKSPC |LCK| | ⊗ | | + * | | | | | | | | | | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | + * |---------------------------------------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | + * | | Θ | Ω | Ε | Ρ | Τ | Ψ | Υ | Ι | Ο | Π | | | | | | | | + * | | θ | ω | ε | ρ | τ | ψ | υ | ι | ο | π | | | | | | | | + * |-----------------------------------------------------------------------| + | + * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | ⊕ | + * | CTRL | Α | Σ | Δ | Φ | Γ | Η | | Κ | Λ | … | ∴ | RET | | | | | + * | CTRL | α | σ | δ | φ | γ | η | ϑ | κ | λ | ⋯ | ⋅ | RET | | | | | + * |-----------------------------------------------------------------------|---| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | + * | SHIFT | Ζ | Ξ | Χ | ✔ | Β | Ν | Μ | ≲ | ≳ | |SHFT | | | | | | + * | SHIFT | ζ | ξ | χ | ς | β | ν | μ | ≪ | ≫ | ∫ |SHFT | | | | | | + * |-----------------------------------------------------------------------|ENT| + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * `---------------------------------------------------------------------------' + */ [_GREEK] = LAYOUT_hotswap( KC_GRV, H(00b9), H(00b2), H(00b3), H(2074), H(2075), H(2076), H(2077), H(2078), H(2079), H(2070), H(207b), H(207a), H(207d), H(207e), XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, H(00a1), _______, H(00a3), _______, _______, _______, _______, H(00b0), _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), + KC_GRV, _______, _______, _______, _______, _______, _______, _______, H(00b0), _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), _______, H(03b8), H(03c9), H(03b5), H(03c1), H(03c4), H(03c8), H(03c5), H(03b9), H(03bf), H(03c0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, _______, H(03b1), H(03c3), H(03b4), H(03c6), H(03b3), H(03b7), H(03d1), H(03ba), H(03bb), H(22ef), H(22c5), _______, KC_P4, KC_P5, KC_P6, H(2295), _______, H(03b6), H(03be), H(03c7), H(03c2), H(03b2), H(03bd), H(03bc), H(226a), H(226b), H(222b), _______, _______, KC_P1, KC_P2, KC_P3, @@ -130,30 +117,58 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, H(0391), H(03a3), H(0394), H(03a6), H(0393), H(0397), XXXXXXX, H(039a), H(039b), H(2026), H(2234), _______, KC_P4, KC_P5, KC_P6, H(2295), _______, H(0396), H(039e), H(03a7), H(2714), H(0392), H(039d), H(039c), H(2272), H(2273), XXXXXXX, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), - // TODO: Add mouse keys to keypad. + /* The Cadet layers. Again, we show the QWERTY layer and the two cadet layers. + * ,---------------------------------------------------------------------------- + * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY + * | ∅ | | | | | | | | | | | | | | | | | | | SHIFTCADET + * | ¬ | | | | | | | | | | | | | | | | | | | CADET + * |---------------------------------------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | + * | ` | ¡ | | £ | | | | | ° | | | * | ∓ | BKSPC |LCK| | | | + * | | | | | | | | | | | | | ± | BKSPC |LCK| | × | | + * |---------------------------------------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | + * | | ℚ | | | ℝ | ⊆ | ⊇ | | ℵ | ∄ | | ∉ | | | * | * | * | | + * | | ∧ | ∨ | ∩ | ∪ | ⊂ | ⊃ | ∀ | ∞ | ∃ | ∂ | ∈ | | | * | * | * | | [1] + * |-----------------------------------------------------------------------| + | + * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | ⊕ | + * | CTRL | Å | | ∇ | | ⇑ | ⇓ | ⇐ | ⇒ | ⇔ | | | RET | * | * | * | | + * | CTRL | ⟘ | ⊤ | ⊢ | ⊣ | ↑ | ↓ | ← | → | ↔ | | | RET | * | * | * | | [1] + * |-----------------------------------------------------------------------|---| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | + * | SHIFT | ℤ | ℂ | | ≉ | ≢ | ℕ | | | | |SHFT | | * | * | * | | + * | SHIFT | | ≠ | | ≈ | ≡ | ≤ | ≥ | | | ÷ |SHFT | | * | * | * | | [1] + * |-----------------------------------------------------------------------|ENT| + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * `---------------------------------------------------------------------------' + * [1] CADET + numpad moves the mouse. SHIFT+CADET+NUMPAD moves it more quickly. CADET+5 + * clicks the mouse, and SHIFT+CADET+FIVE right-clicks. + */ [_CADET] = LAYOUT_hotswap( H(00AC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, H(0300), H(0301), H(0302), H(0303), H(0308), H(0304), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), XXXXXXX, + KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), XXXXXXX, _______, H(2227), H(2228), H(2229), H(222a), H(2282), H(2283), H(2200), H(221e), H(2203), H(2202), H(2208), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, _______, H(22a5), H(22a4), H(22a2), H(22a3), H(2191), H(2193), H(2190), H(2192), H(2194), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, - _______, XXXXXXX, XXXXXXX, H(2260), H(2248), H(2261), H(2264), H(2265), XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, + _______, XXXXXXX, H(2260), XXXXXXX, H(2248), H(2261), H(2264), H(2265), XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), [_SHIFTCADET] = LAYOUT_hotswap( H(2205), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(2213), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, + KC_GRV, H(00a1), XXXXXXX, H(00a3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(2213), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, H(211a), XXXXXXX, XXXXXXX, H(211d), H(2286), H(2287), XXXXXXX, H(2135), H(2204), XXXXXXX, H(2209), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, _______, H(212b), XXXXXXX, H(2207), XXXXXXX, H(21d1), H(21d3), H(21d0), H(21d2), H(21d4), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, - _______, H(2124), XXXXXXX, H(2102), H(2249), H(2262), H(2115), XXXXXXX, XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, + _______, H(2124), H(2102), XXXXXXX, H(2249), H(2262), H(2115), XXXXXXX, XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), - // Function layer is mostly for keyboard meta-control operations. Lots of this is just from the - // default layout; TODO make it nicer. + // Function layer is mostly for keyboard meta-control operations, but also contains the combining + // accent marks. These are deliberately placed to match where the analogous controls go on Mac OS. [_FUNCTION] = LAYOUT_hotswap( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, - BL_TOGG, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + CMB_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RESET, + CMB_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, CMB_AGU, _______, _______, _______, CMB_DIA, CMB_CIR, CMB_MAC, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, CMB_CED, _______, _______, CMB_TIL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), };