mirror of https://github.com/gdamore/tcell.git
convert shift+tab to backtab
This commit is contained in:
parent
2f258105ca
commit
bac54371ba
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue