Fixed ctrl+key combos on TextInput

This commit is contained in:
Sasha Koshka 2024-08-16 16:17:11 -04:00
parent e4857da22d
commit 7d14a25482

View File

@ -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