1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 13:52:55 +03:00
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Go to file
Wez Furlong fe48951e7a macos: fixup SUPER+SHIFT+[ key decoding
One of the default key assignments was registered as `SUPER+SHIFT+{`
which worked on macOS, but on Linux, would never match because the
keypress over there was (correctly) reporting as `SUPER+{`.

I originally thought that the user reported issue was a linux
normalization problem, but in looking deeper, the issue is really
that macos is doing something funky!

On macos we collect the interpreted key event as a string, and also
the interpretation of that event without any modifiers applied.

For letters this means that eg: `ALT-l` reports as `¬` for the
processed string and `l` for the unmodified string.  That's good!

However, for punctuation we get a backwards result: SUPER+SHIFT+[
produces `[` for the processed text and `{` for the unmodified
text!

This commit tries to detect this, using a heuristic that is
potentially bad on non-US layouts: if both the processed and
unmodified strings are punctuation then we bias to the unmodified
version.

With that change, that key press is correctly reported as `SUPER+{`,
and we can fix the key assignment registration to reflect that.

I quickly checked the behavior of pressing that same physical key
combination with a DEU layout active, and it appears that the unmodified
stuff is also flipped there; we get a lower-case version of something
that I think should be uppercase.  This commit doesn't change that
behavior:

```
key_event KeyEvent { key: Char('ü'), modifiers: NONE,
        raw_key: Some(Char('Ü')),
        raw_modifiers: SHIFT | SUPER,
        raw_code: Some(33),
        repeat_count: 1, key_is_down: true }
```

refs: https://github.com/wez/wezterm/issues/601
2021-04-03 06:32:13 -07:00
.cargo build static on windows for static openssl linkage 2020-02-02 13:03:07 -08:00
.github ci: fixup cirrus exclusion 2021-03-28 20:39:49 -07:00
assets Bundle PowerlineExtraSymbols as a fallback font 2021-03-06 19:12:35 -08:00
async_ossl Raise minimum Rust version to 1.51, de-vendor openssl on unix 2021-03-25 09:43:50 -07:00
base91 dyn everywhere 2019-06-08 21:28:11 -07:00
bintree bintree: clippy lint 2021-03-26 09:01:54 -07:00
ci Fix Mulitplexing typo in sidebar 2021-03-31 18:09:16 -07:00
codec add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
config macos: fixup SUPER+SHIFT+[ key decoding 2021-04-03 06:32:13 -07:00
deps lint: fix some clippy stuff 2021-03-25 10:05:34 -07:00
docs docs: mention transparent in the window opacity docs 2021-04-03 05:14:02 -07:00
env-bootstrap use $WEZTERM_LOG to configure log levels ad-hoc 2020-12-23 12:19:19 -08:00
filedescriptor fixup build on windows, and update tests 2021-03-27 20:40:40 -07:00
licenses macOS: bundle and use MetalANGLE to enable Metal rendering 2020-10-17 09:34:01 -07:00
luahelper lint: fix some clippy stuff 2021-03-25 10:05:34 -07:00
mux fix Pane::get_lines_with_hyperlinks_applied 2021-04-02 19:56:11 -07:00
promise deps: misc updates 2020-12-29 09:24:34 -08:00
pty pty: unconditionally export some unix+ssh specific things 2021-03-27 07:25:00 -07:00
rangeset rangeset: clippy 2021-03-26 11:57:13 -07:00
ratelim move ratelim to its own crate 2020-10-03 11:15:57 -07:00
strip-ansi-escapes move strip-ansi-escapes into its own crate 2020-10-03 11:15:57 -07:00
tabout avoid excess capacity when dealing with iterm2 image protocol 2021-03-13 08:10:48 -08:00
term parse and respond to XTSMGRAPHICS queries 2021-04-01 22:42:28 -07:00
termwiz parse and respond to XTSMGRAPHICS queries 2021-04-01 22:42:28 -07:00
test-data Render custom block glyphs 2021-02-28 09:43:26 -08:00
tmux-cc tmux: attach control mode parser to terminal 2020-11-20 09:24:50 -08:00
umask Take care to restore the original umask 2021-01-07 09:20:13 -08:00
vtparse clippy 2021-03-26 09:03:28 -07:00
wezterm add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
wezterm-client add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
wezterm-font fonts: improve trace diagnostics 2021-04-02 09:09:09 -07:00
wezterm-gui hide mouse cursor each time we send key input to a pane 2021-04-02 22:34:58 -07:00
wezterm-gui-subcommands wezterm-gui: add wezterm ssh -oIdentityFile=/some/thing 2021-03-28 08:24:35 -07:00
wezterm-input-types windows: implement decoration setting, change to bitfield 2021-03-04 09:40:38 -08:00
wezterm-mux-server Raise minimum Rust version to 1.51, de-vendor openssl on unix 2021-03-25 09:43:50 -07:00
wezterm-mux-server-impl add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
wezterm-ssh wezterm-ssh: don't assume sh is in /bin 2021-03-29 21:11:54 -07:00
wezterm-toast-notification toast: hook up action/event handling on Windows 2021-03-14 15:23:42 -07:00
window macos: fixup SUPER+SHIFT+[ key decoding 2021-04-03 06:32:13 -07:00
.cirrus.yml ci: tweak freebsd ci for getdeps rust version check 2021-03-28 20:37:09 -07:00
.gitignore docs: for the new status bar feature 2021-03-10 19:29:17 -08:00
.gitmodules repoint to my freetype mirror 2021-02-03 21:56:30 -08:00
.rustfmt.toml Make rustfmt happy about "async move" 2020-01-20 13:58:21 -08:00
Cargo.lock wezterm-client: cut over to new wezterm-ssh bits 2021-03-28 07:18:38 -07:00
Cargo.toml ssh2: on windows, link against openssl 2021-03-26 10:00:43 -07:00
CONTRIBUTING.md Add get-deps script for installing dependencies 2018-02-25 09:24:56 -08:00
get-deps move sudo into script to not use sudo for rust checking 2021-04-02 22:36:27 -07:00
LICENSE.md wezterm: bundle JetBrains Mono and Noto Color Emoji fonts 2020-09-29 22:05:18 -07:00
README.md update for rename of master branch -> main 2021-02-03 21:34:12 -08:00
wt-record fixup wt-record on darwin 2021-03-20 20:14:17 -07:00
wt-replay update record/play scripts for macos 2019-03-22 20:41:50 -07:00

Wez's Terminal

WezTerm Icon A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust

User facing docs and guide at: https://wezfurlong.org/wezterm/

Screenshot

Screenshot of wezterm on macOS, running vim

Installation

https://wezfurlong.org/wezterm/installation.html

Getting help

This is a spare time project, so please bear with me. There are a couple of channels for support:

The GitHub Discussions and Element/Gitter rooms are better suited to questions than it is to bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.