Fixed ctrl+key combos on TextInput
This commit is contained in:
parent
e4857da22d
commit
7d14a25482
10
textinput.go
10
textinput.go
@ -98,11 +98,7 @@ func (this *TextInput) handleKeyDown (key input.Key, numpad bool) bool {
|
||||
this.text, dot = text.Delete(this.text, dot, word)
|
||||
changed = true
|
||||
return true
|
||||
case key == input.Key('a') && modifiers.Control:
|
||||
dot.Start = 0
|
||||
dot.End = len(this.text)
|
||||
return true
|
||||
case key.Printable():
|
||||
case key.Printable() && !modifiers.Control:
|
||||
this.text, dot = text.Type(this.text, dot, rune(key))
|
||||
changed = true
|
||||
return true
|
||||
@ -120,9 +116,7 @@ func (this *TextInput) handleKeyUp (key input.Key, numpad bool) bool {
|
||||
return true
|
||||
case key == input.KeyDelete:
|
||||
return true
|
||||
case key == input.Key('a') && modifiers.Control:
|
||||
return true
|
||||
case key.Printable():
|
||||
case key.Printable() && !modifiers.Control:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user