In normal mode, i.e., a Sun/PC keyboard when the sunKeyboard resource is
false, xterm recognizes function key modifiers which are parameters
appended before the final character of the control sequence.
Code Modifiers
---------+---------------------------
2 | Shift
3 | Alt
4 | Shift + Alt
5 | Control
6 | Shift + Control
7 | Alt + Control
8 | Shift + Alt + Control
9 | Meta
10 | Meta + Shift
11 | Meta + Alt
12 | Meta + Alt + Shift
13 | Meta + Ctrl
14 | Meta + Ctrl + Shift
15 | Meta + Ctrl + Alt
16 | Meta + Ctrl + Alt + Shift
---------+---------------------------
For example, shift-F5 would be sent as CSI 1 5 ; 2 ~
if strings.HasPrefix(bufstr, key[:last) {
if followed by ';', then followed by a number (meta in ascii digit), then followed by key[last]
.... now we have the key and the meat value ......
}
First will need to add support for meta keys to termbox, spec: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-PC-Style-Function-Keys
So around https://github.com/tcolar/termbox-go/blob/master/termbox.go#L313 will want to add something along the lines of: