trigger script by using ctrl+Function keys

This commit is contained in:
2023-07-30 23:32:16 +02:00
parent c50203a6f5
commit 1d5126fe90

View File

@ -249,9 +249,15 @@ export class Editor {
(keycode, index) => {
if (event.keyCode === keycode) {
event.preventDefault();
// Check if Ctrl is pressed as well
if (event.ctrlKey) {
// We trigger a script if ctrl is pressed
this.api.script(keycode - 111)
} else {
this.changeToLocalBuffer(index);
}
}
}
);
});