mirror of https://github.com/lus/pasty.git
parent
1d2e42b737
commit
c8952e833d
|
@ -215,7 +215,7 @@ function toggleEditMode() {
|
||||||
function setupKeybinds() {
|
function setupKeybinds() {
|
||||||
window.addEventListener("keydown", (event) => {
|
window.addEventListener("keydown", (event) => {
|
||||||
// All keybinds in the default button set include the CTRL key
|
// All keybinds in the default button set include the CTRL key
|
||||||
if ((EDIT_MODE && !event.ctrlKey && event.code !== "Escape") || (!EDIT_MODE && !event.ctrlKey)) {
|
if ((EDIT_MODE && !event.ctrlKey && !event.metaKey && event.code !== "Escape") || (!EDIT_MODE && !event.ctrlKey && !event.metaKey)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,4 +435,4 @@ function insertTextAtCursor(element, text) {
|
||||||
range.text = text;
|
range.text = text;
|
||||||
range.select();
|
range.select();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue