ui/key: rename ChordEvent to just Event

Event is like pointer.Event and we don't want the stuttering of
key.KeyEvent.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-11 12:49:23 +02:00
parent 2a41ff9a59
commit 340fff9814
9 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -14,8 +14,8 @@ import (
"gioui.org/ui/input"
"gioui.org/ui/key"
"gioui.org/ui/layout"
"gioui.org/ui/pointer"
"gioui.org/ui/paint"
"gioui.org/ui/pointer"
"golang.org/x/image/math/fixed"
)
@@ -118,7 +118,7 @@ func (e *Editor) Next(cfg ui.Config, queue input.Queue) (EditorEvent, bool) {
switch ke := ke.(type) {
case key.FocusEvent:
e.focused = ke.Focus
case key.ChordEvent:
case key.Event:
if !e.focused {
break
}
@@ -559,7 +559,7 @@ func (e *Editor) scrollToCaret(cfg ui.Config) {
}
}
func (e *Editor) command(k key.ChordEvent) bool {
func (e *Editor) command(k key.Event) bool {
switch k.Name {
case key.NameReturn, key.NameEnter:
e.append("\n")