for #10650: change key to alt+arrows, enable by default

This commit is contained in:
AUTOMATIC1111
2023-07-08 16:15:28 +03:00
parent 12a29a677a
commit 7a6abc59ea
2 changed files with 6 additions and 2 deletions

View File

@@ -1,8 +1,12 @@
/* alt+left/right moves text in prompt */
function keyupEditOrder(event) {
if (!opts.keyedit_move) return;
let target = event.originalTarget || event.composedPath()[0];
if (!target.matches("*:is([id*='_toprow'] [id*='_prompt'], .prompt) textarea")) return;
if (!event.metaKey && !event.ctrlKey) return;
if (!event.altKey) return;
event.preventDefault()
let isLeft = event.key == "ArrowLeft";
let isRight = event.key == "ArrowRight";