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) this.text, dot = text.Delete(this.text, dot, word)
changed = true changed = true
return true return true
case key == input.Key('a') && modifiers.Control: case key.Printable() && !modifiers.Control:
dot.Start = 0
dot.End = len(this.text)
return true
case key.Printable():
this.text, dot = text.Type(this.text, dot, rune(key)) this.text, dot = text.Type(this.text, dot, rune(key))
changed = true changed = true
return true return true
@ -120,9 +116,7 @@ func (this *TextInput) handleKeyUp (key input.Key, numpad bool) bool {
return true return true
case key == input.KeyDelete: case key == input.KeyDelete:
return true return true
case key == input.Key('a') && modifiers.Control: case key.Printable() && !modifiers.Control:
return true
case key.Printable():
return true return true
default: default:
return false return false