diff options
| author | Konstantin Đorđević <vomindoraan@gmail.com> | 2020-04-09 18:54:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-09 09:54:19 -0700 |
| commit | 439afc883a94627fd3f742d573fcfdf90ddbb22a (patch) | |
| tree | 47c3b781426c340d8eae3e2bdca6d3e67698b383 | |
| parent | 07c75feba3f2c0b4baf1c230750483004e502020 (diff) | |
| download | qmk_firmware-439afc883a94627fd3f742d573fcfdf90ddbb22a.tar.gz qmk_firmware-439afc883a94627fd3f742d573fcfdf90ddbb22a.zip | |
[Keymap] Update personal userspace and keymaps (#8747)
* Update mousekey parameters in userspace
* Disable GRAVE_ESC in boards where it isn't used
* Tweak MODERN_DOLCH_RED and reset RGB on Shift+Toggle in KBD6X
* Disable RGB controls when Fn/Caps indicator lights are on
* Use LTO_ENABLE instead of setting -flto directly
* Add led_update_keymap, use SS_LCTL instead of SS_LCTRL
* Change TAPPING_TOGGLE from 2 to 3
| -rw-r--r-- | keyboards/doro67/multi/keymaps/konstantin/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | 18 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/melody96/keymaps/konstantin/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/whitefox/keymaps/konstantin/rules.mk | 1 | ||||
| -rw-r--r-- | users/konstantin/config.h | 12 | ||||
| -rw-r--r-- | users/konstantin/konstantin.c | 11 | ||||
| -rw-r--r-- | users/konstantin/konstantin.h | 1 | ||||
| -rw-r--r-- | users/konstantin/rgb.h | 2 | ||||
| -rw-r--r-- | users/konstantin/rules.mk | 2 |
11 files changed, 43 insertions, 8 deletions
diff --git a/keyboards/doro67/multi/keymaps/konstantin/rules.mk b/keyboards/doro67/multi/keymaps/konstantin/rules.mk index 041d32114..c3a73fd84 100644 --- a/keyboards/doro67/multi/keymaps/konstantin/rules.mk +++ b/keyboards/doro67/multi/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | SPACE_CADET_ENABLE = no | 9 | SPACE_CADET_ENABLE = no |
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index d00232205..46cc0a113 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | |||
| @@ -14,8 +14,23 @@ void eeconfig_init_keymap(void) { | |||
| 14 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); | 14 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | bool indicator_light = false; | ||
| 18 | |||
| 17 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | 19 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { |
| 18 | switch (keycode) { | 20 | switch (keycode) { |
| 21 | case RGB_TOG ... RGB_SPD: | ||
| 22 | // Disable RGB controls when Fn/Caps indicator lights are on | ||
| 23 | if (indicator_light) { | ||
| 24 | return false; | ||
| 25 | } | ||
| 26 | // Shift+Toggle = reset RGB | ||
| 27 | if (record->event.pressed && keycode == RGB_TOG && get_mods() & MOD_MASK_SHIFT) { | ||
| 28 | eeconfig_init_keymap(); | ||
| 29 | return false; | ||
| 30 | } | ||
| 31 | break; | ||
| 32 | |||
| 33 | // Combined RCtrl and layer | ||
| 19 | case RCTRL: | 34 | case RCTRL: |
| 20 | if (record->event.pressed) { | 35 | if (record->event.pressed) { |
| 21 | register_code(KC_RCTRL); | 36 | register_code(KC_RCTRL); |
| @@ -33,17 +48,20 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 33 | static inline void fn_light(void) { | 48 | static inline void fn_light(void) { |
| 34 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | 49 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); |
| 35 | rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val()); | 50 | rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val()); |
| 51 | indicator_light = true; | ||
| 36 | } | 52 | } |
| 37 | 53 | ||
| 38 | static inline void caps_light(void) { | 54 | static inline void caps_light(void) { |
| 39 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | 55 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); |
| 40 | rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val()); | 56 | rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val()); |
| 57 | indicator_light = true; | ||
| 41 | } | 58 | } |
| 42 | 59 | ||
| 43 | static inline void restore_light(void) { | 60 | static inline void restore_light(void) { |
| 44 | rgblight_config_t saved = { .raw = eeconfig_read_rgblight() }; | 61 | rgblight_config_t saved = { .raw = eeconfig_read_rgblight() }; |
| 45 | rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val); | 62 | rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val); |
| 46 | rgblight_mode_noeeprom(saved.mode); | 63 | rgblight_mode_noeeprom(saved.mode); |
| 64 | indicator_light = false; | ||
| 47 | } | 65 | } |
| 48 | 66 | ||
| 49 | static void check_light_layer(uint32_t state) { | 67 | static void check_light_layer(uint32_t state) { |
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index 64428383c..c75488af6 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = no | 4 | CONSOLE_ENABLE = no |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | RGBLIGHT_ENABLE = yes | 9 | RGBLIGHT_ENABLE = yes |
diff --git a/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk b/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk index 041d32114..c3a73fd84 100644 --- a/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk +++ b/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | SPACE_CADET_ENABLE = no | 9 | SPACE_CADET_ENABLE = no |
diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk index 995402cb0..5b36eef2c 100644 --- a/keyboards/melody96/keymaps/konstantin/rules.mk +++ b/keyboards/melody96/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = no | 4 | CONSOLE_ENABLE = no |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | RGBLIGHT_ENABLE = yes | 9 | RGBLIGHT_ENABLE = yes |
diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index bced6e8a7..c39175c97 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | SPACE_CADET_ENABLE = no | 9 | SPACE_CADET_ENABLE = no |
diff --git a/users/konstantin/config.h b/users/konstantin/config.h index bc1987c35..dcea9be27 100644 --- a/users/konstantin/config.h +++ b/users/konstantin/config.h | |||
| @@ -2,11 +2,13 @@ | |||
| 2 | 2 | ||
| 3 | #define FORCE_NKRO | 3 | #define FORCE_NKRO |
| 4 | 4 | ||
| 5 | #define MOUSEKEY_DELAY 50 | 5 | #define MOUSEKEY_DELAY 0 |
| 6 | #define MOUSEKEY_INTERVAL 15 | 6 | #define MOUSEKEY_INTERVAL 10 |
| 7 | #define MOUSEKEY_MAX_SPEED 4 | 7 | #define MOUSEKEY_MAX_SPEED 4 |
| 8 | #define MOUSEKEY_TIME_TO_MAX 50 | 8 | #define MOUSEKEY_TIME_TO_MAX 100 |
| 9 | #define MOUSEKEY_WHEEL_MAX_SPEED 1 | 9 | #define MOUSEKEY_WHEEL_DELAY 0 |
| 10 | #define MOUSEKEY_WHEEL_INTERVAL 50 | ||
| 11 | #define MOUSEKEY_WHEEL_MAX_SPEED 4 | ||
| 10 | #define MOUSEKEY_WHEEL_TIME_TO_MAX 50 | 12 | #define MOUSEKEY_WHEEL_TIME_TO_MAX 50 |
| 11 | 13 | ||
| 12 | #define NO_ACTION_FUNCTION | 14 | #define NO_ACTION_FUNCTION |
| @@ -21,7 +23,7 @@ | |||
| 21 | 23 | ||
| 22 | #define PERMISSIVE_HOLD | 24 | #define PERMISSIVE_HOLD |
| 23 | #define TAPPING_TERM 200 | 25 | #define TAPPING_TERM 200 |
| 24 | #define TAPPING_TOGGLE 2 | 26 | #define TAPPING_TOGGLE 3 |
| 25 | 27 | ||
| 26 | #define UNICODE_CYCLE_PERSIST false | 28 | #define UNICODE_CYCLE_PERSIST false |
| 27 | #define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX | 29 | #define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX |
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 9cee25ac6..72aca9fb8 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c | |||
| @@ -69,7 +69,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 69 | case CLEAR: | 69 | case CLEAR: |
| 70 | if (record->event.pressed) { | 70 | if (record->event.pressed) { |
| 71 | CLEAN_MODS( | 71 | CLEAN_MODS( |
| 72 | SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); | 72 | SEND_STRING(SS_LCTL("a") SS_TAP(X_DELETE)); |
| 73 | ) | 73 | ) |
| 74 | } | 74 | } |
| 75 | break; | 75 | break; |
| @@ -117,3 +117,12 @@ void led_set_keymap(uint8_t usb_led) {} | |||
| 117 | void led_set_user(uint8_t usb_led) { | 117 | void led_set_user(uint8_t usb_led) { |
| 118 | led_set_keymap(usb_led); | 118 | led_set_keymap(usb_led); |
| 119 | } | 119 | } |
| 120 | |||
| 121 | __attribute__((weak)) | ||
| 122 | bool led_update_keymap(led_t led_state) { | ||
| 123 | return true; | ||
| 124 | } | ||
| 125 | |||
| 126 | bool led_update_user(led_t led_state) { | ||
| 127 | return led_update_keymap(led_state); | ||
| 128 | } | ||
diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index da2105831..0936e3c3e 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h | |||
| @@ -86,3 +86,4 @@ void keyboard_post_init_keymap(void); | |||
| 86 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); | 86 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record); |
| 87 | uint32_t layer_state_set_keymap(uint32_t state); | 87 | uint32_t layer_state_set_keymap(uint32_t state); |
| 88 | void led_set_keymap(uint8_t usb_led); | 88 | void led_set_keymap(uint8_t usb_led); |
| 89 | bool led_update_keymap(led_t led_state); | ||
diff --git a/users/konstantin/rgb.h b/users/konstantin/rgb.h index cc7d91808..e09c5bd77 100644 --- a/users/konstantin/rgb.h +++ b/users/konstantin/rgb.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #define GODSPEED_BLUE 198, 68, 255 | 5 | #define GODSPEED_BLUE 198, 68, 255 |
| 6 | #define GODSPEED_YELLOW 27, 153, 255 | 6 | #define GODSPEED_YELLOW 27, 153, 255 |
| 7 | #define MODERN_DOLCH_CYAN 110, 255, 108 | 7 | #define MODERN_DOLCH_CYAN 110, 255, 108 |
| 8 | #define MODERN_DOLCH_RED 251, 255, 108 | 8 | #define MODERN_DOLCH_RED 253, 255, 108 |
| 9 | 9 | ||
| 10 | extern const HSV godspeed_blue; | 10 | extern const HSV godspeed_blue; |
| 11 | extern const HSV godspeed_yellow; | 11 | extern const HSV godspeed_yellow; |
diff --git a/users/konstantin/rules.mk b/users/konstantin/rules.mk index bf0ab979f..d989f486c 100644 --- a/users/konstantin/rules.mk +++ b/users/konstantin/rules.mk | |||
| @@ -13,4 +13,4 @@ ifneq (,$(filter yes,$(UNICODE_ENABLE) $(UNICODEMAP_ENABLE))) | |||
| 13 | SRC += unicode.c | 13 | SRC += unicode.c |
| 14 | endif | 14 | endif |
| 15 | 15 | ||
| 16 | EXTRAFLAGS += -flto | 16 | LTO_ENABLE = yes |
