Skip to content
Myr

Fix a bug where control keys weren't being properly mapped

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent 208f421 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:key.go+2 added-2 removed
44 unmodified lines
45 KeyRight46 KeyLeft47 KeyUnitSeparator48 KeyBackspace49 KeyRune49 KeyRune = -150)5152// Friendly key names53var keyNames = map[KeyType]string{
56 unmodified lines
110 }111112 // Is it a control character?113 if n == 1 && c <= keyUS || c == keyDEL {114 if k, ok := controlKeys[n]; ok {114 if k, ok := controlKeys[int(c)]; ok {115 return Key{Type: k}, nil116 }117 }118
14 unmodified lines