diff options
author | tmk <nobody@nowhere> | 2013-10-04 03:30:09 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-10-04 16:04:31 +0900 |
commit | d52d554360d3bf06189bfd4f386fa99348d8a0a8 (patch) | |
tree | b05d27552402f371e61aa0f29906a60c87e213ad /common/action_oneshot.h | |
parent | cb434cfebc607db15b52a42adae6423bd40f1f98 (diff) |
Fix mod stuck of MODS_KEY when leaving layer #62
- Add action_util.c and remove action_oneshot.c
- Add oneshot_mods for MODS_ONESHOT
- Add weak_mods for MODS_KEY and MACRO
- weak_mods is cleared when layer switching
Diffstat (limited to 'common/action_oneshot.h')
-rw-r--r-- | common/action_oneshot.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/common/action_oneshot.h b/common/action_oneshot.h deleted file mode 100644 index 36ef9e9bce..0000000000 --- a/common/action_oneshot.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2013 Jun Wako <wakojun@gmail.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ -#ifndef ACTION_ONESHOT_H -#define ACTION_ONESHOT_H - -#include <stdint.h> -#include <stdbool.h> - -#ifdef NO_ACTION_TAPPING - #define NO_ACTION_ONESHOT -#endif - -#ifndef NO_ACTION_ONESHOT -/* Oneshot modifier - * - * Problem: Want to capitalize like 'The' but the result tends to be 'THe'. - * Solution: Oneshot modifier have its effect on only one key coming next. - * Tap Shift, then type 't', 'h' and 'e'. Not need to hold Shift key. - * - * Hold: works as normal modifier. - * Tap: one shot modifier. - * 2 Tap: cancel one shot modifier. - * 5-Tap: toggles enable/disable oneshot feature. - */ -typedef struct { - uint8_t mods; - bool disabled; -} oneshot_state_t; - - -oneshot_state_t oneshot_state; - -void oneshot_start(uint8_t mods); -void oneshot_cancel(void); -void oneshot_toggle(void); -#endif - -#endif |