aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/config/bindings.rs
Commit message (Collapse)AuthorAge
* Fix racing condition in hint triggeringChristian Duerr2024-11-02
| | | | | | | | | | | This fixes an issue with hints where it was possible that the terminal content of highlighted hints changed between the highlighted hint update and the activation of the hint. This patch always validates the hint's text content against the hint itself to ensure that the content is still valid for the original hint which triggered the highlight. Closes #8277.
* Unify string formattingHamir Mahal2024-07-24
|
* Add default `Home`/`End` bindings for Vi modeKirill Chibisov2024-02-08
|
* Fix hang on startup with some Wayland compositorsKirill Chibisov2024-02-04
| | | Fixes #7665.
* 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.
* Allow specifying all config keys on all platformsChristian Duerr2024-01-24
| | | Closes #7592.
* Add vi search paste bindingsOmar Magdy2024-01-04
| | | Closes #7511.
* Fix number-based mouse bindingsLars Francke2024-01-02
| | | | | | | The toml migration introduced a regression which stopped numbered key binding's from working. This patch implements the required number type to make things work again. Fixes #7527.
* Fix the order of `ClearSelection` in Vi modeKirill Chibisov2023-12-16
| | | Fixes #7438.
* 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.
* Fix chars usage inside the mouse bindingsKirill Chibisov2023-12-06
| | | Fixes #7413.
* Don't use `::*` for enum variants in bindingsKirill Chibisov2023-12-03
|
* Adjust default Vi's SearchBackwards bindingKirill Chibisov2023-11-28
| | | We have the same policy with Shift for numbers.
* Remove `alacritty_config` from alacritty_terminalKirill Chibisov2023-11-10
| | | | | There's no need to force alacritty's user configuration on other users of the crate, thus provide the options actually used by alacritty_terminal itself.
* Fix typosPavel Roskin2023-10-25
|
* Update winit to 0.29.2 and copypasta to 0.10.0Kirill Chibisov2023-10-21
| | | | | | | | | Fixes #7236. Fixes #7201. Fixes #7146. Fixes #6848. Fixes #3601. Fixes #3108. Fixes #2453.
* Add inline vi mode searchChristian Duerr2023-10-20
| | | | | | This patch adds inline search to vi mode using `f`/`F` and `t`/`T` as default bindings. The behavior matches that of vim. Fixes #7203.
* Add bindings for macOS tabsKirill Chibisov2023-09-04
| | | | | This doesn't represnet the movement to add tabs on any other platform, unless winit could add a similar API for them.
* Fix keys like `+` not working on neo layoutsKirill Chibisov2023-07-20
| | | | | | The key_without_modifier removes all the modifiers including the multiple shift levels, which is not desired. In alacritty we just wanted to treat uppercase and lowercase latters the same, which we can with the help of builtin functions.
* Use lowercase latters in bindings for h/m/lKirill Chibisov2023-07-18
| | | | | They were using uppercase latters, however our config expects everything as lowercase, because we're using `key_without_modifiers` + `ModifiersState`.
* Update to the new winit keyboard APIKirill Chibisov2023-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as ability to bind dead keys. It also fixes long standing issues with the virtual key code bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal conversions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes #6842. Fixes #6455. Fixes #6184. Fixes #5684. Fixes #3574. Fixes #3460. Fixes #1336. Fixes #892. Fixes #458. Fixes #55.
* Switch to TOML configuration formatChristian Duerr2023-06-12
| | | | | | | | | | | | | | | This switches Alacritty's default configuration format from yaml to toml. While yaml is still supported, it is done by converting it to toml and should be removed entirely in the future. All existing features were persisted based on my testing. Behavior should not change much, though `--option` might have slightly different behavior since the entire line is not interpreted as one line of toml. A new `alacritty migrate` subcommand has been added which allows automatic migration from yaml to toml. This also could be used as a facility to automatically fix configuration file changes in the future. Closes #6592.
* Update bitflags to 2.2.1Kirill Chibisov2023-05-17
|
* Allow mode-exclusive bindings in any modeChristian Duerr2023-04-15
| | | | | | This patch enables binding chains that go beyond mode changes by allowing bindings to be defined for modes they do not usually have an effect in.
* Create new windows with Cmd+N by defaultChristian Duerr2023-01-27
| | | | | | | | This changes the default Cmd+N binding on macOS to create a new window rather than spawning a new instance. Initially this change was held back for further testing of the multi-window feature. At this point all significant issues found with it have been fixed so it should be ready for prime-time now.
* Update glutin to 0.30.0Kirill Chibisov2022-11-03
| | | | | | | | | | | | | | | The glutin 0.30.0 update decouples glutin from winit which provides us with basis for a multithreaded renderer. This also improves robustness of our configuration picking, context creation, and surface handling. As an example we're now able to start on systems without a vsync, we don't try to build lots of contexts to check if some config works, and so on. That also brings us possibility to handle context losses, but that's a future work. Fixes #1268.
* Fix clippy warningsChristian Duerr2022-10-12
| | | | | This patch applies all clippy lints currently present on the latest clippy master than are compatible with our oldstable clippy (only exception is the `_else(||` stuff).
* Add IPC config subcommandChristian Duerr2022-09-01
| | | | | | | | | | | | | | | | | | | | This patch adds a new mechanism for changing configuration options without editing the configuration file, by sending options to running instances through `alacritty msg`. Each window will load Alacritty's configuration file by default and then accept IPC messages for config updates using the `alacritty msg config` subcommand. By default all windows will be updated, individual windows can be addressed using `alacritty msg config --window-id "$ALACRITTY_WINDOW_ID"`. Each option will replace the config's current value and cannot be reset until Alacritty is restarted or the option is overwritten with a new value. Configuration options are passed in the format `field.subfield=value`, where `value` is interpreted as yaml. Closes #472.
* Add vi action to center view around vi cursorjeremycostanzo2022-06-10
|
* Fix a few minor clippy lintsYuri Astrakhan2022-06-02
|
* Add `ToggleMaximized` key binding actionChris Copeland2022-02-27
|
* Fix block selection expansion with Ctrl + RMBKirill Chibisov2022-01-11
| | | | | | When 'ExpandSelection' binding was added only default binding for RightClick was added, however to expand block selection holding control when doing a click is required, so this commit adds a binding for 'RMB + Control'.
* Add multi-window supportChristian Duerr2021-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously Alacritty would always initialize only a single terminal emulator window feeding into the winit event loop, however some platforms like macOS expect all windows to be spawned by the same process and this "daemon-mode" can also come with the advantage of increased memory efficiency. The event loop has been restructured to handle all window-specific events only by the event processing context with the associated window id. This makes it possible to add new terminal windows at any time using the WindowContext::new function call. Some preliminary tests have shown that for empty terminals, this reduces the cost of additional terminal emulators from ~100M to ~6M. However at this point the robustness of the daemon against issues with individual terminals has not been refined, making the reliability of this system questionable. New windows can be created either by using the new `CreateNewWindow` action, or with the `alacritty msg create-window` subcommand. The subcommand sends a message to an IPC socket which Alacritty listens on, its location can be found in the `ALACRITTY_SOCKET` environment variable. Fixes #607.
* Update rustfmt configurationChristian Duerr2021-10-11
| | | | | | | | | | | | | | | | | In this change I went through all current rustfmt configuration options and expanded our existing configuration with overrides whenever deemed appropriate. The `normalize_doc_attributes` option is still unstable, but seems to work without any issues. Even when passing macros like `include_str!` that is recognized properly and not normalized. So while this wasn't an issue anywhere in the code, it should make sure it never will be. When it comes to imports there are two new major additions. The `imports_granularity` and `group_imports` options. Both mostly just incorporate unwritten rules that have existed in Alacritty for a long time. Unfortunately since `alacritty_terminal` imports in `alacritty` are supposed to be separate blocks, the `group_imports` option cannot be used.
* Add ExpandSelection mouse binding actionJason Heard2021-07-29
| | | Fixes #4132.
* Fix leaving vi mode with active selectiona5ob7r2021-07-07
| | | | | | | This bug comes from 530de00049c2afcc562d36ccdb3e6afa2fe396a5. The vi cursor movement changes text selection range when it is on vi mode. On the other hand the cursor movement doesn't change the range when it isn't on vi mode. So preserve text selection range by toggling vi mode early.
* Fix clippy warningsChristian Duerr2021-07-03
|
* Add modes to regex hint bindingsJoshua Ortiz2021-06-19
| | | Fixes #5154.
* Add vi/mouse hint highlighting supportChristian Duerr2021-04-13
| | | | | This patch removes the old url highlighting code and replaces it with a new implementation making use of hints as sources for finding matches in the terminal.
* Add hide other windows binding on macOSKam Kudla2021-04-08
| | | Fixes #3697.
* Add regex terminal hintsChristian Duerr2021-03-01
| | | | | | | | | | | | | | | | This adds support for hints, which allow opening parts of the visual buffer with external programs if they match a certain regex. This is done using a visual overlay triggered on a specified key binding, which then instructs the user which keys they need to press to pass the text to the application. In the future it should be possible to supply some built-in actions for Copy/Pasting the action and using this to launch text when clicking on it with the mouse. But the current implementation should already be useful as-is. Fixes #2792. Fixes #2536.
* Remove Windows WinPTY backendChristian Duerr2021-01-01
|
* Use ConfigDeserialize for all config enumsChristian Duerr2020-12-31
| | | | | | | This fixes up all of the remaining enums which are used in the configuration file to make sure they all support fully case insensitive deserialization. Fixes #4611.
* Add default binding to cancel search on Ctrl+CChristian Duerr2020-12-31
| | | Fixes #4612.
* Replace serde's derive with custom proc macroChristian Duerr2020-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the existing `Deserialize` derive from serde with a `ConfigDeserialize` derive. The goal of this new proc macro is to allow a more error-friendly deserialization for the Alacritty configuration file without having to manage a lot of boilerplate code inside the configuration modules. The first part of the derive macro is for struct deserialization. This takes structs which have `Default` implemented and will only replace fields which can be successfully deserialized. Otherwise the `log` crate is used for printing errors. Since this deserialization takes the default value from the struct instead of the value, it removes the necessity for creating new types just to implement `Default` on them for deserialization. Additionally, the struct deserialization also checks for `Option` values and makes sure that explicitly specifying `none` as text literal is allowed for all options. The other part of the derive macro is responsible for deserializing enums. While only enums with Unit variants are supported, it will automatically implement a deserializer for these enums which accepts any form of capitalization. Since this custom derive prevents us from using serde's attributes on fields, some of the attributes have been reimplemented for `ConfigDeserialize`. These include `#[config(flatten)]`, `#[config(skip)]` and `#[config(alias = "alias)]`. The flatten attribute is currently limited to at most one per struct. Additionally the `#[config(deprecated = "optional message")]` attribute allows easily defining uniform deprecation messages for fields on structs.
* Add search history supportChristian Duerr2020-12-20
| | | | | | | | | | | | This adds a history to the regex search limited to at most 255 entries. Whenever a search is either confirmed or cancelled, the last regex is entered into the history and can be accessed when a new search is started. This should help users recover complicated search regexes after accidentally discarding them, or handle repeated searches with the same regexes. Fixes #4095.
* Add separate mode for search bindingsChristian Duerr2020-12-19
|
* Bump glutin to 0.26.0Kirill Chibisov2020-12-11
| | | | | Fixes #4530. Fixes #4072. Fixes #1927.
* Bump glutin to 0.25.0Kirill Chibisov2020-10-07
| | | | | | | | | | | | Fixes #4206. Fixes #4162. Fixes #4017. Fixes #3998. Fixes #3831. Fixes #3782. Fixes #3708. Fixes #2734. Fixes #2714. Fixes #1801.
* Add ^C binding to cancel search and leave Vi modeChristian Duerr2020-08-10
| | | | Fixes #4089.