Functions to check for common buttons/keys
This commit is contained in:
@@ -87,7 +87,7 @@ func (this *TextInput) handleKeyDown (key input.Key, numpad bool) bool {
|
||||
} ()
|
||||
|
||||
switch {
|
||||
case key == input.KeyEnter:
|
||||
case isConfirmationKey(key):
|
||||
this.on.confirm.Broadcast()
|
||||
return true
|
||||
case key == input.KeyBackspace:
|
||||
@@ -114,7 +114,7 @@ func (this *TextInput) handleKeyDown (key input.Key, numpad bool) bool {
|
||||
func (this *TextInput) handleKeyUp (key input.Key, numpad bool) bool {
|
||||
modifiers := this.Window().Modifiers()
|
||||
switch {
|
||||
case key == input.KeyEnter:
|
||||
case isConfirmationKey(key):
|
||||
return true
|
||||
case key == input.KeyBackspace:
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user