diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-11-08 23:26:56 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-11-08 23:26:56 +0000 |
commit | 66957412d5d68c78c5885bbeb11dd7e3a3d84997 (patch) | |
tree | e1b74261793c031ebf47a1997d3964268c28f483 /tmux.h | |
parent | ac6092c27fa622671b7a83ec557ba09b5ff83e59 (diff) | |
download | rtmux-66957412d5d68c78c5885bbeb11dd7e3a3d84997.tar.gz rtmux-66957412d5d68c78c5885bbeb11dd7e3a3d84997.tar.bz2 rtmux-66957412d5d68c78c5885bbeb11dd7e3a3d84997.zip |
Sync OpenBSD patchset 508:
Switch tty key input over to happen on a read event. This is a bit more
complicated because of escape input, but in that case instead of processing a
key immediately, schedule a timer and reprocess the bufer when it expires.
This currently assumes that keys will be atomic (ie that if eg F1 is pressed
the entire sequence is present in the buffer). This is usually but not always
true, a change in the tree format so it can differentiate potential (partial)
key sequences will happens soon and will allow this to be fixed.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.507 2009-11-08 23:24:59 tcunha Exp $ */ +/* $Id: tmux.h,v 1.508 2009-11-08 23:26:56 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1001,7 +1001,9 @@ struct tty { int term_flags; - struct timeval key_timer; + void (*key_callback)(int, struct mouse_event *, void *); + void *key_data; + struct event key_timer; size_t ksize; /* maximum key size */ RB_HEAD(tty_keys, tty_key) ktree; @@ -1359,7 +1361,7 @@ int tty_keys_cmp(struct tty_key *, struct tty_key *); RB_PROTOTYPE(tty_keys, tty_key, entry, tty_keys_cmp); void tty_keys_init(struct tty *); void tty_keys_free(struct tty *); -int tty_keys_next(struct tty *, int *, struct mouse_event *); +int tty_keys_next(struct tty *); /* options-cmd.c */ const char *set_option_print( |