From 7e24fe7008efe30dc088091e973ba72b120bd824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 24 Jul 2022 13:00:11 +0100 Subject: [PATCH] Add numpads --- .../rkb1/keymaps/default/key_neo2_table.h | 3 ++ .../rkb1/keymaps/default/key_qwertz_table.h | 1 - .../rkb1/keymaps/default/key_unicode_table.h | 6 +-- keyboards/rkb1/keymaps/default/keymap.c | 50 ++++++++++++++----- 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/keyboards/rkb1/keymaps/default/key_neo2_table.h b/keyboards/rkb1/keymaps/default/key_neo2_table.h index 8226ee66ff..3f3439a7cc 100644 --- a/keyboards/rkb1/keymaps/default/key_neo2_table.h +++ b/keyboards/rkb1/keymaps/default/key_neo2_table.h @@ -292,4 +292,7 @@ const struct decoded_key key_neo2_mapping[] = { {KC_RBRC, 4, DECODED_KEY_ONESHOT}, // ˝ {KC_RBRC, 5, DECODED_KEY_ONESHOT}, // ᾿ {KC_RBRC, 6, DECODED_KEY_ONESHOT}, // ˘ + {KC_P9, 2, DECODED_KEY_ONESHOT}, // → + + {KC_NLCK, 2, DECODED_KEY_ONESHOT}, // leftwards tab }; diff --git a/keyboards/rkb1/keymaps/default/key_qwertz_table.h b/keyboards/rkb1/keymaps/default/key_qwertz_table.h index 4a79f304f7..6f209ef942 100644 --- a/keyboards/rkb1/keymaps/default/key_qwertz_table.h +++ b/keyboards/rkb1/keymaps/default/key_qwertz_table.h @@ -118,7 +118,6 @@ const struct sparse_decoded_key key_qwertz_sparse_mapping[] = {{NBSPACE, {KC_SPC {INVQMRK, {KC_6, 4, 0}}, // ¿ {CA_DIA, {KC_QUOT, 2, 0}}, // Ä {CO_DIA, {KC_SCLN, 2, 0}}, // Ö - {MULTSGN, {KC_GRV, 4, 0}}, // × {CU_DIA, {KC_LBRC, 2, 0}}, // Ü {SZLIG, {KC_MINS, 1, 0}}, // ß {A_DIA, {KC_QUOT, 1, 0}}, // ä diff --git a/keyboards/rkb1/keymaps/default/key_unicode_table.h b/keyboards/rkb1/keymaps/default/key_unicode_table.h index d8a2453440..32f44484f1 100644 --- a/keyboards/rkb1/keymaps/default/key_unicode_table.h +++ b/keyboards/rkb1/keymaps/default/key_unicode_table.h @@ -1,6 +1,4 @@ #pragma once -static const char* key_unicode_mappings[] = { - " ", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "\u00a0", "¡", "¢", "£", "¤", "¥", "§", "ª", "«", "¬", "\u00ad", "°", "±", "²", "³", "·", "¹", "º", "»", "¿", "Ä", "Ö", "×", "Ü", "ß", "ä", "ö", "÷", "ü", "ſ", "Γ", "Δ", "Θ", "Λ", "Ξ", "Π", "Σ", "Φ", "Ψ", "Ω", "α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", - "μ", "ν", "ξ", "ο", "π", "ρ", "ς", "σ", "τ", "υ", "φ", "χ", "ψ", "ω", "ϑ", "ϕ", "ϰ", "ϱ", "ϵ", "ẞ", "\u2011", "–", "—", "‘", "’", "‚", "“", "”", "„", "†", "•", "‣", "…", "\u202f", "‰", "′", "″", "‹", "›", "⁄", "₀", "₁", "₂", "₃", "€", "ℂ", "ℓ", "ℕ", "№", "ℚ", "ℝ", "ℤ", "ℵ", "←", "↑", "→", "↓", "↔", "↕", "↦", "⇌", "⇐", "⇒", "⇔", "∀", "∂", "∃", "∅", "∇", "∈", "−", "∓", "∔", "∖", "∘", "√", "∝", "∞", "∡", "∣", "∥", "∧", "∨", "∩", "∪", "∫", "∸", "≈", "≠", "≡", "≤", "≥", "≪", "≫", "⊂", "⊃", "⊆", "⊇", "⊕", "⊖", "⊛", "⊙", "⊥", "⊶", "⊷", "⋂", "⋃", "⋅", "⌀", "⌈", "⌉", "⌊", "⌋", "␣", "□", "♠", "♣", "♥", "♦", "♀", "♂", "⚥", "✔", "✘", "⟨", "⟩", "^", "ˇ", "↻", "˙", "˞", ".", "`", "¸", "˛", "°", "¨", "῾", "¯", "´", "˜", "/", "˝", "᾿", "˘", -}; +static const char* key_unicode_mappings[] = {" ", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "\u00a0", "¡", "¢", "£", "¤", "¥", "§", "ª", "«", "¬", "\u00ad", "°", "±", "²", "³", "·", "¹", "º", "»", "¿", "Ä", "Ö", "×", "Ü", "ß", "ä", "ö", "÷", "ü", "ſ", "Γ", "Δ", "Θ", "Λ", "Ξ", "Π", "Σ", "Φ", "Ψ", "Ω", "α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", + "ν", "ξ", "ο", "π", "ρ", "ς", "σ", "τ", "υ", "φ", "χ", "ψ", "ω", "ϑ", "ϕ", "ϰ", "ϱ", "ϵ", "ẞ", "\u2011", "–", "—", "‘", "’", "‚", "“", "”", "„", "†", "•", "‣", "…", "\u202f", "‰", "′", "″", "‹", "›", "⁄", "₀", "₁", "₂", "₃", "€", "ℂ", "ℓ", "ℕ", "№", "ℚ", "ℝ", "ℤ", "ℵ", "←", "↑", "→", "↓", "↔", "↕", "↦", "⇌", "⇐", "⇒", "⇔", "∀", "∂", "∃", "∅", "∇", "∈", "−", "∓", "∔", "∖", "∘", "√", "∝", "∞", "∡", "∣", "∥", "∧", "∨", "∩", "∪", "∫", "∸", "≈", "≠", "≡", "≤", "≥", "≪", "≫", "⊂", "⊃", "⊆", "⊇", "⊕", "⊖", "⊛", "⊙", "⊥", "⊶", "⊷", "⋂", "⋃", "⋅", "⌀", "⌈", "⌉", "⌊", "⌋", "␣", "□", "♠", "♣", "♥", "♦", "♀", "♂", "⚥", "✔", "✘", "⟨", "⟩", "^", "ˇ", "↻", "˙", "˞", ".", "`", "¸", "˛", "°", "¨", "῾", "¯", "´", "˜", "/", "˝", "᾿", "˘", "→", "⇤"}; diff --git a/keyboards/rkb1/keymaps/default/keymap.c b/keyboards/rkb1/keymaps/default/keymap.c index dc498ff856..fc82a466ba 100644 --- a/keyboards/rkb1/keymaps/default/keymap.c +++ b/keyboards/rkb1/keymaps/default/keymap.c @@ -269,7 +269,7 @@ enum custom_keycodes { DIAMOND, // ♦ FEMALE, // ♀ MALE, // ♂ - MALEFEM, // ⚥ + MALEFEM, // ⚥ CHECKMK, // ✔ XBALLOT, // ✘ LANGLE, // ⟨ @@ -294,10 +294,13 @@ enum custom_keycodes { DBLACUT, // ˝ SPLENIS, // ᾿ BREVE, // ˘ + VECTARR, // → + + // Miscellaneous + LEFTTAB, // tab but backwards COMPOSE, PASTHRU, - NUMPAD, STENO, LLOCK, NEO2, @@ -470,7 +473,7 @@ static void tap_on_layer(uint16_t key, uint8_t layer) { } } -enum layers { _L1, _L2, _L3, _L4, _L5, _L6, _L7, _L8, _L9, FN }; +enum layers { _L1, _L2, _L3, _L4, _L5, _L6, _L7, _L8, _L9, FN, KP1, KP2, KP3 }; #define LSHCTL S(KC_LCTL) #define LSHGUI S(KC_LGUI) @@ -493,63 +496,63 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { COMPOSE, X, V, L, C, W, K, H, G, F, Q, SZLIG, CIRCUM, U, I, A, E, O, S, N, R, T, D, Y, DIARESS, U_DIA, O_DIA, A_DIA, P, Z, B, M, COMMA, PERIOD, J, XXXXXXX, - KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, NUMPAD, STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, + KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, TG(KP1), STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, TT(_L6), TT(_L2), TT(_L3), KC_SPC, TT(_L7), TT(_L4), TT(_L5), KC_SPC ), [_L2] = LAYOUT_ortho_4x6_2x2uc( COMPOSE, CX, CV, CL, CC, CW, CK, CH, CG, CF, CQ, CSZLIG, HACEK, CU, CI, CA, CE, CO, CS, CN, CR, CT, CD, CY, SPASPER, CU_DIA, CO_DIA, CA_DIA, CP, CZ, CB, CM, ENDASH, BULLET, CJ, XXXXXXX, - LSHCTL, OSL(FN), LSHGUI, LSHALT, PASTHRU, NUMPAD, STENO, LLOCK, RSHALT, RSHGUI, SHAPP, RSHCTL, + LSHCTL, OSL(FN), LSHGUI, LSHALT, PASTHRU, TG(KP1), STENO, LLOCK, RSHALT, RSHGUI, SHAPP, RSHCTL, TT(_L6), TT(_L2), TT(_L6), KC_SPC, XXXXXXX, XXXXXXX, TT(_L8), KC_SPC ), [_L3] = LAYOUT_ortho_4x6_2x2uc( COMPOSE, ELLIPS, LOWLINE, LBRACKT, RBRACKT, ACIRCUM, EXCLAM, LESSTHN, GREATER, EQUALS, AMPSAND, LONG_S, DOTABVE, BSLASH, FSLASH, LBRACE, RBRACE, ASTERSK, QUESTN, LPARENS, RPARENS, HYPHMIN, COLON, AT, ACUTE, NUMBER, DOLLAR, VRTLINE, ATILDE, AGRAVE, PLUS, PERCENT, QUOT, AAPOSTR, SEMCOL, XXXXXXX, - KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, NUMPAD, STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, + KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, TG(KP1), STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, TT(_L6), TT(_L6), TT(_L3), KC_SPC, TT(_L7), TT(_L7), XXXXXXX, KC_SPC ), [_L4] = LAYOUT_ortho_4x6_2x2uc( COMPOSE, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, INVEXCL, SEVEN, EIGHT, NINE, PLUS, MINUS, DOTBLOW, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, INVQMRK, FOUR, FIVE, SIX, COMMA, PERIOD, SOLIDUS, KC_ESC, KC_TAB, KC_PSTE, KC_ENT, KC_UNDO, COLON, ONE, TWO, THREE, SEMCOL, KC_RSFT, - RLTCTL, OSL(FN), RLTGUI, RLTALT, PASTHRU, NUMPAD, STENO, LLOCK, KC_RALT, RLTRGUI, RLTAPP, RLTRCTL, + RLTCTL, OSL(FN), RLTGUI, RLTALT, PASTHRU, TG(KP1), STENO, LLOCK, KC_RALT, RLTRGUI, RLTAPP, RLTRCTL, XXXXXXX, XXXXXXX, TT(_L7), ZERO, TT(_L7), TT(_L4), TT(_L9), ZERO ), [_L5] = LAYOUT_ortho_4x6_2x2uc( COMPOSE, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, ZERO, HYPHMIN, CEDILLE, DEGREE, SECTION, SCRIPTL, RDGUILM, LDGUILM, DOLLAR, EURO, LODQUOT, LDQUOT, RDQUOT, EMDASH, SPLENIS, SUPONE, SUPTWO, SUPTHRE, RSGUILM, LSGUILM, CENTSGN, YEN, LOSQUOT, LSQUOT, RSQUOT, HYPHMIN, - KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, NUMPAD, STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, + KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, TG(KP1), STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, XXXXXXX, TT(_L8), XXXXXXX, KC_SPC, TT(_L9), XXXXXXX, TT(_L5), KC_SPC ), [_L6] = LAYOUT_ortho_4x6_2x2uc( COMPOSE, XI, XXXXXXX, LAMBDA, CHI, OMEGA, KAPPA, PSI, GAMMA, PHI, VARPHI, FSIGMA, TURNED, XXXXXXX, IOTA, ALPHA, EPSILON, OMICRON, SIGMA, NU, RHO, TAU, DELTA, UPSILON, MACRON, XXXXXXX, LUNEPS, ETA, PI, ZETA, BETA, MU, VARRHO, VRTHETA, THETA, XXXXXXX, - LSHCTL, OSL(FN), LSHGUI, LSHALT, PASTHRU, NUMPAD, STENO, LLOCK, RSHALT, RSHGUI, SHAPP, RSHCTL, + LSHCTL, OSL(FN), LSHGUI, LSHALT, PASTHRU, TG(KP1), STENO, LLOCK, RSHALT, RSHGUI, SHAPP, RSHCTL, TT(_L6), TT(_L6), TT(_L6), KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC ), [_L7] = LAYOUT_ortho_4x6_2x2uc( COMPOSE, CXI, SQRT, CLAMBDA, COMPLEX, COMEGA, MULTSGN, CPSI, CGAMMA, CPHI, RATIONL, RINGOP, HOOK, SUBSET, INTEGRL, FORALL, THREXST, ELEMOF, CSIGMA, NATURAL, REAL, PARTDRV, CDELTA, NABLA, TILDE, UNION, INTRSCT, ALEF, CPI, INTEGER, LDBLARR, LRDBARR, RDBLARR, RARRBAR, CTHETA, XXXXXXX, - RLTCTL, OSL(FN), RLTGUI, RLTALT, PASTHRU, NUMPAD, STENO, LLOCK, KC_RALT, RLTRGUI, RLTAPP, RLTRCTL, + RLTCTL, OSL(FN), RLTGUI, RLTALT, PASTHRU, TG(KP1), STENO, LLOCK, KC_RALT, RLTRGUI, RLTAPP, RLTRCTL, XXXXXXX, XXXXXXX, TT(_L7), KC_SPC, TT(_L7), TT(_L7), XXXXXXX, KC_SPC ), [_L8] = LAYOUT_ortho_4x6_2x2uc( COMPOSE, FEMORD, MASCORD, NUMERO, XXXXXXX, MIDDOT, POUND, CURENCY, KC_TAB, FSLASH, ASTERSK, HYPHMIN, RING, SUBONE, SUBTWO, SUBTHRE, FEMALE, MALE, MALEFEM, VARKPPA, LANGLE, RANGLE, SUBZERO, NBHYP, BREVE, NOTSIGN, LOR, LAND, UPTACK, MEASANG, PARALLL, RIGHTAR, INFINIT, PROPTO, EMPTYST, SHYPHEN, - KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, NUMPAD, STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, + KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, TG(KP1), STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, XXXXXXX, TT(_L8), XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, TT(_L8), KC_SPC ), [_L9] = LAYOUT_ortho_4x6_2x2uc( COMPOSE, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, KC_WH_U, KC_BTN4, XXXXXXX, GRAVE, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN6, KC_WH_D, KC_BTN5, XXXXXXX, DBLACUT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, NUMPAD, STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, + KC_LCTL, OSL(FN), KC_LGUI, KC_LALT, PASTHRU, TG(KP1), STENO, LLOCK, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, TT(_L9), XXXXXXX, TT(_L9), KC_SPC ), [FN] = LAYOUT_ortho_4x6_2x2uc( @@ -558,7 +561,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTZ, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - ) + ), + [KP1] = LAYOUT_ortho_4x6_2x2uc( + KC_NLCK, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, LEFTTAB, FSLASH, ASTERSK, HYPHMIN, XXXXXXX, + XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, CHECKMK, XBALLOT, DAGGER, PLUS, XXXXXXX, + XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PENT, XXXXXXX, XXXXXXX, CLUBS, EURO, TRIBLLT, KC_PENT, XXXXXXX, + XXXXXXX, KC_P1, KC_P2, KC_P7, KC_PDOT, TG(KP1), XXXXXXX, DIAMOND, HEART, SPADE, PERIOD, XXXXXXX, + TG(KP2), TG(KP3), KC_P0, KC_P0, TG(KP2), TG(KP3), OPNBOX, OPNBOX + ), + [KP2] = LAYOUT_ortho_4x6_2x2uc( + XXXXXXX, EQUALS, DIVSGN, DOTOPER, MINUS, XXXXXXX, XXXXXXX, NOTEQAL, FRACTSL, MULTSGN, SETMINS, XXXXXXX, + XXXXXXX, UDARROW, UPARROW, VECTARR, PLSMNS, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_PGUP, MINPLS, XXXXXXX, + XXXXXXX, LEFTARR, COLON, RIGHTAR, KC_PENT, XXXXXXX, XXXXXXX, KC_LEFT, XXXXXXX, KC_RGHT, KC_PENT, KC_RSFT, + XXXXXXX, LRARROW, DOWNARR, RLHARPO, COMMA, TG(KP1), XXXXXXX, KC_END, KC_DOWN, KC_PGDN, KC_DEL, XXXXXXX, + TG(KP2), TG(KP3), PERCENT, PERCENT, TG(KP2), TG(KP3), KC_PSTE, KC_PSTE + ), + [KP3] = LAYOUT_ortho_4x6_2x2uc( + XXXXXXX, ALMSTEQ, DIAMETR, CDOT, CMINUS, XXXXXXX, XXXXXXX, IDENTCL, DIVIDES, CTIMES, DOTMINS, XXXXXXX, + XXXXXXX, MCHLESS, INTRSCT, MCHGRTR, CPLUS, XXXXXXX, XXXXXXX, LCEILNG, NARYINT, RCEILNG, DOTPLUS, XXXXXXX, + XXXXXXX, SUBSET, ORIGNAL, SUPRSET, KC_PENT, XXXXXXX, XXXXXXX, SUBEQL, IMAGEOF, SUPREQL, KC_PENT, XXXXXXX, + XXXXXXX, LEQUAL, UNION, GEQUAL, PRIME, TG(KP1), XXXXXXX, LFLOOR, NARYUNI, RFLOOR, DPRIME, XXXXXXX, + TG(KP2), TG(KP3), PERMILL, PERMILL, TG(KP2), TG(KP3), WHTSQAR, WHTSQAR + ), }; // clang-format on