summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorPriyadi Iman Nurcahyo <priyadi@priyadi.net>2017-02-20 21:24:32 +0100
committerPriyadi Iman Nurcahyo <priyadi@priyadi.net>2017-02-20 21:24:32 +0100
commit77f93636757d32f4e2ce6d7295f3d6293af3b462 (patch)
tree73ba76f7564cf60018299efef6f0807516f71435 /keyboards
parentc18d0a83e6eb8f415b288a6f5ababe9ec12ee52b (diff)
downloadqmk_firmware-77f93636757d32f4e2ce6d7295f3d6293af3b462.tar.gz
qmk_firmware-77f93636757d32f4e2ce6d7295f3d6293af3b462.tar.xz
Only process Fnumber on key release, and only when layer is still active
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index 8f712ccfe..cf486b39f 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -1046,6 +1046,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
#endif
+ // only process Fnumber on key release, and only when layer switcher is still pressed.
+ // this is to avoid accidental presses
+ case KC_F1 ... KC_F12:
+ if (!record->event.pressed && layer == _FUN) {
+ register_code(keycode);
+ unregister_code(keycode);
+ }
+ return false;
+ break;
+
// layer switcher
//
case GREEK: