openOutpaint/js/initalize/shortcuts.populate.js
Victor Seiji Hariki c63003e1cf
a quick try at a tool for painting
From yesterday night, just finished some final touches; should be
enough for some cool things.

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
2022-12-01 18:22:12 -03:00

28 lines
639 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: "KeyC"}, () => {
tools.colorbrush.enable();
});
keyboard.onShortcut({key: "KeyI"}, () => {
tools.img2img.enable();
});
keyboard.onShortcut({key: "KeyS"}, () => {
tools.selecttransform.enable();
});
keyboard.onShortcut({key: "KeyU"}, () => {
tools.stamp.enable();
});