From ab26a2a02daa7615ff7b438cb55599003556b23d Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 6 Sep 2019 15:34:57 -0500 Subject: [PATCH 1/6] Turn off more unnecessary features by default --- users/bcat/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index 59f82709ad36..407729c82bb2 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -9,3 +9,5 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no COMMAND_ENABLE = no NKRO_ENABLE = no +UNICODE_ENABLE = no +API_SYSEX_ENABLE = no From b60c50e29fd15c19e02e0f3be26ef72a61091503 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 6 Sep 2019 15:37:48 -0500 Subject: [PATCH 2/6] Double TAP_CODE_DELAY due to more media key issues Even with this change, some of the rotary encoder turns on my BDN9's volume knob still seem to get dropped. It's possible there's something wrong with the encoder itself. (Maybe the TAP_CODE_DELAY actually causes QMK to miss an encoder turn? Unclear.) The other knob (backlight brightness) works fine, FWIW.... --- users/bcat/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/bcat/config.h b/users/bcat/config.h index 7d420089556f..d1bd184002aa 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -1,7 +1,7 @@ -/* Delay between tap_code register and unregister to fix flaky media keys. */ +/* Wait between tap_code register and unregister to fix flaky media keys. */ #undef TAP_CODE_DELAY -#define TAP_CODE_DELAY 10 +#define TAP_CODE_DELAY 20 /* Turn off RGB lighting when the host goes to sleep. */ #define RGBLIGHT_SLEEP From 1a25c783e754e6f30456ef4f09416e9f70c70905 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 6 Sep 2019 15:40:58 -0500 Subject: [PATCH 3/6] Restructure userspace config.h a bit --- users/bcat/config.h | 74 ++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/users/bcat/config.h b/users/bcat/config.h index d1bd184002aa..38972e7dacb3 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -3,34 +3,46 @@ #define TAP_CODE_DELAY 20 -/* Turn off RGB lighting when the host goes to sleep. */ -#define RGBLIGHT_SLEEP - -/* Keep backlight and RGB level increments consistent across keyboards. */ -#undef BACKLIGHT_LEVELS -#undef RGBLIGHT_HUE_STEP -#undef RGBLIGHT_SAT_STEP -#undef RGBLIGHT_VAL_STEP - -#define BACKLIGHT_LEVELS 7 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* Make mouse operation smoother. */ -#undef MOUSEKEY_DELAY -#undef MOUSEKEY_INTERVAL - -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_INTERVAL 16 - -/* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ -#undef MOUSEKEY_MAX_SPEED -#undef MOUSEKEY_TIME_TO_MAX -#undef MOUSEKEY_WHEEL_MAX_SPEED -#undef MOUSEKEY_WHEEL_TIME_TO_MAX - -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_TIME_TO_MAX 150 -#define MOUSEKEY_WHEEL_MAX_SPEED 3 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 150 +#if defined(RGBLIGHT_ENABLE) + /* Turn off RGB underglow when the host goes to sleep. */ + #define RGBLIGHT_SLEEP + + /* Keep RGB underglow level increments consistent across keyboards. */ + #undef RGBLIGHT_HUE_STEP + #undef RGBLIGHT_SAT_STEP + #undef RGBLIGHT_VAL_STEP + + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#endif + +#if defined(BACKLIGHT_ENABLE) + /* Enable backlight breathing across the board. */ + #define BACKLIGHT_BREATHING + + /* Keep backlight level increments consistent across keyboards. */ + #undef BACKLIGHT_LEVELS + + #define BACKLIGHT_LEVELS 7 +#endif + +#if defined(MOUSEKEY_ENABLE) + /* Make mouse operation smoother. */ + #undef MOUSEKEY_DELAY + #undef MOUSEKEY_INTERVAL + + #define MOUSEKEY_DELAY 0 + #define MOUSEKEY_INTERVAL 16 + + /* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ + #undef MOUSEKEY_MAX_SPEED + #undef MOUSEKEY_TIME_TO_MAX + #undef MOUSEKEY_WHEEL_MAX_SPEED + #undef MOUSEKEY_WHEEL_TIME_TO_MAX + + #define MOUSEKEY_MAX_SPEED 7 + #define MOUSEKEY_TIME_TO_MAX 150 + #define MOUSEKEY_WHEEL_MAX_SPEED 3 + #define MOUSEKEY_WHEEL_TIME_TO_MAX 150 +#endif From 0840f84672c570b65eefbcc94d935fe49e579558 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 6 Sep 2019 15:51:20 -0500 Subject: [PATCH 4/6] Hack around Instant60 Via EEPROM conflict Remove this when #6589 is fixed for Via boards. --- users/bcat/config.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/users/bcat/config.h b/users/bcat/config.h index 38972e7dacb3..990fda68cad1 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -46,3 +46,21 @@ #define MOUSEKEY_WHEEL_MAX_SPEED 3 #define MOUSEKEY_WHEEL_TIME_TO_MAX 150 #endif + +#if defined(KEYBOARD_cannonkeys_instant60) + /* + * Work around EEPROM incompatibility with VIA: + * https://github.com/qmk/qmk_firmware/issues/6589#issuecomment-524042457. + */ + #undef EEPROM_MAGIC_ADDR + #undef EEPROM_VERSION_ADDR + #undef DYNAMIC_KEYMAP_EEPROM_ADDR + #undef EEPROM_CUSTOM_BACKLIGHT + #undef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + + #define EEPROM_MAGIC_ADDR 34 + #define EEPROM_VERSION_ADDR 36 + #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 + #define EEPROM_CUSTOM_BACKLIGHT 637 + #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 638 +#endif From 69eebb7fff39ca6a5176f547ebb8a1d01f54a88a Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 6 Sep 2019 15:52:26 -0500 Subject: [PATCH 5/6] Add backlight breathing and (EEPROM) reset to BDN9 --- keyboards/keebio/bdn9/keymaps/bcat/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c index 3507aaedec40..7eab7217343c 100644 --- a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c @@ -11,14 +11,14 @@ enum layer { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* First layer (F1-F6) */ [LAYER_FIRST] = LAYOUT( - KC_MUTE, LY_SECND, BL_TOGG, + KC_MUTE, LY_SECND, BL_BRTG, KC_F4, KC_F5, KC_F6, KC_F1, KC_F2, KC_F3 ), /* Second layer (F7-F12) */ [LAYER_SECOND] = LAYOUT( - _______, _______, _______, + EEP_RST, _______, RESET, KC_F10, KC_F11, KC_F12, KC_F7, KC_F8, KC_F9 ), From 5c8725019a908d82e473ca99b4be6ffb900b3ff0 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 6 Sep 2019 16:01:14 -0500 Subject: [PATCH 6/6] Add keymap for 9-Key macropad --- keyboards/9key/keymaps/bcat/keymap.c | 26 ++++++++++++++++++++++++++ keyboards/9key/keymaps/bcat/readme.md | 5 +++++ keyboards/9key/keymaps/bcat/rules.mk | 1 + 3 files changed, 32 insertions(+) create mode 100644 keyboards/9key/keymaps/bcat/keymap.c create mode 100644 keyboards/9key/keymaps/bcat/readme.md create mode 100644 keyboards/9key/keymaps/bcat/rules.mk diff --git a/keyboards/9key/keymaps/bcat/keymap.c b/keyboards/9key/keymaps/bcat/keymap.c new file mode 100644 index 000000000000..c42bc76c2540 --- /dev/null +++ b/keyboards/9key/keymaps/bcat/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_FUNCTION, +}; + +/* Switch to function layer when held. */ +#define LY_FUNC MO(LAYER_FUNCTION) + +/* Send Ctrl+Alt+L (Cinnamon screen lock shortcut) when pressed. */ +#define KY_LOCK LCA(KC_L) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_DEFAULT] = LAYOUT( + KC_MPLY, KC_VOLU, KC_MSTP, + KC_MPRV, KC_VOLD, KC_MNXT, + KY_LOCK, KC_MUTE, LY_FUNC + ), + + [LAYER_FUNCTION] = LAYOUT( + EEP_RST, _______, RESET, + _______, _______, _______, + _______, _______, _______ + ), +}; diff --git a/keyboards/9key/keymaps/bcat/readme.md b/keyboards/9key/keymaps/bcat/readme.md new file mode 100644 index 000000000000..2dee51de8b52 --- /dev/null +++ b/keyboards/9key/keymaps/bcat/readme.md @@ -0,0 +1,5 @@ +# bcat's 9-Key layout + +This is a super simple PCB-mount macropad with nine keys, used at work for +media keys and quick access to screen lock on Linux (Cinnamon desktop +environment). diff --git a/keyboards/9key/keymaps/bcat/rules.mk b/keyboards/9key/keymaps/bcat/rules.mk new file mode 100644 index 000000000000..0ecc2bd66147 --- /dev/null +++ b/keyboards/9key/keymaps/bcat/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = caterina # Pro Micro