aboutsummaryrefslogtreecommitdiff
path: root/keyboards/satan/keymaps/isoHHKB/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/satan/keymaps/isoHHKB/keymap.c')
-rw-r--r--keyboards/satan/keymaps/isoHHKB/keymap.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/keyboards/satan/keymaps/isoHHKB/keymap.c b/keyboards/satan/keymaps/isoHHKB/keymap.c
index 701095907..46d66e5db 100644
--- a/keyboards/satan/keymaps/isoHHKB/keymap.c
+++ b/keyboards/satan/keymaps/isoHHKB/keymap.c
@@ -10,8 +10,10 @@
10#define _BL 0 10#define _BL 0
11#define _FL 1 11#define _FL 1
12 12
13#define KC_ENYE M(0) 13enum custom_keycodes {
14#define KC_CEDL M(1) 14 KC_ENYE = SAFE_RANGE,
15 KC_CEDL
16};
15 17
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17 /* Keymap _BL: (Base Layer) Default Layer 19 /* Keymap _BL: (Base Layer) Default Layer
@@ -93,14 +95,28 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
93 } 95 }
94}; 96};
95 97
96const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { 98bool process_record_user(uint16_t keycode, keyrecord_t *record) {
97 if (record->event.pressed) { 99 if (record->event.pressed) {
98 switch(id) { 100 switch(keycode) {
99 case 0: // Ñ 101 case KC_ENYE: // Ñ
100 return MACRO(D(LALT), T(KP_0), T(KP_2), T(KP_4), T(KP_1), U(LALT), END); 102 register_code16(KC_LALT);
101 case 1: // Ç 103 tap_code(KC_KP_0);
102 return MACRO(D(LALT), T(KP_0), T(KP_2), T(KP_3), T(KP_1), U(LALT), END); 104 tap_code(KC_KP_2);
105 tap_code(KC_KP_4);
106 tap_code(KC_KP_1);
107 unregister_code16(KC_LALT);
108 return false;
109 case KC_CEDL: // Ç
110 register_code16(KC_LALT);
111 tap_code(KC_KP_0);
112 tap_code(KC_KP_2);
113 tap_code(KC_KP_3);
114 tap_code(KC_KP_1);
115 unregister_code16(KC_LALT);
116 return false;
117 default:
118 return true;
103 } 119 }
104 } 120 }
105 return MACRO_NONE; 121 return true;
106}; 122};