Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-06-23 08:08:53

gilgamesh
Member
Registered: 2023-06-06
Posts: 41

[SOLVED] View : how to get keyboard shortcuts "Ctrl+1/2/3" to work

hello ,

- I'm running Debian 11 / Xfce4.16

I would like to be able to switch between "icon view" , "list view" or compact view" with the keyboard shortcuts Ctrl+1/2/3 but they are grayed out in the View menu , so they don't work . How can I change that ?

edit 1 : I found a thread about this  view_mode that says there is no way ( 2021 ) to get the shell script to work inside a sub-directory . As I don't change the display mode very often , I'll stick to manual selection .

ps : I wait a while before marking " solved " .

Last edited by gilgamesh (2023-06-23 17:36:58)

Offline

#2 2023-06-23 13:55:09

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

Re: [SOLVED] View : how to get keyboard shortcuts "Ctrl+1/2/3" to work

Did you try? They text is gray but the keybindings work.


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-06-23 14:05:42

gilgamesh
Member
Registered: 2023-06-06
Posts: 41

Re: [SOLVED] View : how to get keyboard shortcuts "Ctrl+1/2/3" to work

KBar wrote:

Did you try? They text is gray but the keybindings work.

I did try , but it doesn't work . I've even tried both Ctrl keys , you never know ....

Last edited by gilgamesh (2023-06-23 14:09:43)

Offline

#4 2023-06-23 16:13:49

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

Re: [SOLVED] View : how to get keyboard shortcuts "Ctrl+1/2/3" to work

Have you changed your config? What do you have in ~/.config/Thunar/accels.scm? We're interested in "<Actions>/ThunarWindow/view-as" actions.


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

#5 2023-06-23 16:28:00

gilgamesh
Member
Registered: 2023-06-06
Posts: 41

Re: [SOLVED] View : how to get keyboard shortcuts "Ctrl+1/2/3" to work

KBar wrote:

Have you changed your config? What do you have in ~/.config/Thunar/accels.scm? We're interested in "<Actions>/ThunarWindow/view-as" actions.

* no, I didn't change anything
*here are the actions we are interested in :

(gtk_accel_path "<Actions>/ThunarWindow/view-as-detailed-list" "<Primary>2")
(gtk_accel_path "<Actions>/ThunarWindow/view-as-icons" "<Primary>1")
(gtk_accel_path "<Actions>/ThunarWindow/view-as-compact-list" "<Primary>3")

  • solved : I have to press Ctrl +[Shift +(1)]  where (1) is on the same key as  &

  • what does <Primary> stand for ? ( Ctrl + Shift ) ?

Last edited by gilgamesh (2023-06-23 17:54:12)

Offline

#6 2023-06-23 17:52:26

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

Re: [SOLVED] View : how to get keyboard shortcuts "Ctrl+1/2/3" to work

gilgamesh wrote:
(gtk_accel_path "<Actions>/ThunarWindow/view-as-detailed-list" "<Primary>2")
(gtk_accel_path "<Actions>/ThunarWindow/view-as-icons" "<Primary>1")
(gtk_accel_path "<Actions>/ThunarWindow/view-as-compact-list" "<Primary>3")

Interesting. Were there no semicolons at the beginning of each line? Could you try adding it there? That'll comment them out and reset the default behavior.

*what does <Primary> stand for ? ( Ctrl + Shift ) ?

It stands for the Control key.


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

#7 2023-06-23 18:01:52

gilgamesh
Member
Registered: 2023-06-06
Posts: 41

Re: [SOLVED] View : how to get keyboard shortcuts "Ctrl+1/2/3" to work

Interesting. Were there no semicolons at the beginning of each line? Could you try adding it there? That'll comment them out and reset the default behavior.

I don't have to add the semicolons , they already are at the beginning of each line , like this : ; (gtk_accel_path ....

thanks for the help .

Last edited by gilgamesh (2023-06-23 18:05:33)

Offline

#8 2023-06-24 05:49:58

gilgamesh
Member
Registered: 2023-06-06
Posts: 41

Re: [SOLVED] View : how to get keyboard shortcuts "Ctrl+1/2/3" to work

I have another Debian installation : Debian 12 / Xfce 4.18 . Switching between display modes is done exactly the same way as in Debian 11 .  I also checked accels.scm file : I found the same 3 lines concerning "view-as" . May be it has something to do with debian , what do you think about it ?

edit 1 :   I changed the keyboard layout from French to US : neither Ctrl + Shift + (1/2/3) nor Ctrl + 1/2/3 worked . So Debian has probably nothing to do with it .

edit 2 : I finally got Ctrl + 1/2/3  to work in Debian 12 if LANG=fr_FR.UTF-8  but neither in Debian 12 if LANG=en_US.UTF-8 nor in Debian 11  . It seems there is some kind of interaction between the value of $LANG and this shortcut .

The config file has automatically been modified and now reads :

(gtk_accel_path "<Actions>/ThunarWindow/view-as-icons" "<Primary>KP_1")
(gtk_accel_path "<Actions>/ThunarWindow/view-as-detailed-list" "<Primary>KP_2")
(gtk_accel_path "<Actions>/ThunarWindow/view-as-compact-list" "<Primary>KP_3")

Last edited by gilgamesh (2023-06-24 23:06:55)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 547.79 KiB (Peak: 548.63 KiB) ]