fix: fixed wrong work with the inpututil.AppendPressedKey(...).
This commit is contained in:
parent
7c6f8f8f45
commit
eda12973e9
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue