vt: correct mapping of keyboard function keys above F10
commit7723dfbd2bbae15b125bcb316ed9671698a16a45
authorRoss Mohn <rpmohn@waxandwane.org>
Sun, 16 Dec 2012 13:00:55 +0000 (16 14:00 +0100)
committerMarc Andre Tanner <mat@brain-dump.org>
Sun, 16 Dec 2012 13:00:55 +0000 (16 14:00 +0100)
tree56580bf9f28b6648c31db70508861f89f6be5c0b
parent892fa039ce87e559ab0a59112a349b7183bda26b
vt: correct mapping of keyboard function keys above F10

The way I think it should work is that PC keyboard keys F1 - F12 are
mapped to VT function keys F1 - F12 and shift+F1 - shift+F12 on the PC
keyboard are mapped to VT function keys F11 - F22. What this means is
that VT function keys F11 and F12 overlap and have two PC keyboard
mappings each, e.g. F11 and shift+F1 both map to VT F11.

In practice, terminal emulators seem to either implement both mappings,
or leave out the mappings for shift+F1 and shift+F2. The issue within
the curses/ncurses library, and therefor within dvtm, is that shift+F1
triggers KEY_F(13) which should then be mapped to the F11 escape
sequence, not the F13 escape sequence.

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>
vt.c