Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-02-20 14:13:07

Rik3460
Member
Registered: 2023-02-20
Posts: 4

Adding keyboard shortcut to Thunar

Hi,
I'd like to add a keyboard+mouse shortcut to Thunar, so that when I hold down Ctrl and press the left mouse button on a folder in the left bar, that the folder opens as a new tab.
Can someone help by letting me know if this is possible to do using the Configure Custom Actions menu (or via some other way), and if so how?
thanks,
Rik

Offline

#2 2023-02-20 17:56:45

KBar
Moderator
Registered: 2021-11-05
Posts: 689

Re: Adding keyboard shortcut to Thunar

Hi, Rik. Welcome to our community.

Thunar stores its shortcuts in ~/.config/Thunar/accels.scm. There is also a shortcuts editor dialog but it doesn't accept pointer clicks as valid input. Looking at keynames.txt, it's possible to refer to these clicks. Two good candidates are: Pointer_Left and Pointer_Button1.

If you look at your accels.scm file, you'll see that it already has an entry for this action. Uncomment a line that looks like this:

; (gtk_accel_path "<Actions>/ThunarActionManager/open-in-new-tab" "<Primary><Shift>p")

Get rid of the semicolon and then replace <Shift>p with one of the two. Note though: when I tested, they didn't work. Probably requires a restart of the Thunar daemon. Perhaps, you're luckier than me.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#3 2023-02-20 18:18:51

KBar
Moderator
Registered: 2021-11-05
Posts: 689

Re: Adding keyboard shortcut to Thunar

Actually, Ctrl+left click is used for selecting files, so you won't be able to use that combination.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#4 2023-02-21 10:09:51

Rik3460
Member
Registered: 2023-02-20
Posts: 4

Re: Adding keyboard shortcut to Thunar

brilliant. thanks! I will find a different combo that is not taken yet.
Much appreciate the reply!
Rik

Offline

#5 2023-02-21 12:54:50

Rik3460
Member
Registered: 2023-02-20
Posts: 4

Re: Adding keyboard shortcut to Thunar

KBar wrote:

Actually, Ctrl+left click is used for selecting files, so you won't be able to use that combination.

I agree that this is the case for the folders in the main window, but this does not appear to be the case for the folders in the left-side sidebar, which is really where this would be very useful. Do you know if there are different actions for clicking the folders in this sidebar, then for clicking them in the main window, and if the "Ctrl-Pointer_button_1" combo could work for the sidebar using your method?

Offline

#6 2023-02-21 12:59:06

Rik3460
Member
Registered: 2023-02-20
Posts: 4

Re: Adding keyboard shortcut to Thunar

Offline

#7 2023-02-21 18:32:47

KBar
Moderator
Registered: 2021-11-05
Posts: 689

Re: Adding keyboard shortcut to Thunar

Rik3460 wrote:

Do you know if there are different actions for clicking the folders in this sidebar, then for clicking them in the main window, and if the "Ctrl-Pointer_button_1" combo could work for the sidebar using your method?

To my knowledge, they use the same keybindings.

The closest you can get is by setting the /misc-middle-click-in-tab to false:

xfconf-query --channel thunar --property /misc-middle-click-in-tab --set false

After that, you'll be able to open locations in a new tab by holding Ctrl and clicking your mouse wheel.

Post number 666...


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

Board footer

Powered by FluxBB