aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-05 17:33:01 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-05 17:33:01 +0000
commita82f12dd2bc80d692ce6e13b3521b942027ee7cf (patch)
tree2c77c70b5ab2b755bdd329f2bf09527c54ed1252 /terminal.h
parentselection: 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.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/terminal.h b/terminal.h
index 195ad26b..4a090f91 100644
--- a/terminal.h
+++ b/terminal.h
@@ -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;