- 2025-04-28
- Linux Mint 22.1, Cinnamon v6.4.8
cinnamon-settings keyboard
will not let me remap Alt+Print
to a better screenshot tool. Let's figure out why.
https://wiki.archlinux.org/title/Cinnamon#Portable_keybindings
To export your keyboard shortcut keys to home:
dconf dump /org/cinnamon/desktop/keybindings/ > ~/keybindings-backup.dconf
To later reimport it:
dconf load /org/cinnamon/desktop/keybindings/ < ~/keybindings-backup.dconf
keybindings-backup.dconf
example output:
[/]
custom-list=['custom0', 'custom1', 'custom2', '__dummy__']
[custom-keybindings/custom0]
binding=['Print']
command='/home/snarp/scrot_screenshot_full.bash'
name='scrot screenshot'
[custom-keybindings/custom1]
binding=['<Super>Print', 'Alt_L']
command='/home/snarp/scrot_screenshot_window.bash'
name='scrot screenshot of a window'
[custom-keybindings/custom2]
binding=['<Shift>Print']
command='/home/snarp/scrot_screenshot_area.bash'
name='scrot screenshot of an area'
[media-keys]
area-screenshot=@as []
calculator=@as []
email=@as []
home=@as []
screenshot=@as []
[wm]
panel-run-dialog=['<Alt>F2', '<Alt>F3']
-
The
[custom-keybindings/*]
entries are custom keybindings I added leading to bash scripts in the home dir (containing commands likescrot -u -b "$HOME/Pictures/Screenshots/$(date +"%Y-%m-%d %H-%M-%S %3N").jpg"
). -
Below
[media-keys]
is a list of default shortcuts for which I unbound the default keybinding(s). -
Below
[wm]
is the result of adding a second keybinding forRun dialog
(the new one beingAlt-F3
).
Revert 'Take a screenshot of a window' to default (with Alt+Print
) and then add a second binding (Shift+Print
):
[/]
custom-list=['custom0', 'custom1', 'custom2']
[custom-keybindings/custom0]
binding=['Print']
command='/home/snarp/scrot_screenshot_full.bash'
name='scrot screenshot'
[custom-keybindings/custom1]
binding=['<Super>Print']
command='/home/snarp/scrot_screenshot_window.bash'
name='scrot screenshot of a window'
[custom-keybindings/custom2]
binding=['<Shift>Print']
command='/home/snarp/scrot_screenshot_area.bash'
name='scrot screenshot of an area'
[media-keys]
area-screenshot=@as []
calculator=@as []
email=@as []
home=@as []
screenshot=@as []
window-screenshot=['<Alt>Print', '<Shift>Print']
[wm]
panel-run-dialog=['<Alt>F2']
So, internally, <Alt>Print
obviously does exist: it just can't be selected within the Cinnamon GUI settings app's "accelerator selection" process, which cannot reliably detect Alt
keys as being Alt
.
It can recognize them in Alt+F3
, Alt+F
, Alt+Insert
, and many other key combinations - but cannot do so either on their own or in combination with Print
specifically. In these situations, they are detected only as Alt_R
or Alt_L
, with the Print
undetected. (Why)
Let's try to load a new version with a modification to scrot screenshot of a window
, changing binding=['<Super>Print']
to binding=['<Alt>Print']
:
[/]
custom-list=['custom0', 'custom1', 'custom2']
[custom-keybindings/custom0]
binding=['Print']
command='/home/snarp/scrot_screenshot_full.bash'
name='scrot screenshot'
[custom-keybindings/custom1]
binding=['<Alt>Print']
command='/home/snarp/scrot_screenshot_window.bash'
name='scrot screenshot of a window'
[custom-keybindings/custom2]
binding=['<Shift>Print']
command='/home/snarp/scrot_screenshot_area.bash'
name='scrot screenshot of an area'
[media-keys]
area-screenshot=@as []
calculator=@as []
email=@as []
home=@as []
screenshot=@as []
window-screenshot=@as []
[wm]
panel-run-dialog=['<Alt>F2']
dconf load /org/cinnamon/desktop/keybindings/ < ~/keybindings-backup.dconf
This still doesn't work as-is...
...but re-opening the GUI Keyboard settings editor and re-adding the <Super>Print
makes it start working! We can now use <Alt>Print
and it only took like 3 hours of research and experimenting.
Final dconf dump
output:
[/]
custom-list=['custom0', 'custom1', 'custom2', '__dummy__']
[custom-keybindings/custom0]
binding=['Print']
command='/home/snarp/scrot_screenshot_full.bash'
name='scrot screenshot'
[custom-keybindings/custom1]
binding=['<Alt>Print', '<Super>Print']
command='/home/snarp/scrot_screenshot_window.bash'
name='scrot screenshot of a window'
[custom-keybindings/custom2]
binding=['<Shift>Print']
command='/home/snarp/scrot_screenshot_area.bash'
name='scrot screenshot of an area'
[media-keys]
area-screenshot=@as []
calculator=@as []
email=@as []
home=@as []
screenshot=@as []
window-screenshot=@as []
[wm]
panel-run-dialog=['<Alt>F2']