Merge pull request #647 from Vifon/process_record_nocache-fix

Fix the process_record_nocache function
master
Jack Humbert 2016-08-17 21:16:49 -04:00 committed by GitHub
commit 39a95897bc
1 changed files with 12 additions and 10 deletions

View File

@ -46,18 +46,20 @@ 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)
uint8_t layer; /* TODO: Use store_or_get_action() or a similar function. */
if (!disable_action_cache) {
uint8_t layer;
if (record->event.pressed) { if (record->event.pressed) {
layer = layer_switch_get_layer(key); layer = layer_switch_get_layer(key);
update_source_layers_cache(key, layer); update_source_layers_cache(key, layer);
} else { } else {
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) {