Skip to content

Add Ctrl+Up/Down shortcuts for brush size adjustment in masks panel#946

Merged
CyberTimon merged 7 commits intoCyberTimon:mainfrom
mmadesignerunknown:feat-brush-resizing-shortcuts
Apr 1, 2026
Merged

Add Ctrl+Up/Down shortcuts for brush size adjustment in masks panel#946
CyberTimon merged 7 commits intoCyberTimon:mainfrom
mmadesignerunknown:feat-brush-resizing-shortcuts

Conversation

@mmadesignerunknown
Copy link
Copy Markdown
Contributor

Description

Adds keyboard shortcuts to adjust brush size while using the masks panel, making brush size adjustment faster and more intuitive during masking operations.

Currently, users need to manually drag the brush size slider. This PR adds keyboard shortcuts for quicker adjustment.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Performance improvement
  • Code refactoring
  • Documentation update
  • UI/UX improvement
  • Build/CI or Dependency update

Changes Made

  • Ctrl + Up Arrow: Increase brush size by 10px (max 200px)
  • Ctrl + Down Arrow: Decrease brush size by 10px (min 1px)
  • Added brushSettings props to useKeyboardShortcuts hook
  • Implemented arrowup/arrowdown cases in Ctrl block
  • Modified arrow key handler to only trigger zoom when Ctrl is NOT pressed
  • Brush size limits match existing slider range (1-200px)

Screenshots/Videos

https://streamable.com/armg87 (uploaded because of size issue, it will expire in 2 days, once again, sorry for the inconvenience @CyberTimon.)

Testing

  • I have tested these changes locally and confirmed that they work as expected without issues

Test Configuration:

  • OS: Windows 10
  • Hardware: Intel i5

Checklist

  • My code follows the project's code style
  • I haven't added unnecessary AI-generated code comments
  • My changes generate no new warnings or errors

Additional Notes

AI Disclaimer:

Please state the involvement of AI in this PR:

  • This PR is entirely AI-generated
  • This PR is AI-generated but guided by a human
  • This PR was handwritten with AI assistance (spell check, logic suggestions, error resolving)
  • This PR contains only blood, sweat, and coffee (AI-free)

@CyberTimon
Copy link
Copy Markdown
Owner

Thanks so much for this! If possible, can you also make that pressing shift turns the brush into the negative (eraser) brush?

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Thanks so much for this! If possible, can you also make that pressing shift turns the brush into the negative (eraser) brush?

Well it will be a lil hard to do it now, cause just found a little bug, gotta correct that first. After that, I will surely try.
and until that bug is addressed, I will be making it a draft pull request.

@mmadesignerunknown mmadesignerunknown marked this pull request as draft March 30, 2026 17:21
@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Well just discovered that the bug wasn't created by my PR, It was still there before it, although it has been solved to a significant extent,

It was basically a bug with zoom and shortcuts for zoom, but it has been fixed now (at least that's what I think),
@CyberTimon , the PR is open now for you to review,

Regards,

@CyberTimon
Copy link
Copy Markdown
Owner

CyberTimon commented Mar 30, 2026

@mmadesignerunknown

It was basically a bug with zoom and shortcuts for zoom, but it has been fixed now (at least that's what I think),

Are we talking about the arrow up / down zoom bug? I also just noticed and it's not related to your PR. But... it's also not fixed in your PR. I think you can safely undo the last commit (which changes the zoom logic) and just push the actual PR / ctrl up + ctrl down shortcuts for brush size (and maybe shift for negative brush).

We can track the other bug later :)

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Sorry For Late Response, @CyberTimon .

Sure, why not, 😁.
Will implement the shift functionality ASAP.

BTW I Updated The Color Grading PR With Tone Curves' Like Tabs UI And A 5th Tab Featuring All Wheels, So If You Don't Mind, Please Take A Look On That Too.

Regards,

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

But... it's also not fixed in your PR. I think you can safely undo the last commit (which changes the zoom logic)

If you are saying this because of the video, then I would like to inform you that that bug was fixed after the video was recorded. So it's not reflected there, I will make a video with the updated zoom arrows ASAP.

Thanks for the feedback, @CyberTimon .

Regards,

@CyberTimon
Copy link
Copy Markdown
Owner

On my phone rn, but I actually tested the changes (pulled from git). I can retest tomorrow, maybe I did something wrong on my end.. ;)

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Sure, and if the problem still persists do tell me, I will try my best to fix it,
Sorry for the delay, but on my phone RN too, so can't create the shift shortcut you mentioned, will probably do it tomorrow or the day after. 😁

Regards,

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Hi @CyberTimon ,

I found that Shift while using brush mask is already in use to create straight (not curly (like hand-drawn)) lines,
So I was thinking if we could implement the eraser shortcut to Alt instead of Shift.

BTW I just checked the zoom bug, and it's fixed now,

  • Arrow up increases zoom by 10%
  • Arrow down decreases zoom by 10%
  • Maximum zoom is 200%
  • Minimum zoom is 10%

You can test on your device too, and if there's still an issue, do inform me.
Regards,

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Hi @CyberTimon,
I have implemented the negative switch you asked, for testing

  • Hold Alt in Brush mode to temporarily switch to Eraser
  • Hold Alt in Eraser mode to temporarily switch to Brush
  • Cursor color updates in real-time to reflect active too

Keep in mind that in order for it to function as expected you will first have to release the touchpad and then release Alt.
(This and the zoom bug resolving commits are AI generated but guided by a human)
The video reference is here:

The PR is now open for you to review

@Duecki1
Copy link
Copy Markdown
Contributor

Duecki1 commented Mar 31, 2026

@mmadesignerunknown Thank you implementing all this :D

Just one thing,

Screencast.from.2026-03-31.16-35-25.mp4

When holding down ALT and erasing, then letting go of ALT it switches back to the Brush. Personally I don't really like this behavior, not sure about other people tho.

I would either want the eraser to stay erasing for the whole brush stroke or even better, only apply the eraser to that part of the brush stroke and after the user stops holding down the ALT key, it's brushing again. (The second one would be harder to implement tho, I think).

What do you think about this?

Everything else seems to work perfectly as expected.

And while we are at it, do you think you could fix this too? #910
If you compare the brush's feather with Lightroom, its quite different.

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

mmadesignerunknown commented Mar 31, 2026

Hi @Duecki1 , Thanks For Reviewing And Giving Feedback,

I also faced the problem you are facing and even tried to address that, but unfortunately I am not a developer and eventually messed up, so as of current PR everything will work as expected ONLY IF (touchpad in my case) is released before releasing the Alt button.

I will try again to fix this, but actually got an exam tomorrow so can't manage the time today, I will probably look into it the day after or something like that. Hopefully, we will be able to fix it.

As of this PR's current state, the workflow will be (Touchpad In My Case):

  • In Brush Mode, press Alt to Erase, remove your finger from the Touchpad before releasing Alt, release Alt, and it will work fine.

  • In Eraser Mode, press Alt to Brush, remove your finger from the Touchpad before releasing Alt, release Alt, and it will work fine.

Thanks alot,
Regards,

(Sorry for bad English, not my native language 🥲)

@Duecki1
Copy link
Copy Markdown
Contributor

Duecki1 commented Mar 31, 2026

Hi @Duecki1 , Thanks For Reviewing And Giving Feedback,

I also faced the problem you are facing and even tried to address that, but unfortunately I am not a developer and eventually messed up, so as of current PR everything will work as expected ONLY IF (touchpad in my case) is released before releasing the Alt button.

I will try again to fix this, but actually got an exam tomorrow so can't manage the time today, I will probably look into it the day after or something like that. Hopefully, we will be able to fix it.

As of this PR's current state, the workflow will be (Touchpad In My Case):

  • In Brush Mode, press Alt to Erase, remove your finger from the Touchpad before releasing Alt, release Alt, and it will work fine.
  • In Eraser Mode, press Alt to Brush, remove your finger from the Touchpad before releasing Alt, release Alt, and it will work fine.

Thanks alot, Regards,

(Sorry for bad English, not my native language 🥲)

Thank you,

If I find time, I will take a look at it too :).

Good luck with your exam tomorrow. And your English is not bad (mine is xD).

Linus

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

mmadesignerunknown commented Mar 31, 2026

And while we are at it, do you think you could fix this too? #910
If you compare the brush's feather with Lightroom, its quite different.

Sure, will look into that once I am done with my exams 😁.

And if you don't mind, can you please review the pull request I made about the color grading panel here #939 , would appreciate if you can.

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Hi @Duecki1 , Thanks For Reviewing And Giving Feedback,

I also faced the problem you are facing and even tried to address that, but unfortunately I am not a developer and eventually messed up, so as of current PR everything will work as expected ONLY IF (touchpad in my case) is released before releasing the Alt button.

I will try again to fix this, but actually got an exam tomorrow so can't manage the time today, I will probably look into it the day after or something like that. Hopefully, we will be able to fix it.

As of this PR's current state, the workflow will be (Touchpad In My Case):

  • In Brush Mode, press Alt to Erase, remove your finger from the Touchpad before releasing Alt, release Alt, and it will work fine.
  • In Eraser Mode, press Alt to Brush, remove your finger from the Touchpad before releasing Alt, release Alt, and it will work fine.

Thanks alot, Regards,

(Sorry for bad English, not my native language 🥲)

Thank you,

If I find time, I will take a look at it too :).

Good luck with your exam tomorrow. And your English is not bad (mine is xD).

Linus

Thanks 😁.

@Duecki1
Copy link
Copy Markdown
Contributor

Duecki1 commented Mar 31, 2026

And what would be nice too, if the brush hover would display the feather value.

image Right now its just a circle, it would be nice if it was the same as the red overlay just in blue. So the user knows the feather of the brush.

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Yups I like the idea, will look into it too,😁
Thanks for the suggestion @Duecki1 .

@Duecki1
Copy link
Copy Markdown
Contributor

Duecki1 commented Mar 31, 2026

Yups I like the idea, will look into it too,😁
Thanks for the suggestion @Duecki1 .

Thank you too for implementing this much :D

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

No Need 😅.

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

mmadesignerunknown commented Mar 31, 2026

@Duecki1

I just made a commit for feather size in brush cursor, on mobile RN so can't check if it's working correctly or not, if you are on desktop, can you please check. I would appreciate the effort 😁.

(The code was AI generated but guided by a human)
Regards

@Duecki1
Copy link
Copy Markdown
Contributor

Duecki1 commented Mar 31, 2026

@Duecki1

I just made a commit for feather size in brush cursor, on mobile RN so can't check if it's working correctly or not, if you are on desktop, can you please check. I would appreciate the effort 😁.

(The code was AI generated but guided by a human)
Regards

I can't check rn sadly. But I will do later. Thank you :)

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

I just checked it, although it doesn't create a gradient like the mask preview (I tried to impelment it but it threw errors, IDK why)

But It now has, an inner core, and an outer circle (for feather value), to give some sort of a visual hint.
and it eventually works now

@Duecki1

@CyberTimon
Copy link
Copy Markdown
Owner

Thanks for trying to implement a visualized feather effect, but lets track this in a seperate PR. I don't like the current vibecoded way. Please undo these commits :)

The rest looks very good. Can we maybe also make that ctrl (or shift?)+ scroll changes the brush size? What do you guys think?

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Thanks for the response, @CyberTimon ,

Sure, why not, I will undo these changes, sorry for the disappointment though.😅

As far as you are concerned about the shortcuts, the brush mask has these shortcuts as per the current PR.

  • Ctrl+Up/Down Arrows: Increase/Decrease Brush Size.
  • Shift While Drawing/Erasing: Creates A Straight (Not Curly Hand Drawn) Lines.
  • Alt While Drawing: Temporary Changes To Eraser.
  • Alt While Erasing: Temporary Changes To Brush (Draw).
  • Arrows Up/Down: Increase/Decrease Zoom By 10%.

IMO, These are enough.
What do you think @Duecki1 ?.

@mmadesignerunknown mmadesignerunknown force-pushed the feat-brush-resizing-shortcuts branch from cdc0e5d to 3c23a87 Compare March 31, 2026 20:45
@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

I have reverted the feather preview changes @CyberTimon .

@taigenetsudo-code
Copy link
Copy Markdown

The shortcuts sound 'spot on!' - it might be nice to have a visual brush size change popping up (somewhere obvious) when the slider is moved as well?

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

mmadesignerunknown commented Apr 1, 2026

Thanks for the feedback @taigenetsudo-code , I will look into this for sure, and if you have any other suggestions, please inform about them too. Thanks.

Regards,

@CyberTimon
Copy link
Copy Markdown
Owner

Thanks @mmadesignerunknown for your work! I've just tested it and it looks good to me. Other improvements can be tracked in another PR 👌. I will merge this now, as v1.5.3 is releasing soon.

@CyberTimon CyberTimon merged commit 67a32d2 into CyberTimon:main Apr 1, 2026
9 checks passed
@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Thanks alot @CyberTimon for accepting the contribution. 😁

@taigenetsudo-code
Copy link
Copy Markdown

Better Lightroom

@CyberTimon
Copy link
Copy Markdown
Owner

:=)

And I'm sure you guys will love the new depth masks:
image

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Can't wait to try out....😁

@Duecki1
Copy link
Copy Markdown
Contributor

Duecki1 commented Apr 1, 2026

:=)

And I'm sure you guys will love the new depth masks: image

Damn, I've always wanted to try those. Can't wait

@CyberTimon
Copy link
Copy Markdown
Owner

I'm doing some final testing and then I will release v1.5.3 💯

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

Hi @CyberTimon ,

Although I am really looking forward to the release, it will be great of you could review the pull request here too #939 and implement it before the new release.
Or if you think that it needs some improvements, kindly suggest the edits you would like to add so that I can implement them, eventually making it suitable for the next release.

I hope you won't get annoyed, Thanks,

Regards,

@CyberTimon
Copy link
Copy Markdown
Owner

@mmadesignerunknown

Thanks for the note. I will review it after my holidays and push it into the next release (v1.5.4). Version v1.5.3 is already out now ;)

Have a nice evening,
Timon

@mmadesignerunknown
Copy link
Copy Markdown
Contributor Author

mmadesignerunknown commented Apr 1, 2026

Thank you @CyberTimon . Have a nice holiday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants