stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Hotkeys to move prompt elements

Open missionfloyd opened this issue 1 year ago • 8 comments

Moves selected items with Ctrl+left/right. Suggested in #10593.

https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/4073789/ec60fc76-983b-45da-b8cb-115d2db31690

Environment this was tested in

  • OS: Windows 10
  • Browser: Edge

missionfloyd avatar May 23 '23 03:05 missionfloyd

Hard disagree ctrl + left / right is used for cursor navigation it is a system wide and even cross platofrm function overiding that bechavor is a bad idae

if this is going to be implemented, a different key combo must be used

w-e-w avatar May 23 '23 05:05 w-e-w

Okay, how about < / > (, / .)? Or I can make it optional.

missionfloyd avatar May 23 '23 05:05 missionfloyd

not sure, some input method use those keycombos to type special characters even though current SD prompt is english based, there are some people use translator extensions in webui so I can't be sure that it won't cause issues

btw, thers is a extensions sd-webui-prompt-all-in-one that has a prompt drag drop functon Quick adjustment

w-e-w avatar May 23 '23 05:05 w-e-w

You can also drag highlighted text, so maybe this is redundant.

missionfloyd avatar May 23 '23 05:05 missionfloyd

I wouldent go as far as saying it's redundant, it dose make rearrange ment faster and more conventnt and I do like the idea also you can always make it as an extension

w-e-w avatar May 23 '23 06:05 w-e-w

Hard disagree ctrl + left / right is used for cursor navigation it is a system wide and even cross platofrm function overiding that bechavor is a bad idae

if this is going to be implemented, a different key combo must be used

maybe use the alt modifier instead?

CapsAdmin avatar May 25 '23 17:05 CapsAdmin

maybe use the alt modifier instead?

alt left / right is used in Chrome for previous / next page imo these functions is not really useful on webui's webpage but might cause issues

w-e-w avatar May 26 '23 04:05 w-e-w

maybe use the alt modifier instead?

alt left / right is used in Chrome for previous / next page imo these functions is not really useful on webui's webpage but might cause issues

I agree with the general sentiment that you shouldn't override browser and os shortcuts on websites, but we should consider that this is more like an app and not a website you enter for a minute by browsing the internet.

I would actually find it useful to disable the forward and back history when opening the webui as I've accidentally gone back to welcome tab a few times by pressing the wrong button. Same goes with drag dropping an image on the wrong element.

CapsAdmin avatar May 26 '23 06:05 CapsAdmin

Does anyone have any options or ideas about this? The function seems useful and I'd rather have it on by default. Is overriding ctrl+left/right that wrong?

AUTOMATIC1111 avatar May 31 '23 16:05 AUTOMATIC1111

ctrl+left/right is used for quickly navigating the cursor to different segments of text this is not only useful in general but particularly useful when editing prompts furthermore this is a convention across different platforms, browsers text editors OS's, it even works in some games this behavior shouldn't be overwritten unless they have a very very very good reason

w-e-w avatar May 31 '23 16:05 w-e-w

I second using just ctrl as the modifier is wrong. Ctrl+Alt might be better but I know that's used as a global hotkey for Intel drivers to rotate the screen.

catboxanon avatar May 31 '23 16:05 catboxanon

shift or ctrl + shift is also a no-go is used for selecting text and these two can be combined to navigate and select chunks of text

w-e-w avatar May 31 '23 17:05 w-e-w

Is alt+shift anything? There's also the option of using only one ctrl key, leaving the other free.

missionfloyd avatar Jun 01 '23 05:06 missionfloyd

how hard would it be to make it possible to let user choose their own key combos?

w-e-w avatar Jun 01 '23 06:06 w-e-w

just realized one Improvement that can be done to this currently the movement is determined by the commas it doesn't take into account of brackets / parentheses

w-e-w avatar Jul 08 '23 15:07 w-e-w

Thanks for implementing my suggestion for this feature, it works great! As the right alt key isn't used by the browser, it occurred to me that using specifically the right alt key for this could be an option if overriding the browser's alt-tab functionality is a concern. DOM3 added a location property to keyboard events that allows identification of which alt key was pressed. Perhaps a user setting just in case someone has a keyboard without a right-alt key or a user can't use the right key for some reason.

nickion avatar Jul 21 '23 19:07 nickion

FYI: Disabled via Settings > User Interface > checkbox for Alt+left/right moves prompt elements

Thank you for making this a user configurable setting. This overrides commonly used word/text selection shortcuts on macOS.

swieder227 avatar Aug 01 '23 04:08 swieder227