mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
ENH:keyboard shortcut in macos
1.fix:global shortcut cannot use in webview panel 2.fix:ban original web-shortcut in webview 3.add cmd+q & cmd+h shortcut in macos 4.move some global shortcut to prepare panel Change-Id: I17ba3c86069dab92df754a319d0c0c3d77b34d74
This commit is contained in:
parent
042e17952c
commit
1a8e5295b2
4 changed files with 147 additions and 57 deletions
|
@ -215,4 +215,16 @@ function BeginDownloadNetworkPlugin()
|
|||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
function OutputKey(keyCode, isCtrlDown, isShiftDown, isCmdDown) {
|
||||
var tSend = {};
|
||||
tSend['sequence_id'] = Math.round(new Date() / 1000);
|
||||
tSend['command'] = "get_web_shortcut";
|
||||
tSend['key_event'] = {};
|
||||
tSend['key_event']['key'] = keyCode;
|
||||
tSend['key_event']['ctrl'] = isCtrlDown;
|
||||
tSend['key_event']['shift'] = isShiftDown;
|
||||
tSend['key_event']['cmd'] = isCmdDown;
|
||||
|
||||
SendWXMessage(JSON.stringify(tSend));
|
||||
}
|
||||
window.postMessage = HandleStudio;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue