From 8c4c842ff1501ab72eeca88ac1d81c76ace3bd5d Mon Sep 17 00:00:00 2001 From: rrrooommmaaa Date: Wed, 20 Feb 2019 17:12:57 +0300 Subject: [PATCH] Alt+letter sends Escape code (#179) (#226) --- gui/input.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/input.go b/gui/input.go index eda87fd..bc016c2 100644 --- a/gui/input.go +++ b/gui/input.go @@ -78,6 +78,14 @@ func (gui *GUI) key(w *glfw.Window, key glfw.Key, scancode int, action glfw.Acti return } } + + // pass through alt codes + if modsPressed(mods, glfw.ModAlt) { + if r >= 97 && r < 123 || r >= 65 && r < 91 { + gui.terminal.Write([]byte{0x1b, byte(r)}) + return + } + } } modStr := getModStr(mods)