Remap Keyboard Shortcut for Brightness Changing
First of all, I should clarify that I am attempting to run version 20.04 on a Chromebook. The hotkeys of a Chromebook become function keys when replacing ChromeOS with Ubuntu.
If I am using Kubuntu, there are readily-available settings to remap the keyboard shortcuts for brightness changing. I am aware that the default version of Ubuntu 20.04 also has a settings panel for remapping keyboard shortcuts.
However, unlike the KDE desktop, the default version of Ubuntu does not have the brightness change option as one of the default keyboard shortcuts, and therefore, I will have to type the command myself. I have tried doing this, but I am not satisfied with the result.
When I remap the keyboard shortcut on KDE, I am able to incrementally increase the brightness as I wish. But in the default version of Ubuntu, with the commands I have put in, I am only able to set a Low brightness, and a High brightness. I can set nothing in between.
This might be due to my limited knowledge. May I know if there is an approach in which I can set a command to incrementally increase brightness, and another to incrementally decrease brightness? In other words, is there a command I can enter such that the brightness is decreased or increased by 0.1 points?
If there is no such command, is it possible to do the same thing by writing a script instead?
Workaround
for increasing by 0.1 add the below command as custom keyboard shortcut
sh -c 'gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepUp && gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepUp'
for decreasing by 0.1
sh -c 'gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepDown && gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepDown'
Note: set the brightness by zero or 100 via GUI for the first time and then use the keyboard shortcuts to have perfect multiples of 10