summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
AgeCommit message (Collapse)Author
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-05-22Store client in tty struct directly instead of using a callback functionNicholas Marriott
pointer.
2012-05-22Store mouse data in tty structure not on the stack.Nicholas Marriott
2012-04-22Handle partial keys properly by making sure the timer has actuallyNicholas Marriott
expired, fixes problems with mintty reported by Michael Simpson.
2012-03-21Some terminals respond to secondary DA with primary (they ignore theNicholas Marriott
intermediate character). So ignore the possible responses to primary DA.
2012-03-17On xterm 271 and later, put the terminal into SCL 5 and use DECCRA forNicholas Marriott
scrolling the region in panes (if the large region check isn't hit). With help from Ailin Nemui.
2012-03-17Check event_initialized before event_del if event may not have been setNicholas Marriott
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.
2012-03-15Send secondary DA to terminals with XT in terminfo when starting up andNicholas Marriott
parse it to work out the xterm version.
2011-03-04Two fixes by Micah Cowan: make mouse work properly beyond >127 on signedNicholas Marriott
char architectures and properly parse $TMUX by stopping the socket path at the first comma.
2011-01-03Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262Nicholas Marriott
and supports larger terminals than the older way. If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all UTF-8 terminals. The option defaults to on if LANG etc are set in the same manner as the utf8 option. With help and based on code from hsim at gmx.li.
2011-01-01Key table should be const.Nicholas Marriott
2010-05-31When the mode-mouse option is on, support dragging to make a selectionNicholas Marriott
in copy mode. Also support the scroll wheel, although xterm strangely does not ignore it in application mouse mode, causing redraw artifacts when scrolling up (other terminals appear to be better behaved).
2010-03-22Accept a full key match (not a partial) even if there is data left inNicholas Marriott
the buffer.
2009-12-17Allow keys to be replaced and reorder the table so that terminfo-defined keysNicholas Marriott
(or terminal-overrides) take precedence over internally defined.
2009-12-14New server option, escape-time, to set the timeout used to detect if escapesNicholas Marriott
are alone or part of a function key or meta sequence.
2009-12-03Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott
time now I've configured emacs to make them displayed in really annoying colours...
2009-12-01Look for mice and xterm keys before standard function keys as they are lessNicholas Marriott
likely to be partial versions.
2009-11-30Handle partial xterm function key sequences.Nicholas Marriott
2009-11-26Continue rather than returning if not a mouse key, to avoid hanging on anyNicholas Marriott
function key...
2009-11-26Remove a couple of unused arguments where possible, and add /* ARGSUSED */ toNicholas Marriott
the rest to reduce lint output.
2009-11-26Handle the possibility of partial mouse reads, and fix a comment while here.Nicholas Marriott
2009-11-12Support rxvt-style keys again, but this time: support all the variations, putNicholas Marriott
them in as raw escape sequences rather than fiddling with the values from terminfo, put them /after/ the terminfo values so the latter take precedence.
2009-11-10Twiddling the last bit is an rxvtism, so do not support it in the table byNicholas Marriott
default.
2009-11-09The input key should be a u_char. Fixes top-bit-set input problem reported byNicholas Marriott
ajacoutot@.
2009-11-09Constify buf.Nicholas Marriott
2009-11-05Unused variable. Aargh.Nicholas Marriott
2009-11-05Switch the tty key tree over to an (unbalanced) ternary tree which allowsNicholas Marriott
partial matches to be done (they wait for further data or a timer to expire, like a naked escape). Mouse and xterm-style keys still expect to be atomic.
2009-11-05Key flags are only used for initialisation so they are not needed in the mainNicholas Marriott
tty_key struct.
2009-11-05Switch tty key input over to happen on a read event. This is a bit moreNicholas Marriott
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.
2009-11-04Switch tty fds over to a bufferevent.Nicholas Marriott
2009-10-26Not all terminals swap CSI and SS3 on ctrl, so remove that.Nicholas Marriott
Also mark the rxvt special-cases as such until terminfo is updated to have kLFT5, kRIT5 etc.
2009-10-26Rewrite xterm-keys code (both input and output) so that works (doesn't alwaysNicholas Marriott
output the same modifiers, accepts all the possible input keys) and is more understandable.
2009-10-26Support the (mostly new) function key+modifier caps (kIC-kIC7). Most of theseNicholas Marriott
will be caught (soon) by the xterm keys code in xterm itself but some other descriptions such as rxvt define them as well.
2009-10-26As we always put the cursor keys into application mode, assume keys sentNicholas Marriott
with CSI have ctrl. Also add a couple of comments.
2009-10-26Tidy up table.Nicholas Marriott
2009-10-26Rename keypad keys to something more useful.Nicholas Marriott
2009-10-26Remove the xterm-keys code which is broken (a replacement is coming but someNicholas Marriott
more cleanup is needed first).
2009-10-11Clean up by introducing a wrapper struct for mouse clicks rather than passingNicholas Marriott
three u_chars around. As a side-effect this fixes incorrectly rejecting high cursor positions (because it was comparing them as signed char), reported by Tom Doherty.
2009-09-20Regularise some fatal messages.Nicholas Marriott
2009-07-26Detect backspace by looking at termios VERASE and translate it into \177 (whichNicholas Marriott
matches screen's behaviour if not its termcap/terminfo entry). The terminfo kbs cap is often wrong or missing so it can't be used, and just assuming \177 may be wrong.
2009-07-21Tidy up keys: use an enum for the key codes, and remove the macros which justNicholas Marriott
wrap flag sets/clears/tests.
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti