diff options
Diffstat (limited to 'users/konstantin/konstantin.h')
-rw-r--r-- | users/konstantin/konstantin.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index d43712b965..da21058312 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -13,6 +13,7 @@ #ifdef LAYER_FN #define FN MO(L_FN) + #define FNLK TG(L_FN) #define FN_CAPS LT(L_FN, KC_CAPS) #define FN_ESC LT(L_FN, KC_ESC) #define FN_FNLK TT(L_FN) @@ -22,9 +23,8 @@ #define NUMPAD TG(L_NUMPAD) #endif -#define KC_SYSR LALT(KC_PSCR) -#undef KC_BRK -#define KC_BRK LCTL(KC_PAUS) +#define BREAK LCTL(KC_PAUS) +#define SYSRQ LALT(KC_PSCR) #define MV_UP LCTL(KC_UP) #define MV_DOWN LCTL(KC_DOWN) @@ -46,16 +46,18 @@ #endif #define LCT_CPS LCTL_T(KC_CAPS) +#define RSF_SLS RSFT_T(KC_SLSH) -#ifdef SEND_STRING_CLEAN - #undef SEND_STRING - #define SEND_STRING(string) { \ - uint8_t ss_mods = get_mods(); \ - clear_mods(); \ - send_string_P(PSTR(string)); \ - set_mods(ss_mods); \ - } -#endif +#define IS_LAYER_ON_STATE(state, layer) ( (state) & (1UL << (layer))) +#define IS_LAYER_OFF_STATE(state, layer) (~(state) & (1UL << (layer))) + +// Clear mods, perform action, restore mods +#define CLEAN_MODS(action) { \ + uint8_t mods = get_mods(); \ + clear_mods(); \ + action; \ + set_mods(mods); \ + } enum keycodes_user { CLEAR = SAFE_RANGE, @@ -81,5 +83,6 @@ void keyboard_pre_init_keymap(void); void eeconfig_init_keymap(void); void keyboard_post_init_keymap(void); -bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); uint32_t layer_state_set_keymap(uint32_t state); +void led_set_keymap(uint8_t usb_led); |