1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-13 07:22:52 +03:00
Commit Graph

376 Commits

Author SHA1 Message Date
Wez Furlong
a9427aca63 Remove ALT-number default key assignments
The issue is that we work hard to match the keys pre-composition,
but for French and Norwegian layouts ALT-number are valid,
useful punctuation keys.  It's awkward to make exceptions for
ALT keys when matching assignments, especially on macOS, and
the simplest thing to do is simply to remove the assignments
and leave it to our users to add their own if they want them.

The ctrl-shift and cmd based assignments are generally much
easier to keep, because those key combinations are not widely
used default mappings on any keyboard layout.

refs: #1543
refs: #1542
refs: https://github.com/wez/wezterm/pull/1132
2022-01-14 22:24:40 -07:00
Wez Furlong
b5dfbc392c make use_ime=true the default for all platforms
The key repeat issues that were blocking this from being enabled
on macos have been resolved.
2022-01-13 09:19:23 -07:00
Wez Furlong
507267aeee docs: changelog for https://github.com/wez/wezterm/pull/1534 2022-01-12 18:03:20 -07:00
Wez Furlong
d1018c37ff docs: changelog for #1526 2022-01-10 18:56:57 -07:00
Wez Furlong
1fd53d4a5d mux: propagate User Vars across to the client
user vars were stubbed out.  This commit adds storage for them
in the mux client and adds a new notification that publishes each
var as it is changed.  That differential stream is applied to the
storage in the mux client when it is received.

```lua
local wezterm = require 'wezterm'

wezterm.on("update-right-status", function(window, pane)
  local woot = pane:get_user_vars().woot
  window:set_right_status(tostring(woot))
end);

return {
  unix_domains = {
    {name="unix"},
  },
}
```

then running:

* `wezterm connect unix`
* in that session: `printf "\033]1337;SetUserVar=%s=%s\007" woot `echo -n nice | base64``

causes `nice` to show in the status area.

refs: #1528
2022-01-10 18:33:32 -07:00
Wez Furlong
8e0a92b2ec docs: WslDomain, default_domain, wsl_domains
refs: #1242
2022-01-09 12:23:14 -07:00
Wez Furlong
373c5900e8 changelog: associate Windows wait_message latency fix w/ more issues 2022-01-09 10:59:43 -07:00
Wez Furlong
0c73a2359f docs: changelog fix typo 2022-01-09 10:56:41 -07:00
Wez Furlong
b7e142f407 docs: revise changelog for xkbd composition changes 2022-01-09 10:55:57 -07:00
Wez Furlong
3ad91ff93e docs: changelog: note about allow_win32_input_mode option 2022-01-09 08:46:09 -07:00
Wez Furlong
41953ee5e9 docs: changelog revise wording around compose_cursor 2022-01-09 08:44:38 -07:00
Wez Furlong
627001762e rename dead_key_is_active -> composition_status, dead_key_cursor -> compose_cursor
Since the composition state isn't strictly tied to dead keys, use
a name that better reflects that.
2022-01-09 08:39:21 -07:00
Wez Furlong
430e34ad37 docs: missing changelog for https://github.com/wez/wezterm/issues/1459 2022-01-08 21:53:44 -07:00
Wez Furlong
10ea932965 docs: changelog for https://github.com/wez/wezterm/issues/1398
and https://github.com/wez/wezterm/issues/1013
2022-01-07 21:23:15 -07:00
Wez Furlong
f2ed459359 docs: changelog for key input stuff
closes: #601
closes: #1080
closes: #1391
2022-01-07 21:18:30 -07:00
Wez Furlong
c383ee218d docs: changelog for https://github.com/wez/wezterm/issues/877
closes: https://github.com/wez/wezterm/issues/877
2022-01-07 21:14:42 -07:00
Wez Furlong
2a6a842362 docs: changelog for https://github.com/wez/wezterm/issues/1131
closes: https://github.com/wez/wezterm/issues/1131
2022-01-07 21:13:04 -07:00
Wez Furlong
3ca840a0ab docs: changelog for win32-input-mode
closes: #318
closes: #1509
closes: #1510
2022-01-07 21:08:50 -07:00
Wez Furlong
97d5429baa term: fix cursor location on primary when resizing with alt screen active
refs: https://github.com/wez/wezterm/issues/1512
2022-01-07 20:55:29 -07:00
Wez Furlong
3c6bc2c366 add ActivatePaneByIndex key assignment action
refs: #1517
2022-01-07 07:30:17 -07:00
Wez Furlong
17a9d6159a wezterm cli now prefers to talk to main GUI instance
When spawned with no WEZTERM_UNIX_SOCKET environment set,
we now prefer to resolve the gui instance, falling back to
the mux if it doesn't look like the gui is running.

`wezterm cli --prefer-mux` will use the original behavior of
trying to resolve the path from the unix domain in the config.
2022-01-06 22:31:42 -07:00
Wez Furlong
91a423da96 docs: changelog for 2a0de16b7b
refs: https://github.com/Canop/broot/issues/473
2022-01-05 20:15:56 -07:00
Wez Furlong
1131f2dce6 docs: changelog for IME/dead key composition 2022-01-05 20:11:41 -07:00
Wez Furlong
32c39fe5ae docs: changelog for #1457 2022-01-04 20:51:58 -07:00
Wez Furlong
359fd15416 docs: fix typo in changelog 2022-01-03 17:20:12 -07:00
Wez Furlong
d4ee3d8958 docs: changelog for #1491
closes: #1491
2022-01-03 17:09:05 -07:00
Wez Furlong
0e92894dad docs: changelog for #1499 2022-01-03 15:03:49 -07:00
Wez Furlong
0f3dcc2c2b docs: changelog for #1498 2022-01-03 12:54:50 -07:00
Wez Furlong
672187973b docs: changelog for #1483 2022-01-03 12:36:22 -07:00
Benoit de Chezelles
462a256e83 Add missing New in latest release's changelog 2022-01-03 07:04:01 -08:00
Wez Furlong
028026049d add window:dead_key_is_active window:leader_is_active
This commit adds a couple of helper methods that provide insight into
the state of the keyboard layer.

The intent is for users to add status information about the keyboard
state.

This commit also ensures that we schedule an update when the leader
key duration expires, and ensures that we close out the leader state
for an invalid key press.

refs: #686
closes: #688

```lua
local wezterm = require 'wezterm';

wezterm.on("update-right-status", function(window, pane)
  local leader = ""
  if window:leader_is_active() then
    leader = "LEADER"
  end
  local dead = ""
  if window:dead_key_active() then
    dead = "DEAD"
  end
  window:set_right_status(leader .. " " .. dead)
end);

return {
  leader = { key="a", mods="CTRL" },
  colors = {
    dead_key_cursor = "orange",
  },
}
```
2022-01-02 19:41:21 -07:00
Wez Furlong
2d62bffe41 window: fix CTRL+C with Russian keyboard on windows
Turns out that we had the same issue on Windows

refs: #678
2022-01-02 16:50:26 -07:00
Wez Furlong
43d9392c52 window: x11/wayland: extract utf8 version of key from key state
Previously, we'd take a couple of guesses at how to map the key
to a utf8 value, but! the keyboard state has a method that can tell
us what to use.

This is important in non-latin keymaps where, for example, the `c`
key generates cyrillic small letter es and we'd end up sending
CTRL + that through to the terminal when CTRL is held down.

If we get the utf8 string from the keyboard layer then we get
CTRL+c instead, and that is what we want.

refs: https://github.com/wez/wezterm/issues/678
2022-01-02 11:16:52 -07:00
Wez Furlong
c05491f831 fonts: fix fontconfig monospace alias resolution
This got broken by 58ece29f00
This commit structures things so that we're less likely to overlook
this in the future!

cc: @unrelentingtech

refs: #1250
2022-01-02 08:26:19 -07:00
Wez Furlong
24840f7e13 docs: add some info about fancy tab bars 2022-01-01 17:14:33 -07:00
Wez Furlong
2d303ec54c docs: update for 20220101-133340-7edc5b5a release 2022-01-01 13:36:37 -07:00
Wez Furlong
f2c0407775 docs: fix typo in changelog 2022-01-01 12:49:05 -07:00
Wez Furlong
0bcd770102 docs: note about get_current_working_dir on windows 2022-01-01 09:18:22 -07:00
Wez Furlong
43dff29391 Sync with iTerm2-Color-Schemes
Sync with:
555db64e47

and update the screenshots for the docs
2021-12-31 10:43:30 -07:00
Wez Furlong
52c198ab8c x11: default use_ime=true, add xim_im_name option 2021-12-31 09:55:17 -07:00
Wez Furlong
143f7c9acc macos: detect when IME swallows a key press (eg: F8, F9)
Certain keys are "handled" by the IME through it generating a "noop"
command.

That's not super useful for us, so this commit detects the noop case
and then treats it as though the IME didn't handle the input event.

While implementing the above fix, I realized that the same technique
could be used more generally to return processing to our main input
handling for the various selectors that we do recognize: we were
essentially inferring the original key combinations based on the
selector which is not scalable and potentially lossy.

We can't capture CTRL-ESC this same way, as that key combination
is magical and is routed to the callback without generating any
key events.

refs: https://github.com/wez/wezterm/issues/615
refs: https://github.com/wez/wezterm/issues/975
refs: https://github.com/wez/wezterm/pull/1410
2021-12-30 22:50:26 -07:00
Wez Furlong
e3afdd7b8f macos: normalize Composed("p") -> Char('p') when use_ime=true
When the IME is enabled, pressing `CTRL-A P` would generate
`Composed("P")` for the second key press, which we couldn't
then match in the keymapping layer.

This commit checks for that and normalizes it to `Char('P')`
instead.

refs: https://github.com/wez/wezterm/issues/1409
refs: https://github.com/wez/wezterm/issues/1410
2021-12-30 21:36:25 -07:00
Wez Furlong
99d73baba7 docs: changelog for https://github.com/wez/wezterm/issues/1474 2021-12-30 09:37:40 -07:00
Wez Furlong
f175c5f6c0 add wezterm.get_builtin_color_schemes() 2021-12-29 09:20:12 -07:00
Wez Furlong
494a0983ee gui: cache shaping and layout of fancy tab bar, allow placing at bottom
We only need to recompute when the tab content changes, or when
the window is resized, plus invalidations of the shape cache
of texture atlas filling up.

Hover events don't need to re-shape.

We can now also place the tab bar at the bottom of the screen again.
2021-12-28 12:29:54 -07:00
Wez Furlong
6ac6ac45b6 lua: add pane:get_logical_lines_as_text
refs: #1468
2021-12-28 08:04:41 -07:00
Wez Furlong
8c7072c5ef gui: flesh out test case for wsl -l -v
closes: https://github.com/wez/wezterm/issues/1462
2021-12-27 10:39:26 -07:00
Wez Furlong
790b515c21 gui: allow mouse wheel to route to hovered pane
refs: https://github.com/wez/wezterm/issues/798
2021-12-25 15:37:14 -07:00
Wez Furlong
c4257ab8d6 config: fix asymmetric serialization of keycode and modifiers
This adds string serialization for the keycode and modifiers as
used in the config.

We can't simply tell the base types to serialize in this form because
we may serialize and pass those via the mux protocol and the default
derived serializers are more efficient for that purpose.

This allows:

```lua
local wezterm = require 'wezterm'

return {
  keys = {
    {key="a", mods="ALT", action=wezterm.action{SendKey={key="b"}}}
  },
}
```

to parse: previously, wrapping `SendKey` in `wezterm.action` would fail
to round-trip the the `SendKey` and lead to an error loading the
config.
2021-12-25 12:11:59 -07:00
Wez Furlong
8eb7c3cff4 gui: fancy tab bars are now the default
Adjust the rendering and coloring a bit to make the defaults
look pretty reasonable.

refs: #1180
2021-12-24 16:23:01 -07:00