448 Commits

Author SHA1 Message Date
Mitchell Hashimoto
7012ee36eb shift+click to override "grabbed" mouse events and select 2023-06-25 16:03:57 -07:00
Mitchell Hashimoto
1607cccf73 mouse shift-click only continues previous event if selection is active 2023-06-25 15:53:05 -07:00
Mitchell Hashimoto
56f8e39e5b Update zig, mach, fmt 2023-06-25 11:08:20 -07:00
Mitchell Hashimoto
ce47bdb874 log emoji font as info, log that fonts are using default 2023-06-23 13:18:29 -07:00
Mitchell Hashimoto
553e09eff9 apprt/embedded: new surfaces inherit last focused 2023-05-31 19:12:01 -07:00
Mitchell Hashimoto
a158813a3d app keeps track of last focused surface 2023-05-31 18:59:40 -07:00
Thorsten Ball
1d772d1717 Handle non-printable characters when ctrl is pressed
This extends the list of characters we convert to non-printable
characters when control is pressed by adding `backslash`,
`left_bracket`, `right_bracket` to the list.

This is based on the "Legacy `ctrl` mapping of ASCII keys" section in
the Kitty documentation [0]. That page also links to the VT100
documentation [1] that contains Table 3-5, which shows the same mappings
at the Kitty documentation.

I started out wanting to add only `left_bracket` because I very often
use ctrl+[ to escape insert mode in Vim (it maps to escape), but then
added `backslash`, `right_bracket` too because they're next in the list
and having `ctrl+right_bracket` mapped also makes it work in Vim as the
default go-to-def combination.

Why not complete the whole table? Some keys aren't yet handled in
`input.zig`, such as `circumflex` (not defined), and mitchellh said that
it'd require more elaborate handling of different keyboard layouts. So
instead of adding something that might be wrong, I tried to add what I
knew (and tested) to work.

[0]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#legacy-ctrl-mapping-of-ascii-keys
[1]: https://vt100.net/docs/vt100-ug/chapter3.html
2023-05-31 06:24:19 +02:00
Mitchell Hashimoto
7b651627d5 core: surface confirm close logic updated to handle semantic prompts 2023-05-27 16:00:35 -07:00
Jack Pearkes
3c49ece069 pass through confirm close config in surface 2023-04-05 13:15:34 -07:00
Mitchell Hashimoto
4d41b3ff54 Merge pull request #134 from mitchellh/gtk-confirm
gtk, macos: show confirmation dialog on surface close with active child process
2023-03-26 10:59:09 -07:00
Mitchell Hashimoto
3689f1fe39 apprt/gtk: only show exit confirmation if process is alive 2023-03-25 16:36:12 -07:00
Mitchell Hashimoto
67d3507f9a apprt/glfw: new keycallback for unmapped 2023-03-25 15:40:49 -07:00
Mitchell Hashimoto
5f5700259f shift-click extends selection 2023-03-21 21:12:15 -07:00
Mitchell Hashimoto
35fe74e599 core: scroll the surface when mouse is pulled above or below surface 2023-03-21 21:02:25 -07:00
Mitchell Hashimoto
dfb40426a0 move selection to screen 2023-03-21 10:43:50 -07:00
Mitchell Hashimoto
d9f41b4fa6 scroll viewport to bottom on certain character write events
Fixes #120
2023-03-20 20:58:00 -07:00
Mitchell Hashimoto
b1af02941a terminal: implement focus event mode 1004
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-FocusIn_FocusOut
2023-03-20 15:20:14 -07:00
Mitchell Hashimoto
b0b3b0af2d update config messages use pointers now to make messages small again 2023-03-19 10:48:42 -07:00
Mitchell Hashimoto
e84fb55e2c surface mouse_interval is dynamically update-able 2023-03-19 10:14:28 -07:00
Mitchell Hashimoto
8f0be3ad9e termio: use DerivedConfig 2023-03-19 10:09:17 -07:00
Mitchell Hashimoto
7eda21d544 surface propagates new config to renderer 2023-03-19 09:50:55 -07:00
Mitchell Hashimoto
f34da17a11 renderer: use a DerivedConfig to avoid the main Config pointer 2023-03-19 09:50:54 -07:00
Mitchell Hashimoto
f5c1dfa374 reload_config keybinding (defaults to ctrl+alt+super+space) 2023-03-19 09:50:53 -07:00
Mitchell Hashimoto
3e1f975551 move config loading into apprt to prep for reloading 2023-03-19 09:50:17 -07:00
Mitchell Hashimoto
9b10b5d716 surface doesn't store a pointer to Config anymore 2023-03-19 09:49:44 -07:00
Mitchell Hashimoto
91c9655475 remove unused function, make apprt surface close mandatory 2023-03-18 19:33:08 -07:00
Mitchell Hashimoto
00c837e0d2 apprt: all implement close surface 2023-03-18 19:25:54 -07:00
Mitchell Hashimoto
d83bf5aeb4 termio: close surface on process exit 2023-03-18 19:21:28 -07:00
Mitchell Hashimoto
f02dc2f32f handle horizontal scrolling for mouse reports 2023-03-17 19:24:18 -07:00
Mitchell Hashimoto
1b88f7e9ab support mouse alt scroll (mode 1007)
This enables less and other older legacy programs to get mouse scroll
events
2023-03-17 19:10:08 -07:00
Mitchell Hashimoto
04c38ef3b0 macos: change focus callback to use an enum so we can get other dirs 2023-03-11 17:44:00 -08:00
Mitchell Hashimoto
b582691185 macos: hook up all the bindings so we're ready to handle focus event 2023-03-11 16:22:04 -08:00
Mitchell Hashimoto
dc6e5e1437 macos: fix bug where like... 5 terminals were being launched in the
background
2023-03-09 11:40:47 -08:00
Mitchell Hashimoto
6c857877e8 apprt/embedded: close surface callback 2023-03-08 15:05:15 -08:00
Mitchell Hashimoto
8ce6f349f8 input: new_split binding, can parse enums 2023-03-08 08:57:38 -08:00
Mitchell Hashimoto
e882c21c04 disable double/tripclick highlighting if mouse reporting is enabled 2023-03-04 14:24:40 -08:00
Mitchell Hashimoto
d309007ec0 fix mouse position recording for x10 format
I don't know when this broke since I swear this was working before...
2023-03-04 14:17:12 -08:00
Mitchell Hashimoto
89d07fcd83 clear_history binding, default Cmd+K 2023-03-03 09:27:47 -08:00
Mitchell Hashimoto
ce86c64b42 update zig, src for loops 2023-02-27 21:46:42 -08:00
Mitchell Hashimoto
6c6a3d6a5d "goto_tab" key binding to jump to a specific tab, defaults to Super+N
The apprt surface must implement `gotoTab` to make this work. This is
only implemented in GTK for now.
2023-02-25 10:48:38 -08:00
Mitchell Hashimoto
7a0411d65a apprt: move newTab to a surface callback rather than app 2023-02-25 10:38:19 -08:00
Mitchell Hashimoto
e4c91d2328 don't require runtimes to implement all callbacks 2023-02-25 10:32:27 -08:00
Mitchell Hashimoto
aa2d3720b6 gtk: previous/next tab bindings 2023-02-25 10:29:58 -08:00
Mitchell Hashimoto
6acf67ec66 gtk: render! 2023-02-24 07:58:30 -08:00
Mitchell Hashimoto
705d56d18e surface no longer has reference to app 2023-02-24 07:58:29 -08:00
Mitchell Hashimoto
ac772c2d2d inherit font size works again 2023-02-24 07:58:29 -08:00
Mitchell Hashimoto
913131c8f1 rename more stuff 2023-02-24 07:58:29 -08:00
Mitchell Hashimoto
fbe35c226b Integrating new surface 2023-02-24 07:58:29 -08:00