mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-10 10:39:09 +00:00
Fix the process_record_nocache function
This function relies on checking the disable_action_cache static variable before accessing the layer cache.
This commit is contained in:
parent
cc7acfb416
commit
644c8c7927
1 changed files with 12 additions and 10 deletions
|
@ -46,6 +46,8 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||||
uint16_t keycode;
|
uint16_t keycode;
|
||||||
|
|
||||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
|
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
|
||||||
|
/* TODO: Use store_or_get_action() or a similar function. */
|
||||||
|
if (!disable_action_cache) {
|
||||||
uint8_t layer;
|
uint8_t layer;
|
||||||
|
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
|
@ -55,9 +57,9 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||||
layer = read_source_layers_cache(key);
|
layer = read_source_layers_cache(key);
|
||||||
}
|
}
|
||||||
keycode = keymap_key_to_keycode(layer, key);
|
keycode = keymap_key_to_keycode(layer, key);
|
||||||
#else
|
} else
|
||||||
keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
|
|
||||||
#endif
|
#endif
|
||||||
|
keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
|
||||||
|
|
||||||
// This is how you use actions here
|
// This is how you use actions here
|
||||||
// if (keycode == KC_LEAD) {
|
// if (keycode == KC_LEAD) {
|
||||||
|
|
Loading…
Reference in a new issue