Sfoglia il codice sorgente

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 anni fa
parent
commit
a85feb3dd8
1 ha cambiato i file con 12 aggiunte e 1 eliminazioni
  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" }