Commit graph

20 commits

Author SHA1 Message Date
Daniel Eklöf
bcf763d417
selection: add a selection API 2019-07-11 17:38:01 +02:00
Daniel Eklöf
1c861e5d69
selection: only left button can be used for selection 2019-07-11 17:38:01 +02:00
Daniel Eklöf
632790d5d8
selection: selections can be made, and are rendered
* Start selection on mouse button down
* Update selection on motion
* Button release cancels selection if there were no motion after start
* Renderer detects cells inside the selection and inverts their colors
2019-07-11 17:38:01 +02:00
Daniel Eklöf
7594edb89b
input: generate BTN_BACK/BTN_FORWARD mouse down events when scrolling 2019-07-10 14:17:44 +02:00
Daniel Eklöf
b058e6384a
scrollback: initial support for mouse scrolling 2019-07-10 09:15:37 +02:00
Daniel Eklöf
bcd111d203
wip: initial scroll back support
Can scroll up and down, and stops when the beginning/end of history is
reached.

However, it probably breaks when the entire scrollback buffer has been
filled - we need to detect when the view has wrapped around to the
current terminal offset.

The detection of when we've reached the bottom of the history is also
flawed, and only works when we overshoot the bottom with at least a
page.

Resizing the windows while in a view most likely doesn't work.

The view will not detect a wrapped around scrollback buffer. I.e. if
the user has scrolled back, and is stationary at a view, but there is
still output being produced. Then eventually the scrollback buffer
will wrap around. In this case, the correct thing to do is make the
view start following the beginning of the history. Right now it
doesn't, meaning once the scrollback buffer wraps around, you'll start
seeing command output...
2019-07-09 16:26:36 +02:00
Daniel Eklöf
cb8c2cdb35
input: split up keymap
This makes the top level table smaller, and faster to search
through. Eventually, we could do something fancy, like b-search the
top level table.
2019-07-09 15:05:07 +02:00
Daniel Eklöf
3dbef02dac
input: implement keypad application mode
This commit also replaces the previous (temporary) key map with a much
more complete one.
2019-07-09 14:27:26 +02:00
Daniel Eklöf
9b5c044b29
terminal: rename and redefine cursor keys mode and keypad keys mode 2019-07-09 11:07:06 +02:00
Daniel Eklöf
b4fdf51752
input: add support for dead keys (composing) 2019-07-09 10:00:54 +02:00
Daniel Eklöf
a959c89b7f
input: bug: row is calculated from the cell *height*, not width 2019-07-05 15:28:39 +02:00
Daniel Eklöf
1610828b8c
vt: add support for mouse motion reports 2019-07-05 15:13:06 +02:00
Daniel Eklöf
e5fc266cdb
vt: add support for \E[?1000h - report mouse button events 2019-07-05 14:24:51 +02:00
Daniel Eklöf
a102ff09f9
input: mouse events 2019-07-05 10:44:57 +02:00
Daniel Eklöf
1373d18dbc
logging: disable debug logging by default 2019-07-03 20:21:03 +02:00
Daniel Eklöf
35e5fa1f76
vt: implement DECCKM (cursor key sends either SS3 or CSI escapes) 2019-06-23 14:12:20 +02:00
Daniel Eklöf
4c7dbee221
input: reduce utf8 buffer size 2019-06-22 20:40:28 +02:00
Daniel Eklöf
faf60108f1
input: add a key mapping table, mapping key syms to escape sequences
At the same time, also add support for the shift modifier.
2019-06-22 20:31:53 +02:00
Daniel Eklöf
8ecd69c500
input: stop key repeater when input focus is lost 2019-06-21 18:40:53 +02:00
Daniel Eklöf
71dde121e6
wip: initial input handling 2019-06-19 10:04:47 +02:00