Skip to content

Disable default behavior of shortcuts when these shortcuts are configured for custom actions

Version information

Thunar 4.18.11, Arch Linux

According to bisecting, the first bad commit is 6e466a0c : Fix shortcuts for ucas in subfolders (#1043 (closed))

Steps to reproduce

My goal is to add custom actions to start gloobus-preview when I press space key (to view the content of documents without opening them on their default editor) and gnome-search-tool when I press <Ctrl>F. The custom actions themselves doesn't matter, what is important are the associated shortcuts.

  1. Disable the current action associated to <Ctrl>F : menu Edit, Preferences..., tab Shortcuts, action Search for Files..., button Clear the shortcut.
  2. Create the custom actions (in my case gloobus-preview and gnome-search-tool).
  3. Associate these custom actions with shortcuts space and <Ctrl>F. The GUI does not allow to define the shortcut space, but it is possible to edit the file ~/.config/Thunar/accels.scm directly. This file now contains the following uncommented lines:
(gtk_accel_path "<Actions>/ThunarActions/uca-action-1444210522577323-4" "space")
(gtk_accel_path "<Actions>/ThunarActions/uca-action-1483536446242297-1" "<Primary>f")
  1. Restart Thunar (may be necessary after editing accels.scm manually).

Current behavior

When pressing shortcuts, the custom actions are executed as expected, but the default actions associated to these shortcuts are also executed:

  • when pressing space, opening the file
  • when pressing <Ctrl>F, opening a small text field on the bottom right of the window to make a quick search on the current directory.

Expected outcome

When pressing shortcuts, only the custom actions are executed, which is the behavior on Thunar 4.18.10 and earlier.

Edited by Alexander Schwinn