diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-07 21:43:00 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-07 21:43:00 +0100 |
commit | 55f63935ab9319da8e145b49edc1a7ae3e6782c6 (patch) | |
tree | a854f1068b7360952835b38bc38a1138bf1de7f0 /include/input_state.h | |
parent | Merge pull request #434 from mikkeloscar/detect-modifier (diff) | |
download | sway-55f63935ab9319da8e145b49edc1a7ae3e6782c6.tar.gz sway-55f63935ab9319da8e145b49edc1a7ae3e6782c6.tar.zst sway-55f63935ab9319da8e145b49edc1a7ae3e6782c6.zip |
Implement bindsym --release
This is a "simple" version of --release (same as i3) that only supports
a binding that contain one normal key. e.g.:
bindsym --release $mod+x exec somthing-fun
I didn't bother implementing it for a combination like `$mod+x+z` since
it is a bit tricky to get right and also a bit weird to actually do on a
keyboard.
Diffstat (limited to 'include/input_state.h')
-rw-r--r-- | include/input_state.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/input_state.h b/include/input_state.h index 79e27d91..903301fb 100644 --- a/include/input_state.h +++ b/include/input_state.h | |||
@@ -9,6 +9,9 @@ | |||
9 | // returns true if key has been pressed, otherwise false | 9 | // returns true if key has been pressed, otherwise false |
10 | bool check_key(uint32_t key_sym, uint32_t key_code); | 10 | bool check_key(uint32_t key_sym, uint32_t key_code); |
11 | 11 | ||
12 | // returns true if key_sym matches latest released key. | ||
13 | bool check_released_key(uint32_t key_sym); | ||
14 | |||
12 | // sets a key as pressed | 15 | // sets a key as pressed |
13 | void press_key(uint32_t key_sym, uint32_t key_code); | 16 | void press_key(uint32_t key_sym, uint32_t key_code); |
14 | 17 | ||