From d699fd1fb4127c9a0c13eaa1348b934ccd639627 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Thu, 23 Jul 2020 10:27:01 -0400 Subject: [PATCH] Switch bcat Chrome OS media keys workaround from mouse keys to NKRO (#9790) * Switch Chrome OS mouse keys workaround to NKRO * Add NKRO toggle to keymaps * USE NK_TOGG keycode instead of defining my own --- keyboards/crkbd/keymaps/bcat/keymap.c | 2 +- keyboards/crkbd/keymaps/bcat/readme.md | 2 +- keyboards/keebio/quefrency/keymaps/bcat/keymap.c | 2 +- keyboards/keebio/quefrency/keymaps/bcat/readme.md | 2 +- keyboards/lily58/keymaps/bcat/keymap.c | 2 +- keyboards/lily58/keymaps/bcat/readme.md | 2 +- .../60_ansi_split_bs_rshift/bcat/keymap.c | 2 +- .../60_ansi_split_bs_rshift/bcat/readme.md | 2 +- layouts/community/60_tsangan_hhkb/bcat/keymap.c | 2 +- layouts/community/60_tsangan_hhkb/bcat/readme.md | 2 +- .../65_ansi_blocker_split_bs/bcat/keymap.c | 2 +- .../65_ansi_blocker_split_bs/bcat/readme.md | 2 +- users/bcat/rules.mk | 15 ++++++++++----- 13 files changed, 22 insertions(+), 17 deletions(-) diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index 60375f6764d..6018835c247 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */ [LAYER_ADJUST] = LAYOUT( - _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______, _______, _______, _______, KC_MUTE, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______, _______, _______, _______, RGB_TOG, _______, _______ diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md index 21594f75c9d..743a6572d26 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -113,7 +113,7 @@ be a better place to put them. ## Adjust layer -![Adjust layer layout](https://i.imgur.com/LEHM4DU.png) +![Adjust layer layout](https://i.imgur.com/fZouko5.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee)) diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index 8ccfa879fb5..e73022d9b60 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ [LAYER_FUNCTION] = LAYOUT_65( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, RGB_HUI, - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, + KC_CAPS, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, _______, KC_APP, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 9499d717592..914aa84b6b1 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -12,6 +12,6 @@ ESDF cluster), and RGB controls in the function layer (on the arrow/nav keys). ## Function layer -![Function layer layout](https://i.imgur.com/Wmx1hfx.png) +![Function layer layout](https://i.imgur.com/Fzshl0F.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d)) diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index a194e1c9dc8..294f9e6c5a3 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7 */ [LAYER_ADJUST] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 270e7473113..6235ff13fcd 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -34,6 +34,6 @@ browser back/forward navigation keys. ## Adjust layer -![Adjust layer layout](https://i.imgur.com/Rv6jQtC.png) +![Adjust layer layout](https://i.imgur.com/Q3PGsiK.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7)) diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c index c52302aeca6..adb31525a89 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function 2 layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ [LAYER_FUNCTION_2] = LAYOUT_60_ansi_split_bs_rshift( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, + _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, BL_INC, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, _______, _______, _______, KC_MUTE, _______, BL_DEC, _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md index 645da6cd0bb..2d578aa3d3e 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md @@ -19,6 +19,6 @@ layout](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_tsa ## Function 2 layer -![Function 2 layer layout](https://i.imgur.com/WRvsEuZ.png) +![Function 2 layer layout](https://i.imgur.com/vJaCzVo.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c)) diff --git a/layouts/community/60_tsangan_hhkb/bcat/keymap.c b/layouts/community/60_tsangan_hhkb/bcat/keymap.c index aa70c913295..2079adb93cb 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/keymap.c +++ b/layouts/community/60_tsangan_hhkb/bcat/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function 2 layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */ [LAYER_FUNCTION_2] = LAYOUT_60_tsangan_hhkb( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, + _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, BL_INC, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, _______, _______, _______, KC_MUTE, _______, BL_DEC, _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/layouts/community/60_tsangan_hhkb/bcat/readme.md b/layouts/community/60_tsangan_hhkb/bcat/readme.md index b4eddfcf045..b7a3cde5d29 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/readme.md +++ b/layouts/community/60_tsangan_hhkb/bcat/readme.md @@ -39,6 +39,6 @@ and/or blockers, so there aren't switches installed in those positions. ## Function 2 layer -![Function 2 layer layout](https://i.imgur.com/37APm7c.png) +![Function 2 layer layout](https://i.imgur.com/vdNpFae.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4)) diff --git a/layouts/community/65_ansi_blocker_split_bs/bcat/keymap.c b/layouts/community/65_ansi_blocker_split_bs/bcat/keymap.c index 221fcfba598..75b891cda0c 100644 --- a/layouts/community/65_ansi_blocker_split_bs/bcat/keymap.c +++ b/layouts/community/65_ansi_blocker_split_bs/bcat/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ [LAYER_FUNCTION] = LAYOUT_65_ansi_blocker_split_bs( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, _______, - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, + KC_CAPS, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/layouts/community/65_ansi_blocker_split_bs/bcat/readme.md b/layouts/community/65_ansi_blocker_split_bs/bcat/readme.md index c7ea966d8d4..0726cbecee2 100644 --- a/layouts/community/65_ansi_blocker_split_bs/bcat/readme.md +++ b/layouts/community/65_ansi_blocker_split_bs/bcat/readme.md @@ -12,6 +12,6 @@ keys, an HHKB-style (split) backspace, and media controls in the function layer ## Function layer -![Function layer layout](https://i.imgur.com/Q304GlI.png) +![Function layer layout](https://i.imgur.com/CsxfVfd.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44)) diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index f979c703f84..a595d1f588e 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -3,10 +3,15 @@ SRC += bcat.c # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. BOOTMAGIC_ENABLE = lite -# Enable media keys on all keyboards. (Even though I don't use mouse keys, they -# seem to be required for media keys to register on Chrome OS.) +# Enable media keys on all keyboards. EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes + +# Enable N-key rollover on all keyboards. In addition to its intended +# functionality, as of July 2020, this is required for Chrome OS to process +# media keys. (It appears that Chrome OS filters out key events from the second +# USB endpoint's consumer and system control devices unless that endpoint also +# reports a keyboard or mouse device.) +NKRO_ENABLE = yes # Enable link-time optimization to reduce binary size. LINK_TIME_OPTIMIZATION_ENABLE = yes @@ -14,7 +19,7 @@ LINK_TIME_OPTIMIZATION_ENABLE = yes # Disable unused build options on all keyboards. COMMAND_ENABLE = no CONSOLE_ENABLE = no -NKRO_ENABLE = no +MOUSEKEY_ENABLE = no TERMINAL_ENABLE = no # Disable unused hardware options on all keyboards. @@ -22,7 +27,7 @@ FAUXCLICKY_ENABLE = no MIDI_ENABLE = no SLEEP_LED_ENABLE = no -# Disable unused other options. +# Disable other unused options on all keyboards. API_SYSEX_ENABLE = no AUTO_SHIFT_ENABLE = no COMBO_ENABLE = no