openOutpaint/js/shortcuts.js
Victor Seiji Hariki 2eb6e6ff3e add img2img tool and refactor tool context menus
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>

Former-commit-id: 3a36d0e0d7004142ee8d1ecdec14bb905db4919f
2022-11-22 22:24:04 -03:00

19 lines
414 B
JavaScript

// Listen for shortcuts
keyboard.onShortcut({ctrl: true, key: "KeyZ"}, () => {
commands.undo();
});
keyboard.onShortcut({ctrl: true, key: "KeyY"}, () => {
commands.redo();
});
// Tool shortcuts
keyboard.onShortcut({key: "KeyD"}, () => {
tools.dream.enable();
});
keyboard.onShortcut({key: "KeyM"}, () => {
tools.maskbrush.enable();
});
keyboard.onShortcut({key: "KeyI"}, () => {
tools.img2img.enable();
});