mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 15:26:09 +00:00
Add numpad Enter handlers (Keys.onEnterPressed) (#516)
This commit is contained in:
parent
87a7d2e45c
commit
fff9f2b17d
@ -245,6 +245,17 @@ CenteredGridView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
// Open the app context menu if activated via the gamepad or keyboard
|
||||||
|
// for running games. If the game isn't running, the above onClicked
|
||||||
|
// method will handle the launch.
|
||||||
|
if (model.running) {
|
||||||
|
// This will be keyboard/gamepad driven so use
|
||||||
|
// open() instead of popup()
|
||||||
|
appContextMenu.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Keys.onMenuPressed: {
|
Keys.onMenuPressed: {
|
||||||
// This will be keyboard/gamepad driven so use open() instead of popup()
|
// This will be keyboard/gamepad driven so use open() instead of popup()
|
||||||
appContextMenu.open()
|
appContextMenu.open()
|
||||||
|
@ -21,4 +21,7 @@ ItemDelegate {
|
|||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
clicked()
|
clicked()
|
||||||
}
|
}
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
clicked()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,10 @@ MenuItem {
|
|||||||
triggered()
|
triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
triggered()
|
||||||
|
}
|
||||||
|
|
||||||
Keys.onEscapePressed: {
|
Keys.onEscapePressed: {
|
||||||
parentMenu.close()
|
parentMenu.close()
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,10 @@ NavigableDialog {
|
|||||||
accept()
|
accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
accept()
|
||||||
|
}
|
||||||
|
|
||||||
Keys.onEscapePressed: {
|
Keys.onEscapePressed: {
|
||||||
reject()
|
reject()
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ ToolButton {
|
|||||||
clicked()
|
clicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
clicked()
|
||||||
|
}
|
||||||
|
|
||||||
Keys.onRightPressed: {
|
Keys.onRightPressed: {
|
||||||
nextItemInFocusChain(true).forceActiveFocus(Qt.TabFocus)
|
nextItemInFocusChain(true).forceActiveFocus(Qt.TabFocus)
|
||||||
}
|
}
|
||||||
|
@ -379,6 +379,10 @@ CenteredGridView {
|
|||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
renamePcDialog.accept()
|
renamePcDialog.accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
renamePcDialog.accept()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -358,6 +358,10 @@ Flickable {
|
|||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
customResolutionDialog.accept()
|
customResolutionDialog.accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
customResolutionDialog.accept()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@ -382,6 +386,10 @@ Flickable {
|
|||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
customResolutionDialog.accept()
|
customResolutionDialog.accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
customResolutionDialog.accept()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -495,6 +495,10 @@ ApplicationWindow {
|
|||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
addPcDialog.accept()
|
addPcDialog.accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
addPcDialog.accept()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user