-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework bcat Crkbd and Lily58 modifier keys (#9692)
* Re-enable mouse keys to fix Chrome OS media keys I'm not sure if there's a bug in Chrome OS, QMK, or both, but EXTRAKEY_ENABLE isn't sufficient for media keys to work on Chrome OS. Instead, MOUSEKEY_ENABLE is also required. * Remove unnecessary SPLIT_USB_DETECT for Lily58 I've since swapped my Lily58 back to Elite-C v2 controllers with working VBUS detection. * Move Crkbd Esc and Ctrl keys; add some shortcuts * Move MC_ALTT to userspace for cross-board support * Sync Lily58 keymap with Crkbd * Fix typos
- Loading branch information
Showing
8 changed files
with
109 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
#pragma once | ||
|
||
#define EE_HANDS | ||
|
||
/* Work around Elite-C v3 with broken VBUS detection. */ | ||
#define SPLIT_USB_DETECT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,43 @@ | ||
#include "quantum.h" | ||
#include "bcat.h" | ||
|
||
#if defined(RGBLIGHT_ENABLE) | ||
/* Adjust RGB static hue ranges for shorter gradients than default. */ | ||
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15}; | ||
#endif | ||
|
||
static int8_t alt_tab_layer = -1; | ||
|
||
__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
if (!process_record_keymap(keycode, record)) { | ||
return false; | ||
} | ||
switch (keycode) { | ||
/* Alt+Tab that holds Alt until current layer is released: */ | ||
case MC_ALTT: | ||
if (record->event.pressed) { | ||
if (alt_tab_layer < 0) { | ||
alt_tab_layer = layer_switch_get_layer(record->event.key); | ||
register_code(KC_LALT); | ||
} | ||
register_code(KC_TAB); | ||
} else { | ||
unregister_code(KC_TAB); | ||
} | ||
return false; | ||
default: | ||
return true; | ||
} | ||
} | ||
|
||
__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } | ||
|
||
layer_state_t layer_state_set_user(layer_state_t state) { | ||
state = layer_state_set_keymap(state); | ||
if (alt_tab_layer >= 0 && !layer_state_cmp(state, alt_tab_layer)) { | ||
unregister_code(KC_LALT); | ||
alt_tab_layer = -1; | ||
} | ||
return state; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
|
||
#include "quantum.h" | ||
|
||
enum user_keycodes { | ||
MC_ALTT = SAFE_RANGE, | ||
KEYMAP_SAFE_RANGE, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters