Use arrow keys to fine tune a selection

Ideas for improvements and requests for new features in XnView MP

Moderators: helmut, xnview

Post Reply
alee001
Posts: 167
Joined: Sun Sep 04, 2022 4:43 am

Use arrow keys to fine tune a selection

Post by alee001 »

When entering the image editing, after using the mouse to select a range, if fine-tuning is required, you can only use the mouse to zoom in and out but cannot use the arrow keys. This operation makes it difficult to accurately trim image pixels. I hope this can be improved and added.
User avatar
xnview
Author of XnView
Posts: 47032
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Use arrow keys to fine tune a selection

Post by xnview »

Please describe the way to reproduce
Pierre.
alee001
Posts: 167
Joined: Sun Sep 04, 2022 4:43 am

Re: Use arrow keys to fine tune a selection

Post by alee001 »

xnview wrote: Sat Dec 13, 2025 12:52 pm Please describe the way to reproduce
As shown in the example, the original image is 489x396. If you want to make minor adjustments and crop it to 488x395, you can use the arrow keys to move it to the right and down (by 1 pixel), which is much easier and faster than using a mouse.
Attachments
螢幕擷取畫面 2025-12-13 215322.jpg
螢幕擷取畫面 2025-12-13 215322.jpg (60.47 KiB) Viewed 121 times
User avatar
user0
XnThusiast
Posts: 2661
Joined: Sat May 09, 2015 9:37 am

Re: Use arrow keys to fine tune a selection

Post by user0 »

I see few options, when selection exists:
  • add new commands
    eg Ctrl+arrows - move selection 1 pixel to the direction
    pro: simple
    con: still cannot resize selection precisely or set exact size/position by entering a number
  • add new toolbar
    similar to Crop toolbar
    pro: can accommodate a lot of controls
    con: it shifts image down by the height of toolbar, which is annoying
jkm
Posts: 181
Joined: Sat May 11, 2024 12:43 am

Re: Use arrow keys to fine tune a selection

Post by jkm »

The most effective way I have seen to address this problem was to have an option to show the selection info. It's a small window (attached, or floating, it's up to you) that looks like this:
Selection Info.JPG
Selection Info.JPG (20.44 KiB) Viewed 82 times
This not only allow you to make minute adjustments to any border, with the up/down buttons for each box, but by directly typing numbers into a box you can define a precise selection area.

This method has the benefit that you do not have to override the default meaning of arrow keys within the viewer, which probably switch between images. The window only appears when a selection is made. No toolbars to take up space. If the window floats, the image position is unaffected.

Make any changes by direct entry or pressing buttons, and you see the marquee update live.

Personally, I think using the arrow keys would be a mistake. It's clumsy, limited, and adds confusion: does the arrow move the marquee, adjust its size, or switch between images? All that can be avoided with this method.

To implement finer control of selections, this is the approach I would recommend. I have used it. It is an elegant and very effective solution.
User avatar
user0
XnThusiast
Posts: 2661
Joined: Sat May 09, 2015 9:37 am

Re: Use arrow keys to fine tune a selection

Post by user0 »

jkm wrote: Sun Dec 14, 2025 3:38 am The most effective way I have seen to address this problem was to have an option to show the selection info. It's a small window (attached, or floating, it's up to you)
nah, better to have regular toolbar that can have more controls (similar to crop toolbar) and in line with app design (crop/paste toolbars instead of contextual popups)
jkm
Posts: 181
Joined: Sat May 11, 2024 12:43 am

Re: Use arrow keys to fine tune a selection

Post by jkm »

No, that’s not better.

A toolbar is less intuitive. Laid out in a row, the controls do not graphically represent the selection box. Laid out as in the example I showed, they do. It’s immediately obvious what each one does and how it affects the selection box: top bottom left right.

Smaller and tucked out of the way, like a toolbar would be, is not actually better.

And how much space do you need on your toolbar for more controls? Yes all sorts of controls could be imagined: elliptical marquees, flipping or rotating marquees, etc.

This request was about being able to more finely adjust the selection box. Extra stuff is not needed for that objective.

Since I’ve actually used an app that implements this method, I can attest from experience it’s more effective and less annoying than a straight toolbar.
User avatar
user0
XnThusiast
Posts: 2661
Joined: Sat May 09, 2015 9:37 am

Re: Use arrow keys to fine tune a selection

Post by user0 »

jkm wrote: Sun Dec 14, 2025 5:09 am This request was about being able to more finely adjust the selection box. Extra stuff is not needed for that objective.
you have to think few steps ahead as the next request will be 'finely adjust selection positioning', 'add list of custom presets', etc
also your example looks painfully overcomplicated for simple functionality of changing W and H of selection
jkm
Posts: 181
Joined: Sat May 11, 2024 12:43 am

Re: Use arrow keys to fine tune a selection

Post by jkm »

I am thinking steps ahead, and there’s ample evidence of that. Enough steps to realize that this is a trivial issue and that there are bigger fish to fry. I offered a solution that I know to work well. Whether it’s implemented or not is unimportant, because this is not critical path functionality.
user0 wrote: Sun Dec 14, 2025 5:29 am also your example looks painfully overcomplicated for simple functionality of changing W and H of selection
What an odd thing to say when one of your “cons” on a previous idea was that it lacked a way to set exact size and position by entering a number. If you have a way to enter 4 numbers for the 4 corners of a selection box with fewer than 4 entry fields, please enlighten us, and shock the world.

It could of course be simplified by leaving off the extra information, like the lines and the corner coordinates. But then it would actually be more difficult to understand, not less. This shows you your coordinates, dimensions, and resultant size, which is everything you need.

I think if you had the experience of trying this method you wouldn’t be so dismissive. It works well. I certainly haven’t seen a better idea in this thread.

But since you evidently don’t have that direct experience there’s no sense in arguing it with you.
Post Reply