summaryrefslogtreecommitdiffstats
path: root/keyboards/satan/keymaps/isoHHKB/keymap.c
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-07-16 16:04:02 +1000
committerskullydazed <skullydazed@users.noreply.github.com>2019-07-15 23:04:02 -0700
commitf14629ed1cd7c7ec9089604d64f29a99981558e8 (patch)
treea3691f4f3cb0c941694c16a3a94f73befb6ef6ec /keyboards/satan/keymaps/isoHHKB/keymap.c
parent2a231457bd494079c36cf3e07c9b887016adb491 (diff)
Remove/migrate action_get_macro()s from default keymaps (#5625)
* Remove/migrate action_get_macro()s from default keymaps * Leave these breaks alone
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 701095907e..46d66e5db6 100644
--- a/keyboards/satan/keymaps/isoHHKB/keymap.c
+++ b/keyboards/satan/keymaps/isoHHKB/keymap.c
@@ -10,8 +10,10 @@
#define _BL 0
#define _FL 1
-#define KC_ENYE M(0)
-#define KC_CEDL M(1)
+enum custom_keycodes {
+ KC_ENYE = SAFE_RANGE,
+ KC_CEDL
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
@@ -93,14 +95,28 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
}
};
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
- switch(id) {
- case 0: // Ñ
- return MACRO(D(LALT), T(KP_0), T(KP_2), T(KP_4), T(KP_1), U(LALT), END);
- case 1: // Ç
- return MACRO(D(LALT), T(KP_0), T(KP_2), T(KP_3), T(KP_1), U(LALT), END);
+ switch(keycode) {
+ case KC_ENYE: // Ñ
+ register_code16(KC_LALT);
+ tap_code(KC_KP_0);
+ tap_code(KC_KP_2);
+ tap_code(KC_KP_4);
+ tap_code(KC_KP_1);
+ unregister_code16(KC_LALT);
+ return false;
+ case KC_CEDL: // Ç
+ register_code16(KC_LALT);
+ tap_code(KC_KP_0);
+ tap_code(KC_KP_2);
+ tap_code(KC_KP_3);
+ tap_code(KC_KP_1);
+ unregister_code16(KC_LALT);
+ return false;
+ default:
+ return true;
}
}
- return MACRO_NONE;
+ return true;
};