From 7d14a25482f327e09aaaf8c6ffafeacc2313c730 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 16 Aug 2024 16:17:11 -0400 Subject: [PATCH] Fixed ctrl+key combos on TextInput --- textinput.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/textinput.go b/textinput.go index 9724ca6..3d7e86c 100644 --- a/textinput.go +++ b/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