Skip to content

Commit

Permalink
Ignore Escape and Tab shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
Eism authored and vpereverzev committed Jan 12, 2023
1 parent 1285ea2 commit 3caa460
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ StyledDialogView {
}

Keys.onShortcutOverride: function(event) {
event.accepted = true
event.accepted = event.key !== Qt.Key_Escape && event.key !== Qt.Key_Tab
}

Keys.onPressed: function(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ FocusScope {
}

Keys.onShortcutOverride: function(event) {
if (readOnly) {
return
}

if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return
|| event.key === Qt.Key_Escape) {
event.accepted = true
Expand Down

0 comments on commit 3caa460

Please sign in to comment.