convert shift+tab to backtab

This commit is contained in:
Joe Grasse 2018-04-12 08:52:07 -05:00 committed by Garrett D'Amore
parent 2f258105ca
commit bac54371ba
1 changed files with 8 additions and 2 deletions

View File

@ -565,8 +565,14 @@ func (s *cScreen) getConsoleInput() error {
if krec.ch != 0 {
// synthesized key code
for krec.repeat > 0 {
s.PostEvent(NewEventKey(KeyRune, rune(krec.ch),
mod2mask(krec.mod)))
// convert shift+tab to backtab
if mod2mask(krec.mod) == ModShift && krec.ch == vkTab {
s.PostEvent(NewEventKey(KeyBacktab, 0,
ModNone))
} else {
s.PostEvent(NewEventKey(KeyRune, rune(krec.ch),
mod2mask(krec.mod)))
}
krec.repeat--
}
return nil