From 722f06ff8c7c77843cc5be14d9fdb7d68a16ebf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 26 Sep 2018 20:08:56 +0200 Subject: [PATCH] Keymap: Update whitefox/konstantin keymap (#3980) * Rename constexpr keymap folder to konstantin * Replace numpad comma with Unicode comma * Rename tap dance constants * Move record->event.pressed check into switch * Use RShift as a dedicated Fn key --- .../{constexpr => konstantin}/config.h | 4 +- .../{constexpr => konstantin}/keymap.c | 50 ++++++++++--------- .../{constexpr => konstantin}/rules.mk | 0 3 files changed, 29 insertions(+), 25 deletions(-) rename keyboards/whitefox/keymaps/{constexpr => konstantin}/config.h (100%) rename keyboards/whitefox/keymaps/{constexpr => konstantin}/keymap.c (80%) rename keyboards/whitefox/keymaps/{constexpr => konstantin}/rules.mk (100%) diff --git a/keyboards/whitefox/keymaps/constexpr/config.h b/keyboards/whitefox/keymaps/konstantin/config.h similarity index 100% rename from keyboards/whitefox/keymaps/constexpr/config.h rename to keyboards/whitefox/keymaps/konstantin/config.h index b4bc05acf5..ad40105a7c 100644 --- a/keyboards/whitefox/keymaps/constexpr/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -2,9 +2,9 @@ #define FORCE_NKRO -#define TAPPING_TOGGLE 2 -#define TAPPING_TERM 200 #define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 #define MOUSEKEY_DELAY 50 #define MOUSEKEY_INTERVAL 15 diff --git a/keyboards/whitefox/keymaps/constexpr/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c similarity index 80% rename from keyboards/whitefox/keymaps/constexpr/keymap.c rename to keyboards/whitefox/keymaps/konstantin/keymap.c index b19f1c81fa..6998798e3c 100644 --- a/keyboards/whitefox/keymaps/constexpr/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -1,12 +1,14 @@ #include QMK_KEYBOARD_H +#define FN MO(L_FN) #define FN_CAPS LT(L_FN, KC_CAPS) -#define FN_CTRL TD(TD_FN_CTRL) -#define RL_ALT TD(TD_RL_ALT) // Unused +#define FN_RCTL TD(TD_FN_RCTL) // Unused +#define RLALT TD(TD_RLALT) // Unused #define TOP LCTL(KC_HOME) #define BOTTOM LCTL(KC_END) +#define UC_COMM UC(0x002C) #define UC_LPRN UC(0x0028) #define UC_RPRN UC(0x0029) #define UC_EQLS UC(0x003D) @@ -32,19 +34,21 @@ enum custom_keycodes { bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!record->event.pressed) { return true; } - switch (keycode) { case CLEAR: - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } return false; case NUMPAD: - layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1<event.pressed) { + layer_invert(L_NUMPAD); + bool num_lock = host_keyboard_leds() & 1<