Skip to content

Commit

Permalink
Alt+letter sends Escape code (#179) (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrooommmaaa committed Feb 20, 2019
1 parent 1909c4c commit 8c4c842
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gui/input.go
Expand Up @@ -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)
Expand Down

0 comments on commit 8c4c842

Please sign in to comment.