add shift-e hot key to open bambu dialog
This commit is contained in:
parent
a8e2f1ddb4
commit
ac1982b923
3 changed files with 28 additions and 0 deletions
|
|
@ -478,6 +478,20 @@ self.kiri.load(api => {
|
|||
return luminance > 0.5 ? "000000" : "FFFFFF";
|
||||
}
|
||||
|
||||
api.onkey(ev => {
|
||||
if (ev.key && ev.key.code === 'KeyE' && ev.key.shiftKey) {
|
||||
let cdev = api.conf.get().device;
|
||||
if (!printers) {
|
||||
printers = cdev.extras?.bbl;
|
||||
}
|
||||
if (printers) {
|
||||
device = device || cdev;
|
||||
api.modal.show('bambu');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
api.event.on("init-done", function() {
|
||||
if (init) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue