Commit Graph

13563 Commits

Author SHA1 Message Date
Mitchell Hashimoto
dcbb3fe56f inspector: show chained bindings 2025-12-22 20:37:39 -08:00
Jeffrey C. Ollie
76c0bdf559 input: fix performable bindings 2025-12-22 17:48:04 -06:00
Mitchell Hashimoto
931c6c71f2 fix up gtk 2025-12-22 13:38:46 -08:00
Mitchell Hashimoto
99325a3d45 config: docs for chains 2025-12-22 13:34:19 -08:00
Mitchell Hashimoto
7dd903588b input: formatter for chained entries 2025-12-22 13:34:19 -08:00
Mitchell Hashimoto
e4c7d4e059 input: handle unbind cleanup for leaf chains 2025-12-22 13:34:18 -08:00
Mitchell Hashimoto
578b4c284b apprt/gtk: handle global actions with chains 2025-12-22 13:34:18 -08:00
Mitchell Hashimoto
442146cf9f input: implement leaf_chained clone 2025-12-22 13:13:39 -08:00
Mitchell Hashimoto
b8fe66a701 input: parseAndPut handles chains 2025-12-22 13:06:29 -08:00
Mitchell Hashimoto
9bf1b9ac71 input: cleaner reverse mapping cleanup 2025-12-22 12:55:33 -08:00
Mitchell Hashimoto
67be309e3f input: Trigger.eql 2025-12-22 12:50:39 -08:00
Mitchell Hashimoto
a3373f3c6a input: appendChain reverse mapping 2025-12-22 12:47:04 -08:00
Mitchell Hashimoto
4fdc52b920 input: appendChain 2025-12-22 12:37:53 -08:00
Mitchell Hashimoto
457fededeb input: keep track of chain parent 2025-12-22 12:00:50 -08:00
Mitchell Hashimoto
42c21eb16b input: leaf_chained tagged union value 2025-12-22 10:19:54 -08:00
Mitchell Hashimoto
3877ead071 input: parse chains (don't do anything with them yet) 2025-12-22 09:13:41 -08:00
Mitchell Hashimoto
39481453fe macos: show the key sequence overlay if no tables are active 2025-12-21 13:32:24 -08:00
Mitchell Hashimoto
8a8b06e74d config: document key tables for keybind 2025-12-21 13:28:14 -08:00
Mitchell Hashimoto
c85847c693 Update iTerm2 colorschemes (#9988)
Upstream release:
https://github.com/mbadolato/iTerm2-Color-Schemes/releases/tag/release-20251201-150531-bfb3ee1
2025-12-21 13:18:15 -08:00
Mitchell Hashimoto
56b024d8fc Fix typo (#9998)
This PR fixes a small typo in the documentation.
2025-12-21 10:10:06 -08:00
Henrique Albuquerque
97cd4c71d5 Fix typo 2025-12-21 17:57:23 +00:00
Mitchell Hashimoto
df8dde946d Reset key tables on config reload, bound max active key tables (#9994)
Two unrelated changes to polish key tables:

1. Key tables should be reset (deactivated) when teh config is reloaded.
This matches the behavior of key sequences as well, which are reset on
config reload.

2. A maximum number of active key tables is now enforced (8). This
prevents a misbehaving config from consuming too much memory by
activating too many key tables. This is an arbitrary limit we can adjust
later if needed.
2025-12-21 08:24:25 -08:00
Mitchell Hashimoto
18c8c338e0 Reset key tables on config reload, bound max active key tables
Two unrelated changes to polish key tables:

1. Key tables should be reset (deactivated) when teh config is reloaded.
   This matches the behavior of key sequences as well, which are reset
   on config reload. 

2. A maximum number of active key tables is now enforced (8).
   This prevents a misbehaving config from consuming too much memory
   by activating too many key tables. This is an arbitrary limit we
   can adjust later if needed.
2025-12-21 08:14:37 -08:00
Mitchell Hashimoto
c422650881 Key tables apprt action plus macOS UI (#9990)
Fixes #9963 (we'll open new issues to track GTK and other stuff)

This adds the apprt actions necessary for key tables to be shown
visually, and adapts the macOS UI to show them.

## Demo

```
keybind = example/
keybind = example/ctrl+a=text:hello
keybind = example/ctrl+b>x=text:wow
keybind = example/ctrl+c=activate_key_table:another
keybind = example/escape=deactivate_key_table
keybind = ctrl+a=activate_key_table:example

keybind = another/
keybind = another/catch_all=deactivate_key_table
```


https://github.com/user-attachments/assets/75e94ec9-b52e-439d-b0ca-229ce533c656

**AI disclosure:** The SwiftUI view was written by AI, everything else
was manual.
2025-12-21 08:11:36 -08:00
Lukas
7d3db17396 macOS: key table animations and cleanup 2025-12-21 09:29:47 +01:00
Mitchell Hashimoto
dc8f082392 macos: copy the key table action bytes 2025-12-20 20:36:35 -08:00
Mitchell Hashimoto
eac0ec14fd macOS: revamped key table/sequence UI 2025-12-20 20:27:56 -08:00
Mitchell Hashimoto
901618cd8f macOS: hook up key table apprt action to state 2025-12-20 20:01:38 -08:00
Mitchell Hashimoto
44972198ae apprt: add action for key table activation/deactivation 2025-12-20 19:53:12 -08:00
Mitchell Hashimoto
028691766d Key Tables (#9984)
This does the core implementation of #9963. This implements the config
parsing, bindings (`activate_key_table`, `activate_key_table_once`,
`deactivate_key_table` and `deactivate_all_key_tables`), and core key
handling logic so they work.

I'm not going to close the issue yet because I still want to integrate
GUI onto it so that it's clear you're in a key table (similar to the
sequence UI).

No demos or anything here because it is well explained in #9963.
2025-12-20 19:43:56 -08:00
mitchellh
1fbdcf1ee7 deps: Update iTerm2 color schemes 2025-12-21 00:15:47 +00:00
Mitchell Hashimoto
845bcdb498 config: copy key table name into arena 2025-12-20 15:15:30 -08:00
Mitchell Hashimoto
daa613482e keybind = clear and reset should reset tables, too 2025-12-20 14:57:37 -08:00
Mitchell Hashimoto
14bbc4893f implement one-shot key tables 2025-12-20 14:36:39 -08:00
Mitchell Hashimoto
36f891afd8 implement key table lookup in maybeHandleBinding 2025-12-20 14:30:36 -08:00
Mitchell Hashimoto
18ce219d78 input: activate/deactivate key table binding actions 2025-12-20 14:23:02 -08:00
Mitchell Hashimoto
34ae3848b6 core: key tables 2025-12-20 14:04:11 -08:00
Mitchell Hashimoto
8c59143c1a rename some key sequence state so it is clearer what it is 2025-12-20 14:04:03 -08:00
Mitchell Hashimoto
c53b3fffd5 config: keybind table parsing 2025-12-20 13:32:52 -08:00
Mitchell Hashimoto
aac5d65ded add the catch_all binding key (#9977)
Part of #9963

This adds a new special key `catch_all` that can be used in keybinding
definitions to match any key that is not explicitly bound. For example:
`keybind = catch_all=new_window` (chaos!).

`catch_all` can be used in combination with modifiers, so if you want to
catch any non-bound key with Ctrl held down, you can do: `keybind =
ctrl+catch_all=new_window`.

`catch_all` can also be used with trigger sequences, so you can do:
`keybind = ctrl+a>catch_all=new_window` to catch any key pressed after
`ctrl+a` that is not explicitly bound and make a new window!

And if you want to remove the catch all binding, it is like any other:
`keybind = catch_all=unbind`.
2025-12-20 13:13:19 -08:00
Mitchell Hashimoto
63422f4d4e add the catch_all binding key
Part of #9963

This adds a new special key `catch_all` that can be used in keybinding
definitions to match any key that is not explicitly bound. For example:
`keybind = catch_all=new_window` (chaos!). 

`catch_all` can be used in combination with modifiers, so if you want to
catch any non-bound key with Ctrl held down, you can do:
`keybind = ctrl+catch_all=new_window`.

`catch_all` can also be used with trigger sequences, so you can do:
`keybind = ctrl+a>catch_all=new_window` to catch any key pressed after
`ctrl+a` that is not explicitly bound and make a new window!

And if you want to remove the catch all binding, it is like any other:
`keybind = catch_all=unbind`.
2025-12-19 15:03:38 -08:00
Mitchell Hashimoto
73a93abf7b renderer/metal: clamp texture sizes to the maximum allowed by the device (#9972)
This prevents a crash in our renderer when it is larger.

I will pair this with apprt changes so that our mac app won't ever allow
a default window larger than the screen but we should be resilient at
the renderer level as well.
2025-12-19 10:39:06 -08:00
Mitchell Hashimoto
2e4b11a4d7 macos: window width/height should be clamped, work with position (#9975)
Fixes #9952
Fixes #9969

This fixes our `constrainToScreen` implementation to properly clamp the
window size to the visible screen its coming on as documented. Further,
this addresses the positioning problem, too.
2025-12-19 10:38:57 -08:00
Mitchell Hashimoto
d1bea9d737 macos: window width/height should be clamped, work with position
Fixes #9952
Fixes #9969

This fixes our `constrainToScreen` implementation to properly clamp the
window size to the visible screen its coming on as documented. Further,
this addresses the positioning problem, too.
2025-12-19 10:30:03 -08:00
Mitchell Hashimoto
594195963d Update src/renderer/Metal.zig
Co-authored-by: Jon Parise <jon@indelible.org>
2025-12-19 09:31:10 -08:00
Mitchell Hashimoto
07b47b87fa renderer/metal: clamp texture sizes to the maximum allowed by the device
This prevents a crash in our renderer when it is larger.

I will pair this with apprt changes so that our mac app won't ever allow
a default window larger than the screen but we should be resilient at
the renderer level as well.
2025-12-19 09:24:49 -08:00
Mitchell Hashimoto
e2be65da8e macos: hide tab overview on escape (#9971)
This hides the macOS tab overview when the `escape` key is pressed.

Our solution is a bit blunt here and I don't think its right. I think we
have a first responder problem somewhere but I haven't been able to find
it and find the proper place to implement `cancel` (or equivalent) to
hide the overview. I tried implementing `cancel` in all the places I
expect the responder chain to go through but none worked.

For now let's do this since it is pretty tightly scoped!
2025-12-19 07:18:32 -08:00
Mitchell Hashimoto
86a0eb1a75 macos: hide tab overview on escape
This hides the macOS tab overview when the `escape` key is pressed.

Our solution is a bit blunt here and I don't think its right. I think we
have a first responder problem somewhere but I haven't been able to find
it and find the proper place to implement `cancel` (or equivalent) to
hide the overview. I tried implementing `cancel` in all the places I
expect the responder chain to go through but none worked.

For now let's do this since it is pretty tightly scoped!
2025-12-19 07:13:47 -08:00
Mitchell Hashimoto
fa0a982ff2 macos: remove the command palette appear/disappear animation (#9964)
Lots of people complained about this and I don't see value in it.
2025-12-18 15:41:55 -08:00
Mitchell Hashimoto
0ace736f46 macos: remove the command palette appear/disappear animation
Lots of people complained about this and I don't see value in it.
2025-12-18 15:36:11 -08:00