Where are Keyboard Shortcuts Kept?

Chiff

New Member
Joined
Feb 11, 2022
Messages
3
Reaction score
2
Credits
28
Hi,

What file are all the "Keyboard Shortcuts" that I add kept in and where is the File so I can keep a backup of my Custom made Shortcuts.

Thanks.
 


G'day @Chiff and welcome to linux.org :)

First, just a small lesson on forum protocol and etiquette which applies not only here, but around other forums as well.

You have this here at Fedora

https://forums.fedoraforum.org/showthread.php?327954-Keyboard-Shortcuts-Kept

currently.

We can't be expected to be mindreaders (my crystal ball is in at the shop for service), nor their helpers - in knowing what has been asked and input elsewhere.

Please don't do it - close one or the other if you feel you are not getting helped.

On your subject matter, what DE (desktop environment) are you using - GNOME, or one of the community flavours, and if so which?

Cheers

Chris Turner
wizardfromoz
 
G'day @Chiff and welcome to linux.org :)

First, just a small lesson on forum protocol and etiquette which applies not only here, but around other forums as well.

You have this here at Fedora

https://forums.fedoraforum.org/showthread.php?327954-Keyboard-Shortcuts-Kept

currently.

We can't be expected to be mindreaders (my crystal ball is in at the shop for service), nor their helpers - in knowing what has been asked and input elsewhere.

Please don't do it - close one or the other if you feel you are not getting helped.

On your subject matter, what DE (desktop environment) are you using - GNOME, or one of the community flavours, and if so which?

Cheers

Chris Turner
wizardfromoz
Am sorry But I use Fedora and surely someone using Fedora might know an answer to my question.
Fedora 35 standard Gnome.

That was on a different forum from this and no one answered me and so I joined this one today.

You could be nice and not rude to me. My question is in the right place and is a decent question.
 
Last edited:
AFAIK Gnome uses a registry. It used to be called gconf. I think it's now called dconf.

From doing a quick bit of duckduckgo-fu - this thread on the askubuntu.com forum might help you a little. (I know you're running Fedora, but you're still running Gnome, so it should still be relevant!)

Personally, I don't use Gnome. I use dwm. So all of my custom keybinds are in a C header file. So if I make any changes to my keybinds, I have to re-compile and re-install dwm and then log out and back in again! Ha ha!
 
AFAIK Gnome uses a registry. It used to be called gconf. I think it's now called dconf.

From doing a quick bit of duckduckgo-fu - this thread on the askubuntu.com forum might help you a little. (I know you're running Fedora, but you're still running Gnome, so it should still be relevant!)

Personally, I don't use Gnome. I use dwm. So all of my custom keybinds are in a C header file. So if I make any changes to my keybinds, I have to re-compile and re-install dwm and then log out and back in again! Ha ha!
Firstly, thank you for your kind help. I really appreciate it. Am only new to Linux.

I have used a couple of other Distros but had issues with them crashing. Eg: Mx, Mint.

Please know that I am Not an expert or a Coder. Just a simple user.

Kind regards to you.
 
@unprepar3D the OP is asking where such changes are stored (name and location of a file), not how to change them. :)

Cheers

Wiz
 
gsettings get org.gnome.libgnomekbd.keyboard option

gsettings --help

gsettings get org.gnome.desktop.wm.keybindings

(press tab) to see the options.
 
Last edited:
There are a number of ways of achieving what the OP seeks to do, but in my opinion, the simplest way with the least amount of work is to copy or backup one file, after you have added shortcuts, and that is -

~/.config/dconf/user

This is a binary file, not a text file, and so its content cannot be easily read unless an intermediary method is used (such as dconf-editor).

The tilde ~ is short for

/home/your_user_name

So for me, that would be

/home/chris/.config/dconf/user

The dot before config indicates a hidden file or folder, in this case, a folder.

To see these in your File Manager (Nautilus aka Files, under GNOME), you can either toggle their appearance and disappearance with the use of

Ctrl-h

or set the preferences to show hidden files and folders if your FM's preferences accommodate same.

So if you incorporate the saving, backing up, or snapshotting (the latter with eg Timeshift for EXT4 or Snapper for BTRFS) to include that file, you can preserve your Custom Keyboard Shortucts as well as other settings.

The use of a GUI settings editor such as dconf-editor

sudo dnf install dconf-editor

will allow you to see the hierarchical structure of how settings are stored, and the content, such as

org.gnome.libgnomekbd.keyboard

(and to change same)

that @dos2unix describes above.

The use of the commands

dconf and gsettings

can also allow you to get, set and dump settings content in a user-friendly format, including text files that can be stored any way you like.

If you have need of further elaboration, just ask.

Wizard
 

Members online


Latest posts

Top