mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1322033 - "Patch to support Function Keys in WebExtensions". r=kmag
This commit is contained in:
parent
76edc7645b
commit
e7c67bac3c
@ -13,6 +13,10 @@
|
||||
"type": "string",
|
||||
"pattern": "^\\s*(Alt|Ctrl|Command|MacCtrl)\\s*\\+\\s*(Shift\\s*\\+\\s*)?([A-Z0-9]|Comma|Period|Home|End|PageUp|PageDown|Space|Insert|Delete|Up|Down|Left|Right)\\s*$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^\\s*((Alt|Ctrl|Command|MacCtrl)\\s*\\+\\s*)?(Shift\\s*\\+\\s*)?(F[1-9]|F1[0-2])\\s*$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^(MediaNextTrack|MediaPlayPause|MediaPrevTrack|MediaStop)$"
|
||||
|
@ -98,6 +98,25 @@ add_task(function* test_user_defined_commands() {
|
||||
shiftKey: true,
|
||||
},
|
||||
},
|
||||
// Function keys
|
||||
{
|
||||
name: "function-keys-Alt+Shift+F3",
|
||||
shortcut: "Alt+Shift+F3",
|
||||
key: "VK_F3",
|
||||
modifiers: {
|
||||
altKey: true,
|
||||
shiftKey: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "function-keys-F2",
|
||||
shortcut: "F2",
|
||||
key: "VK_F2",
|
||||
modifiers: {
|
||||
altKey: false,
|
||||
shiftKey: false,
|
||||
},
|
||||
},
|
||||
// Misc Shortcuts
|
||||
{
|
||||
name: "valid-command-with-unrecognized-property-name",
|
||||
|
@ -15,7 +15,8 @@ add_task(function* test_manifest_commands() {
|
||||
|
||||
let expectedError = (
|
||||
String.raw`commands.toggle-feature.suggested_key.default: Value must either: ` +
|
||||
String.raw`match the pattern /^\s*(Alt|Ctrl|Command|MacCtrl)\s*\+\s*(Shift\s*\+\s*)?([A-Z0-9]|Comma|Period|Home|End|PageUp|PageDown|Space|Insert|Delete|Up|Down|Left|Right)\s*$/, or ` +
|
||||
String.raw`match the pattern /^\s*(Alt|Ctrl|Command|MacCtrl)\s*\+\s*(Shift\s*\+\s*)?([A-Z0-9]|Comma|Period|Home|End|PageUp|PageDown|Space|Insert|Delete|Up|Down|Left|Right)\s*$/, ` +
|
||||
String.raw`match the pattern /^\s*((Alt|Ctrl|Command|MacCtrl)\s*\+\s*)?(Shift\s*\+\s*)?(F[1-9]|F1[0-2])\s*$/, or ` +
|
||||
String.raw`match the pattern /^(MediaNextTrack|MediaPlayPause|MediaPrevTrack|MediaStop)$/`
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user