diff options
author | tmk <nobody@nowhere> | 2013-10-07 23:28:17 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-10-07 23:28:17 +0900 |
commit | 35f9f30074263a2a738cbfc513fca6d812ddf6ff (patch) | |
tree | bec1e4e96a58eb14feef42b8b1f2057d07ff476a /common/action.c | |
parent | d52d554360d3bf06189bfd4f386fa99348d8a0a8 (diff) | |
download | qmk_firmware-35f9f30074263a2a738cbfc513fca6d812ddf6ff.tar.gz qmk_firmware-35f9f30074263a2a738cbfc513fca6d812ddf6ff.zip |
Add timeout option to MODS_ONESHOT #66
Diffstat (limited to 'common/action.c')
-rw-r--r-- | common/action.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/common/action.c b/common/action.c index ecd5a7e94f..f7ae85b941 100644 --- a/common/action.c +++ b/common/action.c @@ -100,40 +100,29 @@ void process_action(keyrecord_t *record) action.key.mods<<4; switch (action.layer_tap.code) { #ifndef NO_ACTION_ONESHOT - case 0x00: + case MODS_ONESHOT: // Oneshot modifier if (event.pressed) { if (tap_count == 0) { - dprint("MODS_TAP: Oneshot: add_mods\n"); register_mods(mods); } else if (tap_count == 1) { dprint("MODS_TAP: Oneshot: start\n"); set_oneshot_mods(mods); } - else if (tap_count == TAPPING_TOGGLE) { - dprint("MODS_TAP: Oneshot: toggle\n"); - oneshot_toggle(); - } else { - dprint("MODS_TAP: Oneshot: cancel&add_mods\n"); - // double tap cancels oneshot and works as normal modifier. - clear_oneshot_mods(); register_mods(mods); } } else { if (tap_count == 0) { - dprint("MODS_TAP: Oneshot: cancel/del_mods\n"); - // cancel oneshot on hold clear_oneshot_mods(); unregister_mods(mods); } else if (tap_count == 1) { - // Oneshot + // Retain Oneshot mods } else { - dprint("MODS_TAP: Oneshot: del_mods\n"); - // cancel Mods + clear_oneshot_mods(); unregister_mods(mods); } } |