summaryrefslogtreecommitdiff
path: root/x11-terms/alacritty-0.14.0-r1/meta-send-esc.patch
blob: 9267d2edc7a09fff505db606a88e13172a40d8ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git i/alacritty/src/input/keyboard.rs w/alacritty/src/input/keyboard.rs
index 1475559..3dab761 100644
--- i/alacritty/src/input/keyboard.rs
+++ w/alacritty/src/input/keyboard.rs
@@ -82,7 +82,7 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
             build_sequence(key, mods, mode)
         } else {
             let mut bytes = Vec::with_capacity(text.len() + 1);
-            if mods.alt_key() {
+            if mods.alt_key() || mods.super_key() {
                 bytes.push(b'\x1b');
             }
 
@@ -99,7 +99,7 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
 
     fn alt_send_esc(&mut self, key: &KeyEvent, text: &str) -> bool {
         #[cfg(not(target_os = "macos"))]
-        let alt_send_esc = self.ctx.modifiers().state().alt_key();
+        let alt_send_esc = self.ctx.modifiers().state().alt_key() || self.ctx.modifiers().state().super_key();
 
         #[cfg(target_os = "macos")]
         let alt_send_esc = {
@@ -118,7 +118,7 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
                     alt_send_esc
                 } else {
                     // Treat `Alt` as modifier for named keys without text, like ArrowUp.
-                    self.ctx.modifiers().state().alt_key()
+                    self.ctx.modifiers().state().alt_key() || self.ctx.modifiers().state().super_key()
                 }
             },
             _ => alt_send_esc && text.chars().count() == 1,