diff --git a/engine.go b/engine.go index 89b5478..9244c23 100644 --- a/engine.go +++ b/engine.go @@ -233,9 +233,6 @@ func (e *Engine) Runes() []rune { func (e *engine) updateEvents() Events { eng := (*Engine)(e) - e.prevKeys = e.keys - e.keys = inpututil. - AppendPressedKeys(e.keys[:0]) events := Events{} @@ -286,6 +283,12 @@ func (e *engine) updateEvents() Events { } e.cursorPos = realPos } + + e.prevKeys = e.keys + //newKeys := []Key{e.keys[0]} + e.keys = nil + e.keys = inpututil. + AppendPressedKeys(e.keys[:0]) // Keyboard. keyDiff := diffEm(e.prevKeys, e.keys)