Skip to content

Commit

Permalink
fix: numpad quick search not working
Browse files Browse the repository at this point in the history
We should at least also check keypad modifier as well

Related: #269
Issue: linuxdeepin/developer-center#8495
  • Loading branch information
BLumia committed May 10, 2024
1 parent d644129 commit 8377c05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qml/FullscreenFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ Control {
}

Keys.onPressed: {
if (searchEdit.focus === false && ((event.modifiers === Qt.NoModifier || event.modifiers === Qt.ShiftModifier) && event.text && !"\t\r\0 ".includes(event.text))) {
if (searchEdit.focus === false && ((event.modifiers === Qt.NoModifier || event.modifiers === Qt.ShiftModifier || event.modifiers === Qt.KeypadModifier) && event.text && !"\t\r\0 ".includes(event.text))) {
searchEdit.focus = true
if (searchEdit.text) {
searchEdit.text += event.text
Expand Down
2 changes: 1 addition & 1 deletion qml/windowed/WindowedFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Item {
}

Keys.onPressed: function (event) {
if (bottomBar.searchEdit.focus === false && !bottomBar.searchEdit.text && ((event.modifiers === Qt.NoModifier || event.modifiers === Qt.ShiftModifier) && event.text && !"\t\r\0 ".includes(event.text))) {
if (bottomBar.searchEdit.focus === false && !bottomBar.searchEdit.text && ((event.modifiers === Qt.NoModifier || event.modifiers === Qt.ShiftModifier || event.modifiers === Qt.KeypadModifier) && event.text && !"\t\r\0 ".includes(event.text))) {
bottomBar.searchEdit.focus = true
bottomBar.searchEdit.text = event.text
} else if (bottomBar.searchEdit.focus === true || baseLayer.focus === true) {
Expand Down

0 comments on commit 8377c05

Please sign in to comment.