mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user