From fb305468fcc8a4b89ece0d26eb1c3d588704d126 Mon Sep 17 00:00:00 2001 From: Fabian Wermelinger Date: Sun, 1 Sep 2024 23:31:58 +0200 Subject: [PATCH] Add umlaut layer (US altgr-intl) --- .../ai03/polaris/keymaps/fab_polaris/keymap.c | 25 ++++++++++++++----- keyboards/hhkb/ansi/keymaps/fab_hhkb/keymap.c | 20 +++++++++++++-- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/keyboards/ai03/polaris/keymaps/fab_polaris/keymap.c b/keyboards/ai03/polaris/keymaps/fab_polaris/keymap.c index 4b2c66420c06..0be980be5ba7 100644 --- a/keyboards/ai03/polaris/keymaps/fab_polaris/keymap.c +++ b/keyboards/ai03/polaris/keymaps/fab_polaris/keymap.c @@ -7,9 +7,14 @@ enum layer_names { _BASE, - _FN + _FN, + _UML // Umlauts }; +#define UML_AE RALT(KC_Q) +#define UML_OE RALT(KC_P) +#define UML_UE RALT(KC_Y) + // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -28,11 +33,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ [_BASE] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, - 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_BSPC, - LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - SC_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC, KC_NO, - KC_LGUI, MO(_FN), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_ESC, KC_RGUI, KC_APP, KC_RCTL + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + 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_BSPC, + LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + SC_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC, KC_NO, + MO(_UML), MO(_FN), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_ESC, MO(_UML), KC_APP, KC_RCTL ), [_FN] = LAYOUT_all( @@ -42,6 +47,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, BL_STEP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + + [_UML] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, UML_UE, _______, UML_OE, _______, _______, _______, _______, + _______, UML_AE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; // clang-format on diff --git a/keyboards/hhkb/ansi/keymaps/fab_hhkb/keymap.c b/keyboards/hhkb/ansi/keymaps/fab_hhkb/keymap.c index c752dd241400..c4664f4db845 100644 --- a/keyboards/hhkb/ansi/keymaps/fab_hhkb/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/fab_hhkb/keymap.c @@ -4,7 +4,15 @@ #include QMK_KEYBOARD_H // layers -enum Layers { _BASE = 0, _FN }; +enum Layers { + _BASE = 0, + _FN, + _UML // Umlauts +}; + +#define UML_AE RALT(KC_Q) +#define UML_OE RALT(KC_P) +#define UML_UE RALT(KC_Y) // special keys /* enum CustomKeys */ @@ -20,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, 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_BSPC, LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC, MO(_FN), + SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC, MO(_UML), MO(_FN), KC_LALT, KC_SPC, KC_ESC, KC_RGUI ), @@ -31,6 +39,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LALT, KC_SPC, KC_ESC, _______ ), + + [_UML] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, UML_UE, _______, UML_OE, _______, _______, _______, _______, + _______, UML_AE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), }; // clang-format on