aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/input
Commit message (Collapse)AuthorAge
* Fix spelling errorsJosh Soref2024-08-14
|
* Fix Kitty protocol reporting shifted keycodesjadedpasta2024-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The [kitty keyboard protocol][1] explicitly requires that the *un-shifted* version of the pressed key is used to report the primary code point in `CSI code-point;modifiers u` sequences. > Note that the codepoint used is always the lower-case (or more > technically, un-shifted) version of the key. If the user presses, for > example, ctrl+shift+a the escape code would be CSI 97;modifiers u. It > must not be CSI 65; modifiers u. Alacritty's current behavior is to report the shifted version when shift is pressed, and the un-shifted version otherwise: ```console # Note that you'll have to kill Alacritty after running this to get # control back! $ echo -ne '\x1b[>1u'; cat ^[[97;5u^[[65;6u ``` The above was generated by pressing `CTRL`+`a` followed by `CTRL`+`SHIFT`+`a` after running the command. Here `97` and `65` are the codepoints for `a` and `A` respectively. This change makes Alacritty match the protocol (and Kitty's) behavior. With this change applied, `97` is reported for both `CTRL`+`a` and `CTRL`+`SHIFT`+`a`. [1]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#key-codes
* Fix mouse mode bindings with multiple actionsEBADBEEF2024-08-14
| | | | | | | | | | | | | | | | The following config was broken: ``` [mouse] bindings = [ { mouse = "Right", mods = "Shift", action = "Copy" }, { mouse = "Right", mods = "Shift", action = "ClearSelection" }, ] ``` Only the first action was applied. Change to allow more than one exact match in mouse mode with shift held, but keep the logic to not allow fallback search if any exact match was found. Regression was introduced in 1a143d11.
* Bump winit to 0.30.0Kirill Chibisov2024-08-14
|
* Fix crash when trying to open a new tab on macOSWilliam Viktorsson2024-08-14
| | | | | | This fixes an issue where Alacritty would crash when trying to open a new tab on macOS while having decorations disabled. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Send ESC with Alt for unicode inputKirill Chibisov2024-08-14
| | | | | | | | | | | Make `Alt` send `ESC` for unicode input the way it's done for ASCII. Previously it was disabled because of macOS, however on macOS we're using the `option_as_alt` setting, which solves the original issue. The `Alt` prefixing is still disabled for the unicode strings, like when they come from the compose input. Fixes #7852.
* Fix kitty encoding used for char input without textKirill Chibisov2024-08-14
| | | | | On Windows some key combinations for regular text input, like Ctrl+1 don't have any text attached, so they were generating the kitty escape sequence even when they shouldn't.
* Unlock more bindings from the keyboardJosh Rahm2024-02-23
|
* Fix clippy warningsChristian Duerr2024-02-14
|
* Don't use kitty sequences outside protocolKirill Chibisov2024-01-31
| | | | | | | | | | | | | Originally kitty defined that functional keys, which are not encoded by default, like `Pause` should be encoded with `CSI u`. However the specification was clarified and now it says that terminal may ignore that part. Given that Alacritty tries to follow xterm/urxvt when it comes to bindings, CSI u bindings are not send for consistency reasons. This also brings back F13-F20 bindings used by Alacritty in 0.12.3, as well as explicitly defines `NumpadEnter` like it was before. Closes #7623.
* Don't report associated text only for C0/C1Kirill Chibisov2024-01-27
| | | | | | | | This has a side effect that we'll have text reported for Alt+Shift+T and similar, but only C0/C1 should be excluded and Alt+Shift+T is emitting neither, thus regular `T` will be reported. Fixes #7657.
* Allow specifying all config keys on all platformsChristian Duerr2024-01-24
| | | Closes #7592.
* Reduce allocations during keyboard inputChristian Duerr2024-01-09
|
* Send associated text for shifted numbers with kittyKirill Chibisov2023-12-30
| | | | | Also fix the wrong ordering of base and shifted keys. Fixes #7492.
* Fix inability to bind `Alt+Control` on WindowsKirill Chibisov2023-12-30
| | | | Fixes #7506.
* Use pre-composed key for `Alt` bindings on macOSKirill Chibisov2023-12-30
| | | | Fixes #7475.
* Apply modifiers before presses in kitty protocolKirill Chibisov2023-12-25
| | | | | | | | | While this doesn't handle releases with multiple identical modifiers pressed, the release can't work reliable anyway, since one modifier could be pressed before focusing the window, thus tracking modifiers based on the keysym values won't work as it was suggested by kitty author. Links: https://github.com/kovidgoyal/kitty/issues/6913
* Account for option_as_alt when doing kitty protocolKirill Chibisov2023-12-20
| | | | | | By default `Alt` is not a real `Alt` on macOS, so we shouldn't treat it as a modifier. Fixes #7443.
* Bump crossfont to 0.7.0Kirill Chibisov2023-12-14
|
* Don't emit text for NamedKey without text reprKirill Chibisov2023-12-08
| | | | | | | | | When the key doesn't have textual representation we shouldn't emit the text for them, since they are processed via bindings. Also, fix the logic to handle named keys with disambiguate without special modes/modifiers. Fixes #7423.
* Fix trigger of normal bindings in mouse modeKirill Chibisov2023-12-08
| | | | | | | We should ensure that the `Shift` is actually pressed when trying to prefer regular bindings instead of the ones if we had Shift applied. Fixes: 500b696ca8ed (Prefer exact matches for bindings in mouse mode) Fixes #7415.
* Update to crossfont 0.6.0Kirill Chibisov2023-12-08
|
* Implement kitty's keyboard protocolKirill Chibisov2023-12-06
The protocol enables robust key reporting for the applications, so they could bind more keys and the user won't have collisions with the normal control keys. Links: https://sw.kovidgoyal.net/kitty/keyboard-protocol Fixes #6378.