05-03-26
Brush Size Control with Scroll Wheel
This Lua script for Rebind hardware input allows you to control brush size in drawing applications using your scroll wheel. Hold a modifier key and scroll to adjust the brush size, enhancing your work
Question
How can I control brush size with the scroll wheel in drawing applications?
Rebind AI
Here's a script that allows you to control brush size using the scroll wheel while holding a modifier key (default: Left Alt). It works by sending Ctrl+Scroll events, which is a common shortcut for brush size adjustment in many drawing applications.
-- rebind: name=Brush Size Control
-- rebind: description=Scroll wheel adjusts brush size in drawing apps
local cfg = UI.Schema({
modifier = UI.Keybind("LAlt", { label = "Modifier Key", tooltip = "Hold this key while scrolling" }),
step_size = UI.Slider(1, { min = 1, max = 10, label = "Step Size", suffix = "px" }),
})
function OnScroll(delta)
if not Input.IsDown(cfg.modifier) then
return true
end
-- Hold Ctrl and scroll to adjust brush size
-- Most drawing apps (Photoshop, Krita, Clip Studio, etc.) use this
HID.Down("LCtrl")
HID.Scroll(delta * cfg.step_size)
HID.Up("LCtrl")
return false
endHow it works:
When you hold the modifier key (default Alt) and scroll your mouse wheel, the script intercepts the scroll event and converts it to Ctrl+Scroll. Most drawing applications interpret Ctrl+Scroll as "change brush size":
- Scroll up → increase brush size
- Scroll down → decrease brush size
The step_size slider lets you control the sensitivity — higher values make the brush size change more dramatically per scroll notch.
Compatible apps:
- Photoshop
- Krita
- Clip Studio Paint
- Procreate Dreams
- GIMP
- Paint Tool SAI
- Aseprite
- Autodesk Sketchbook
You can customize the modifier key to use Shift, Ctrl, or any other key, depending on your drawing app's hotkey preferences.
Learn more: