diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-08-05 17:33:01 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-08-05 17:33:01 +0000 |
| commit | a82f12dd2bc80d692ce6e13b3521b942027ee7cf (patch) | |
| tree | 2c77c70b5ab2b755bdd329f2bf09527c54ed1252 /terminal.h | |
| parent | selection: mark-word using spaces only as word separator (diff) | |
input: use a timer fd to handle keyboard key repeat
Instead of running a repeater thread that writes the key to repeat
over a pipe, use a simple timer fd.
No more locking or condition signalling. No need to track
start/stop/exist states.
We simply set up the initial timeout value to be the 'delay', and the
interval to be the repeat 'rate'.
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -156,12 +156,7 @@ struct kbd { struct xkb_compose_table *xkb_compose_table; struct xkb_compose_state *xkb_compose_state; struct { - mtx_t mutex; - cnd_t cond; - int trigger; - int pipe_read_fd; - int pipe_write_fd; - enum {REPEAT_STOP, REPEAT_START, REPEAT_EXIT} cmd; + int fd; bool dont_re_repeat; int32_t delay; |
