瀏覽代碼

Allow shortcuts to be empty and to have win/mac/linux-specific keys.

Phosphor allows shortcuts to be empty, and it’s the only way to have platform-specific shortcuts (define keys to be [], and the platform keys to be something specific).

See https://github.com/phosphorjs/phosphor/issues/438 for some discussion.
Jason Grout 5 年之前
父節點
當前提交
a85feb3dd8
共有 1 個文件被更改,包括 12 次插入1 次删除
  1. 12 1
      packages/shortcuts-extension/schema/shortcuts.json

+ 12 - 1
packages/shortcuts-extension/schema/shortcuts.json

@@ -22,7 +22,18 @@
         "command": { "type": "string" },
         "keys": {
           "items": { "type": "string" },
-          "minItems": 1,
+          "type": "array"
+        },
+        "winKeys": {
+          "items": { "type": "string" },
+          "type": "array"
+        },
+        "macKeys": {
+          "items": { "type": "string" },
+          "type": "array"
+        },
+        "linuxKeys": {
+          "items": { "type": "string" },
           "type": "array"
         },
         "selector": { "type": "string" }