2351 Commits

Author SHA1 Message Date
Thorsten Ball
cda87a6963 embedded: use separate struct to pass options to new_tab_cb 2023-08-18 06:50:47 +02:00
Mitchell Hashimoto
9d61212451 Simplify Bash Integration (#299)
* shell-integration: new bash integration that is much simpler

* shell-integration: bash fixes
2023-08-17 21:50:42 -07:00
Thorsten Ball
12311e9707 macOS: simplify code for new tab 2023-08-18 06:26:15 +02:00
Mitchell Hashimoto
95591115de update README 2023-08-17 17:12:51 -07:00
Mitchell Hashimoto
0323f10905 Merge pull request #297 from mitchellh/disable-glfw
build: make glfw opt-in on all platforms, default to GTK on Linux
2023-08-17 16:55:26 -07:00
Mitchell Hashimoto
68a9110d8e build: make glfw opt-in on all platforms, default to GTK on Linux
The GLFW build has grown farther and farther in feature parity with GTK
on Linux. And on macOS, the GLFW build has been unstable (crashes) for
months.

I still find the GLFW build useful for testing some core terminal work,
but it is increasingly user-hostile in case someone just downloads the
project and does a `zig build`.

I keep GLFW as up to date as I can, but the features that are missing
are due to fundamental limitations:

  - GLFW has no tabs, splits, etc. because it has no UI elements.
    I am not interested in painting UI widgets from scratch.

  - GLFW cannot support keyboard layouts robustly because it has no
    hooks to detect keyboard layouts or functions to get keymaps.

  - GLFW cannot support the Kitty keyboard protocol because the
    key/char API is too high level and it provides no low-level
    alternatives.

  - GLFW crashes on macOS under certain scenarios (this is my problem).
    I'm not interested in fixing it because the AppKit-based build
    is highly recommended.

To build or run the GLFW build you must now explicitly pass in
`-Dapp-runtime=glfw` to `zig build`.
2023-08-17 16:27:03 -07:00
Mitchell Hashimoto
fe1e879ec7 termio: disable kitty keyboard protocol for glfw
See comment.
2023-08-17 15:08:39 -07:00
Mitchell Hashimoto
a8f37f50e6 Update README.md 2023-08-17 14:55:24 -07:00
Mitchell Hashimoto
a6e1b3d232 Note bash shell integration in README 2023-08-17 14:36:15 -07:00
Mitchell Hashimoto
c8a07abdf3 terminal: ignore SOH/STX, bash sends this for some reason 2023-08-17 13:40:11 -07:00
Mitchell Hashimoto
a058bcbdb0 shell-integration: add bash script (no auto-inject yet) 2023-08-17 13:26:06 -07:00
Mitchell Hashimoto
b7e1122224 input: remove old TODO. This is handled now in the app runtimes 2023-08-17 12:59:22 -07:00
Mitchell Hashimoto
72f5370066 apprt/glfw: always say alt is consumed on macos 2023-08-17 12:51:07 -07:00
Thorsten Ball
3e7c4475a1 macOS: move newTab code to PrimaryWindowManager 2023-08-17 20:57:00 +02:00
Thorsten Ball
d2dae7a696 macOS: inherit font size when creating new tab
This is one part of #281.
2023-08-17 20:56:56 +02:00
Mitchell Hashimoto
91456fe420 input: repeat events need to be handled for Kitty w/o report events 2023-08-17 11:23:13 -07:00
Mitchell Hashimoto
df517abec2 Merge pull request #295 from mitchellh/kitty-keys
Kitty Keyboard Protocol
2023-08-17 10:12:57 -07:00
Mitchell Hashimoto
78080f0cd6 input: proper optional entry handling 2023-08-17 09:52:44 -07:00
Mitchell Hashimoto
6493da0dd3 input: Kitty encodes alternate keys 2023-08-17 09:51:16 -07:00
Mitchell Hashimoto
fe0e1f5ee8 input: key must provide unshifted codepoint 2023-08-17 09:40:32 -07:00
Mitchell Hashimoto
37daf02804 core: use Kitty encoding if enabled 2023-08-17 09:02:43 -07:00
Mitchell Hashimoto
fb9dc74b29 input: lot more Kitty encoding logic 2023-08-17 08:55:37 -07:00
Mitchell Hashimoto
91ba53b081 input: KittySequence for encoding sequences 2023-08-17 08:43:40 -07:00
Mitchell Hashimoto
c5177f6609 input: begin kitty key encoding logic (not working yet) 2023-08-16 22:08:16 -07:00
Mitchell Hashimoto
b42178bf34 input: add kitty keymap data 2023-08-16 22:08:05 -07:00
Mitchell Hashimoto
9717f6c832 Merge pull request #293 from mitchellh/mrn/macos-dead-code
macOS: remove dead code from PrimaryWindowController
2023-08-16 22:06:05 -07:00
Thorsten Ball
0597b03fa2 macOS: remove dead code from PrimaryWindowController
I think this is a left-over from the refactor that moved this field to
the `PrimaryWindowManager`.
2023-08-17 07:04:46 +02:00
Mitchell Hashimoto
f60066a64d terminfo: add fullkbd for kitty keyboard protocol 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
af4ede40f1 terminal: implement CSI = u for setting kitty keyboard flags 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
a9d7e0eb7f terminal: parse kitty query, push, pop keyboard flags 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
c80b1bed75 terminal: add Kitty key flags, stack 2023-08-16 17:31:04 -07:00
Mitchell Hashimoto
07d722b77e bindings should not use consumed modifiers
Over time, they probably should, but GTK is a bit too aggressive right
now with consumed modifiers and I need to take a closer look at that.
2023-08-16 17:09:17 -07:00
Mitchell Hashimoto
20ddf51d2c Merge pull request #292 from mitchellh/fixterms
Implement the "fixterms" keyboard input spec
2023-08-16 14:36:10 -07:00
Mitchell Hashimoto
9cef09c58d input: do not send ctrl-sequences for ctrl-i,m,[ 2023-08-16 14:17:31 -07:00
Mitchell Hashimoto
2ff2e018ba input: clarify why we use all mods for unicode CSI u 2023-08-16 14:04:38 -07:00
Mitchell Hashimoto
dcf9cdd8bf input: CSI u encoding for modified unicode chars 2023-08-16 13:57:17 -07:00
Mitchell Hashimoto
33bef28850 rename key2callback to keycallback 2023-08-16 13:40:57 -07:00
Mitchell Hashimoto
4e8f5d3997 remove charCallback/keyCallback 2023-08-16 13:39:44 -07:00
Mitchell Hashimoto
dd385cc633 apprt/glfw: convert to new key2callback 2023-08-16 13:34:31 -07:00
Mitchell Hashimoto
cd90b2a716 apprt/embedded: only call new key2callback 2023-08-16 13:26:22 -07:00
Mitchell Hashimoto
896d0e8fcf apprt/gtk: only use key2callback 2023-08-16 13:02:31 -07:00
Mitchell Hashimoto
83ba2b9825 apprt/gtk: clean up keyval_unicode usage 2023-08-16 12:51:00 -07:00
Mitchell Hashimoto
1a918bc64b apprt/gtk: call new key2callback using the all-in-one key event 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
c254a8b09e input: encoding should always write to the buf 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
aadb78394b input: legacy encoding never emits sequence during dead key state 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
9b90692fc7 core: start on key2Callback for the new callback that uses KeyEncoder 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
a2d4e7ce29 input: legacy key encoding handles alt-as-esc for general utf8 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
871f797758 input: KeyEncoder handles the charCallback stuff now too 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
6555bb1410 input: KeyEncoder legacy encoding handles old keyCallback logic 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
f57fd99d3e input: starting to work on KeyEncoder, got ctrl sequences 2023-08-16 12:48:48 -07:00