我正在开发一个chrome扩展程序,我正在为某些操作设置快捷方式。但问题是我无法使用清单文件设置快捷方式( Alt + Z + 3 )
"commands": {
"fullScreen": {
"suggested_key": {
"default": "Alt+Z+3",
"mac": "Alt+Z+3"
},
"description": "Test"
},
"_execute_browser_action": {
"suggested_key": {
"windows":"Alt+Z+3",
"mac":"Alt+Z+3",
"chromeos": "Alt+Z+3",
"linux":"Alt+Z+3"
}
},
"_execute_page_action": {
"suggested_key": {
"default": "Alt+Z+3",
"windows": "Alt+Z+3",
"mac": "Alt+Z+3"
}
}
},
会抛出 Invalid value for 'commands[1].mac': Alt+Z+3.
等错误
但当我将快捷方式更改为( Alt + Shift + 3 )
"commands": {
"fullScreen": {
"suggested_key": {
"default": "Alt+Shift+3",
"mac": "Alt+Shift+3"
},
"description": "Toggle feature foo"
},
"_execute_browser_action": {
"suggested_key": {
"windows":"Alt+Shift+3",
"mac":"Alt+Shift+3",
"chromeos": "Alt+Shift+3",
"linux":"Alt+Shift+3"
}
},
"_execute_page_action": {
"suggested_key": {
"default": "Alt+Shift+3",
"windows": "Alt+Shift+3",
"mac": "Alt+Shift+3"
}
}
},
它没有抛出任何错误。如何在扩展名中设置Alt + Z + 3的快捷方式。
答案 0 :(得分:1)
你不能使用这种组合。
该计划如下:
(Alt | Ctrl) + [Shift] + <N>
其中:
A-Z,0-9,逗号,句号,主页,结束,PageUp,PageDown,空格,插入,删除,箭头键和媒体键。
此外,您可以使用“configure commands”对话框测试组合:
chrome://extensions/configureCommands