Repository: alacritty/alacritty (language: rust)

Issue:
Arrow keys print  (up, down, left, right) instead of moving the cursor.
Since cb03806e2ab85674c45e87e1bb24dfe2fd1a918c pressing the arrow keys prints one of these characters:
- UP:  
- Down: 
- Left: 
- Right: 

I obviously expected that they'd make the cursor go one character in the respective direction instead.

### System

OS: macOS
Version: alacritty 0.13.0-dev (cb03806e)

### Logs

`alacritty --print-events` log of a window where I pressed "Arrow Up", "Arrow Down", "Arrow Left", "Arrow Right" and then closed the window with "cmd+w": [print-events.log](https://github.com/alacritty/alacritty/files/13595220/print-events.log)


Discussion / hints:

Fix patch:
diff --git a/alacritty/src/input/keyboard.rs b/alacritty/src/input/keyboard.rs
index 94633cb1207..9db67f4255c 100644
--- a/alacritty/src/input/keyboard.rs
+++ b/alacritty/src/input/keyboard.rs
@@ -107,15 +107,19 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
         mods: ModifiersState,
     ) -> bool {
         if mode.contains(TermMode::REPORT_ALL_KEYS_AS_ESC) {
-            true
-        } else if mode.contains(TermMode::DISAMBIGUATE_ESC_CODES) {
-            let on_numpad = key.location == KeyLocation::Numpad;
-            let is_escape = key.logical_key == Key::Named(NamedKey::Escape);
-            is_escape || (!mods.is_empty() && mods != ModifiersState::SHIFT) || on_numpad
-        } else {
-            // `Delete` key always has text attached to it, but it's a named key, thus needs to be
-            // excluded here as well.
-            text.is_empty() || key.logical_key == Key::Named(NamedKey::Delete)
+            return true;
+        }
+
+        let disambiguate = mode.contains(TermMode::DISAMBIGUATE_ESC_CODES)
+            && (key.logical_key == Key::Named(NamedKey::Escape)
+                || (!mods.is_empty() && mods != ModifiersState::SHIFT)
+                || key.location == KeyLocation::Numpad);
+
+        match key.logical_key {
+            _ if disambiguate => true,
+            // Exclude all the named keys unless they have textual representation.
+            Key::Named(named) => named.to_text().is_none(),
+            _ => text.is_empty(),
         }
     }
 


Test patch: