One specific GNOME keyboard shortcut needs to be configured again regularly

2 réponses [Dernière contribution]
Avron

I am a translator!

Hors ligne
A rejoint: 08/18/2020

In GNOME on wayland, I have configured a keyboard shortcut for "show the run command prompt" as Super+P (because this is what I am used to from dwm). Regularly (but not always), when I open a session and I try this, no action. When I go to the settings, this is shown as set to Super+P. If I define it again to Super+P, it works again until the end of the session, and sometimes also for the next session.

I also have a "launch terminal" shortcut (Super+Shift+Enter of course), that one never had this problem. I also have Super+n and Super+Shift+n with n from 1 to 9 to switch or move the active window to a workspace (for this, I had to remove by gsettings some shortcuts not accessible via the GUI and make shortcuts with gsettings for workspaces 5 to 9 as it was not possible via the GUI), Super+Left/Right and Super+Shift+Left/Right to switch or move the active window to the workspace left/right, they also never had any problem.

So the problem is only with Super+P for "show the run command prompt" (which is what I almost always use to start apps). I don't know what could cause such a behaviour with this specific keyboard shortcut.

prospero
Hors ligne
A rejoint: 05/20/2022

Leprechaun lore has it that Super+P may be bound to "switch-monitor" by default, wich may not have much visible effect if you are using a single monitor. You should be able to find that command in the keyboard shortcut settings, or in dconf, and remove the default Super+P keybind so you can use it for your favorite command instead.

If lore is correct, the dconf path should be something like /org/gnome/mutter/keybindings/switch-monitor. You can check it by running:
gsettings list-recursively | grep "<Super>p"

Avron

I am a translator!

Hors ligne
A rejoint: 08/18/2020

Thanks for the useful hints.

After running
gsettings set org.gnome.mutter.keybindings switch-monitor "['']"
Super+P behaves according to my settings.

Running "gsettings list-recursively", I tried finding a filter to exactly get all keyboard shortcuts, but I could not find a proper solution. One way would be to search for modifiers, but this won't find shortcuts without any modifier. Another way would be to search for "key" (case insensitive) but it won't find certain shortcuts.

One filter that I expect finds them all but not only shortcuts, is that the third field either ends with '] or starts with ':

gsettings list-recursively | awk '$3~/'\'']$/ || $3~/^'\''/'

I was glad when I found how to "include a single quote" in a string quoted using single quotes: close quoting with ', put an escaped single quote \', start quoting again with ').

EDIT: I can't get the tiling extension to work on GNOME anymore so I switched to MATE with dwm again.