diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2023-12-06 09:26:07 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 09:26:07 +0400 |
commit | cb03806e2ab85674c45e87e1bb24dfe2fd1a918c (patch) | |
tree | 3561fc6785281fb3a963c199fe9a12df4007bed7 /alacritty/src/config/ui_config.rs | |
parent | 7c9d9f3b166f2aade76d35408b5acb5d3ccd1c94 (diff) | |
download | r-alacritty-cb03806e2ab85674c45e87e1bb24dfe2fd1a918c.tar.gz r-alacritty-cb03806e2ab85674c45e87e1bb24dfe2fd1a918c.tar.bz2 r-alacritty-cb03806e2ab85674c45e87e1bb24dfe2fd1a918c.zip |
Implement kitty's keyboard protocol
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.
Diffstat (limited to 'alacritty/src/config/ui_config.rs')
-rw-r--r-- | alacritty/src/config/ui_config.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs index a76bbb78..f4f67cb6 100644 --- a/alacritty/src/config/ui_config.rs +++ b/alacritty/src/config/ui_config.rs @@ -10,14 +10,15 @@ use log::{error, warn}; use serde::de::{Error as SerdeError, MapAccess, Visitor}; use serde::{self, Deserialize, Deserializer}; use unicode_width::UnicodeWidthChar; -use winit::keyboard::{Key, KeyLocation, ModifiersState}; +use winit::keyboard::{Key, ModifiersState}; use alacritty_config_derive::{ConfigDeserialize, SerdeReplace}; use alacritty_terminal::term::search::RegexSearch; use crate::config::bell::BellConfig; use crate::config::bindings::{ - self, Action, Binding, BindingKey, KeyBinding, ModeWrapper, ModsWrapper, MouseBinding, + self, Action, Binding, BindingKey, KeyBinding, KeyLocation, ModeWrapper, ModsWrapper, + MouseBinding, }; use crate::config::color::Colors; use crate::config::cursor::Cursor; @@ -152,11 +153,12 @@ impl UiConfig { /// Derive [`TermConfig`] from the config. pub fn term_options(&self) -> TermConfig { TermConfig { + semantic_escape_chars: self.selection.semantic_escape_chars.clone(), scrolling_history: self.scrolling.history() as usize, - default_cursor_style: self.cursor.style(), vi_mode_cursor_style: self.cursor.vi_mode_style(), - semantic_escape_chars: self.selection.semantic_escape_chars.clone(), + default_cursor_style: self.cursor.style(), osc52: self.terminal.osc52.0, + kitty_keyboard: true, } } |