Fix random shortcuts getting triggered

Caused the "window bounces when typing text" bug
This commit is contained in:
miruka 2019-08-30 19:06:09 -04:00
parent 6953250e50
commit e506a70767
3 changed files with 8 additions and 6 deletions

View File

@ -13,7 +13,6 @@
- Fixes
- make install
- Make uvloop optional
- Icons on KDE
- Distribute fonts
- Backspace bug
- Add missing shortcuts to config file

View File

@ -43,14 +43,17 @@ Item {
if (! shortcut.enabled) continue
if (typeof(shortcut.sequences) == "string" &&
sequenceMatches(event, shortcut.sequences)) return shortcut
if (typeof(shortcut.sequences) == "string") {
return sequenceMatches(event, shortcut.sequences) ?
shortcut : null
}
for (let i = 0; i < shortcut.sequences.length; i++) {
if (sequenceMatches(event, shortcut.sequences[i]))
if (sequenceMatches(event, shortcut.sequences[i])) {
return shortcut
}
}
}
return null
}
}

View File

@ -14,10 +14,10 @@ Rectangle {
property alias shortcuts: shortcuts
property alias sidePane: sidePane
property alias pageLoader: pageLoader
property alias pressAnimation: _pressAnimation
property alias pressAnimation: pressAnimation
SequentialAnimation {
id: _pressAnimation
id: pressAnimation
HNumberAnimation {
target: mainUI; property: "scale"; from: 1.0; to: 0.9
}