How do I set shortcuts?

I want to set F5 as the shortcut for lowering brightness, F6 for increasing, F7 for closing the current or active window, F9 for disabling and enabling track pad etc. How do I do that? I looked in the settings, but I don't know what are the commands for these or how to find them, as there were 3 fields to fill up to set a shortcut (name, command, shortcut). Can anyone help?
Screenshot 2023-12-18 11:07:42

Closing the active window should be in the list of existing commands... it's likely already mapped to some key combination. I remapped mine to Ctrl+Q.

I'm not sure how you'd go about enabling / disabling the trackpad.

As to adjusting screen brightness, you could try:
sudo apt install xdotool
... check out the man page for that 'man xdotool' and you'll see it can do far more than just programmatically mimic keypress events. Use it to programmatically input the F5 and F6, if that's the keyboard commands that are in-built to change brightness.

Or, you can do:
xrandr -q | grep " connected"
... note the output of that commmand. Mine shows:

eDP connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 382mm x 215mm

So I can do this:
xrandr --output eDP --brightness 0.5

If you want it set back to normal:
xrandr --output eDP --brightness 1

Now, in 'Keyboard Shortcuts', you can enter a command like above, assign F5 to make the screen dim, and F6 to restore the screen to normal brightness. It's not the type where you click F5 to make it successively dimmer or F6 to make it successively brighter, but if your machine doesn't have that capability, it's about as good as one can do.

You mean that your Fn button + the F(number) don't work for you by default?

woa i need the fn ky... :man_facepalming: i moved from windows and didn't know that this thing is replaced, i need fn to use the feature and dont need fn to use the key now. lol thanks

1 Like

thanks brother for the help but seems like i can do it without it, just by using fn.. how dumb i am, didn't realize

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.