summaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
authorXyverz <xyverz@gmail.com>2016-08-17 23:53:56 -0700
committerXyverz <xyverz@gmail.com>2016-08-17 23:53:56 -0700
commit385b827c858d492e8ebafd85bac32ab738292d41 (patch)
tree169024032cff358909387b08ad31fed4ceee8617 /quantum/quantum.c
parent5c5c3e626b7f2e4a5835988c069c7154f347c4ca (diff)
parent8144ce8852f690d5772d80ed2b96ae4af201e266 (diff)
Merge remote-tracking branch 'upstream/master'
this merge is necessary,
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index bc2da510f2..cb1ba04ffb 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -46,18 +46,20 @@ bool process_record_quantum(keyrecord_t *record) {
uint16_t keycode;
#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) {
- layer = layer_switch_get_layer(key);
- update_source_layers_cache(key, layer);
- } else {
- layer = read_source_layers_cache(key);
- }
- keycode = keymap_key_to_keycode(layer, key);
- #else
- keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
+ if (record->event.pressed) {
+ layer = layer_switch_get_layer(key);
+ update_source_layers_cache(key, layer);
+ } else {
+ layer = read_source_layers_cache(key);
+ }
+ keycode = keymap_key_to_keycode(layer, key);
+ } else
#endif
+ keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
// This is how you use actions here
// if (keycode == KC_LEAD) {
@@ -87,6 +89,9 @@ bool process_record_quantum(keyrecord_t *record) {
#ifdef UNICODE_ENABLE
process_unicode(keycode, record) &&
#endif
+ #ifdef UCIS_ENABLE
+ process_ucis(keycode, record) &&
+ #endif
true)) {
return false;
}