You are not logged in.

#1 2020-05-12 21:48:48

rwd
Member
Registered: 2009-02-08
Posts: 671

XFCE: how to disable keyboard shortcuts using xfconf-query?

To prevent myself alt-tabbing out of a game by accident I would like to disable alt-tab and alt-shift-tab shortcuts temporarily. I tried doing that this way, but this does not seem to disable them. What am I doing wrong? I read somewhere that in order to change an existing shortcut I need to reset it first.

/usr/bin/xfconf-query --reset  --channel xfce-keyboard-shortcuts --property "/xfwm4/default/<Alt>Tab" &
/usr/bin/xfconf-query --reset  --channel xfce-keyboard-shortcuts --property "/xfwm4/default/<Alt><Shift>Tab" &
/usr/bin/xfconf-query --reset  --channel xfce-keyboard-shortcuts --property "/xfwm4/custom/<Alt>Tab" &
/usr/bin/xfconf-query --reset  --channel xfce-keyboard-shortcuts --property "/xfwm4/custom/<Alt><Shift>Tab" &    

/usr/bin/xfconf-query --create --channel xfce-keyboard-shortcuts --property "/xfwm4/default/<alt><shift><tab>" --type string  --set null & 
/usr/bin/xfconf-query --create --channel xfce-keyboard-shortcuts --property "/xfwm4/default/<alt><tab>"  --type string  --set null  &
/usr/bin/xfconf-query --create --channel xfce-keyboard-shortcuts --property "/xfwm4/custom/<alt><shift><tab>" --type string  --set  null & 
/usr/bin/xfconf-query --create --channel xfce-keyboard-shortcuts --property "/xfwm4/custom/<alt><tab>"  --type string  --set null &

Offline

#2 2020-05-13 08:18:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,363

Re: XFCE: how to disable keyboard shortcuts using xfconf-query?

Start by removing the & after every line that's almost guaranteed to lead to conflicts (that backgrounds and runs all of the commands in parallel and it isn't guaranteed that things are designed to deal with that). Do these commands work in isolation?

There's also a GUI only warning in https://wiki.xfce.org/settings4.6#keyboard_shortcuts which makes me think that you cannot literally invoke <Alt> or <Shift> and might have to find the actual call being made but I don't use xfce myself so I can't really check what actually needs to be added.

Last edited by V1del (2020-05-13 08:22:43)

Offline

Board footer

Powered by FluxBB