diff options
author | 2015-08-20 17:14:26 -0400 | |
---|---|---|
committer | 2015-08-20 17:14:46 -0400 | |
commit | 3a5fce339f8dcc22db8cafdfeba7b2748df02d18 (patch) | |
tree | cc8e636cb46b901b782c9bb38bdaa405ae2a8964 /sway/input_state.c | |
parent | Merge pull request #104 from minus7/ipc-get-messages (diff) | |
download | sway-3a5fce339f8dcc22db8cafdfeba7b2748df02d18.tar.gz sway-3a5fce339f8dcc22db8cafdfeba7b2748df02d18.tar.zst sway-3a5fce339f8dcc22db8cafdfeba7b2748df02d18.zip |
Reset key buffer on reload
To preserve my sanity
Diffstat (limited to 'sway/input_state.c')
-rw-r--r-- | sway/input_state.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/input_state.c b/sway/input_state.c index a7f88d4a..7f312c54 100644 --- a/sway/input_state.c +++ b/sway/input_state.c | |||
@@ -8,6 +8,13 @@ | |||
8 | 8 | ||
9 | static keycode key_state_array[KEY_STATE_MAX_LENGTH]; | 9 | static keycode key_state_array[KEY_STATE_MAX_LENGTH]; |
10 | 10 | ||
11 | void input_init(void) { | ||
12 | int i; | ||
13 | for (i = 0; i < KEY_STATE_MAX_LENGTH; ++i) { | ||
14 | key_state_array[i] = 0; | ||
15 | } | ||
16 | } | ||
17 | |||
11 | static uint8_t find_key(keycode key) { | 18 | static uint8_t find_key(keycode key) { |
12 | int i; | 19 | int i; |
13 | for (i = 0; i < KEY_STATE_MAX_LENGTH; ++i) { | 20 | for (i = 0; i < KEY_STATE_MAX_LENGTH; ++i) { |