Browse Source

Improve shorcuts - Related to plexinc/plex-media-player-private#523

Tobias Hieta 8 years ago
parent
commit
5d6804aab1
2 changed files with 28 additions and 8 deletions
  1. 2 0
      resources/inputmaps/keyboard.json
  2. 26 8
      src/ui/webview.qml

+ 2 - 0
resources/inputmaps/keyboard.json

@@ -51,6 +51,8 @@
     // application shortcuts
     "Ctrl\\+Shift\\+F": "host:fullscreen",
     "Meta\\+Ctrl\\+F": "host:fullscreen",
+    "Meta\\+Enter": "host:fullscreen",
+    "F11": "host:fullscreen",
     "Ctrl\\+Q": "host:close",
     "Ctrl\\+Shift\\+R": "host:reload",
     "Ctrl\\+Shift\\+D": "host:toggleDebug",

+ 26 - 8
src/ui/webview.qml

@@ -30,6 +30,23 @@ KonvergoWindow
     action_selectall.enabled = enable
     action_fullscreen_win.enabled = enable
     action_fullscreen_mac.enabled = enable
+    action_fullscreen_win_alt.enabled = enable
+    action_quit.enabled = enable
+    action_quit_win.enabled = enable
+  }
+
+  Action
+  {
+    id: action_quit
+    shortcut: "Ctrl+Q"
+    onTriggered: mainWindow.close()
+  }
+
+  Action
+  {
+    id: action_quit_win
+    shortcut: "Alt+F4"
+    onTriggered: mainWindow.close()
   }
 
   Action
@@ -39,24 +56,25 @@ KonvergoWindow
     onTriggered: mainWindow.toggleDebug()
   }
 
+  Action
+  {
+    id: action_fullscreen_win_alt
+    shortcut: "Alt+Return"
+    onTriggered: mainWindow.toggleFullscreen()
+  }
+
   Action
   {
     id: action_fullscreen_win
     shortcut: "F11"
-    onTriggered:
-    {
-      mainWindow.toggleFullscreen()
-    }
+    onTriggered: mainWindow.toggleFullscreen()
   }
 
   Action
   {
     id: action_fullscreen_mac
     shortcut: "Ctrl+Meta+F"
-    onTriggered:
-    {
-      mainWindow.toggleFullscreen()
-    }
+    onTriggered: mainWindow.toggleFullscreen()
   }
 
   Action