How do I adjust the brightness/contrast step size on the shortcuts in KDE?

I faced a similar problem some time ago. I decided to dig into the code, and here are my conclusions:

KDE’s keyboard Brightness Up and Brightness Down key handling code has a special way of calculating the increment value/step size. Unfortunately that “special way” is hard-coded. Hence, unless you want to mess with building KDE from sources, there’s nothing you can do with it. For me the increment value by using the keyboard keys is 5.


That leaves us with trying out different ways to change brightness with a different increment value.

You can use your mouse and slide over the battery icon to change brightness but we cannot control the increment value there. The files for the battery plasmoid are in /usr/share/plasma/plasmoids/org.kde.plasma.battery.

You can also use krunner to set the brightness. Launch it with Alt+Space and type screen brightness 60 to set the brightness level to 60.

Final and the best way is to install xorg-xbacklight package to change brightness with any value. You can create a custom shortcut for which executes a script everytime it gets active. You put these in ~/.local/bin and make sure they are executable.

#!/bin/sh

#increase brightness with a 5% step value
xbacklight -inc 5
#!/bin/sh

#decrease brightness with a 5% step value
xbacklight -dec 5