You are not logged in.

#1 2024-06-17 10:47:27

kazoobiekazobo
Member
Registered: 2024-06-17
Posts: 3

Inconsistent behaviour from xbindkeys

Hello, I'm trying to set some keybinds using xbindkeys. One of the default example keybinds (ctrl + F) to launch a terminal is working, but I can't seem to disable it (commenting out or deleting the entry in ~/.xbindkeysrc and running xbindkeys doesn't work). On the other hand, my custom keybinds (e.g. volume mute) aren't working, even though I've checked that the commands and key names are correct (via xev) and used the "+ Release" modifier.

I've looked at the command xbindkeys -n for troubleshooting, and am getting an error message (below) asking to verify that another program isn't also capturing the relevant keys. The only one I can think of is my WM (awesome) which has a keybind feature, but I've checked and none of the keybinds overlap.

*** Warning *** Please verify that there is not another program running
which captures one of the keys captured by xbindkeys. It seems that there
is a conflict, and xbindkeys can't grab all the keys defined in its
configuration file.

It's worth noting this issue only started when I switched to awesome - previously I was on gnome and all the special keys (e.g. volume and brightness) worked fine out of the box. I'm wondering if maybe I should set volume shortcuts and things through awesome, instead of globally through xbindkeys? Or is that making it more complicated than it needs to be?

If anyone knows a good way to approach this, please let me know. Thank you!

Last edited by kazoobiekazobo (2024-06-17 10:51:01)

Offline

#2 2024-06-17 13:35:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: Inconsistent behaviour from xbindkeys

commenting out or deleting the entry in ~/.xbindkeysrc and running xbindkeys doesn't work

https://wiki.archlinux.org/title/Xbindk … figuration

ps aux | grep xbind

To see whether and what greps some shortcut:

sleep 5; xdotool key "XF86LogGrabInfo"

press and hold the shortcut until xdotool has fired, then check your Xorg log, https://wiki.archlinux.org/title/Xorg#General - the grabs are listed there, the one you were pressing is the active one (what makes it much easier to find wink

Online

#3 2024-06-18 08:09:10

kazoobiekazobo
Member
Registered: 2024-06-17
Posts: 3

Re: Inconsistent behaviour from xbindkeys

Thank you for your reply. I assume you just want the output of the commands you gave? If that's the case, they are here (for my volume mute key)

ps aux | grep xbind

kazoo      198960  0.0  0.0   6364  3960 pts/1    S+   17:05   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox xbind

sleep 5; xdotool key "XF86LogGrabInfo" && grep -e active Xorg.0.log

[     4.352] (II) modeset(0): h_active: 2400  h_sync: 2448  h_sync_end 2480 h_blank_end 2560 h_border: 0
[     4.352] (II) modeset(0): v_active: 1600  v_sync: 1603  v_sync_end 1613 v_blanking: 1636 v_border: 0
[     4.352] (II) modeset(0): h_active: 2400  h_sync: 2448  h_sync_end 2480 h_blank_end 2560 h_border: 0
[     4.352] (II) modeset(0): v_active: 1600  v_sync: 1603  v_sync_end 1613 v_blanking: 3272 v_border: 0
[249786.545] (II) Printing all currently active device grabs:
[249786.545] (II) End list of active device grabs
[249824.657] (II) Printing all currently active device grabs:
[249824.657] (II) End list of active device grabs
[250384.321] (II) Printing all currently active device grabs:
[250384.321] (II) End list of active device grabs
[250440.577] (II) Printing all currently active device grabs:
[250440.577] (II) End list of active device grabs
[250571.958] (II) Printing all currently active device grabs:
[250571.958] (II) End list of active device grabs
[250584.131] (II) Printing all currently active device grabs:
[250584.131] (II) End list of active device grabs
[250870.589] (II) Printing all currently active device grabs:
[250870.589] (II) End list of active device grabs
[251050.748] (II) Printing all currently active device grabs:
[251050.748] (II) End list of active device grabs

So it seems nothing is listening for the key, not even xbindkeys.

Offline

#4 2024-06-18 15:42:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: Inconsistent behaviour from xbindkeys

There's no xbindkeys instance running.
As for the grabs - you cannot grep the journal this way - the grab information is several lines wedged between the "[249786.545] (II) Printing all currently active device grabs:
[249786.545] (II) End list of active device grabs" lines, so take a look there.
It'll list the grab and the client PID anc command.

Online

#5 2024-06-19 03:23:51

kazoobiekazobo
Member
Registered: 2024-06-17
Posts: 3

Re: Inconsistent behaviour from xbindkeys

Originally there were no lines between the ones you mentioned (I did originally check, but since there was nothing I wrote the grep command since it would give the same output. Noted not to do that now).

xbindkeys wasn't starting for some reason - I reinstalled it via pacman and then it did start, so I'm not exactly sure what happened there. My volume mute toggle shortcut is also working, but I don't know what caused it or how to replicate for my other shortcuts. Running

sleep 5; xdotool key "XF86LogGrabInfo"

again now and holding volume down gives:

Printing all registered grabs of client pid 366644 xdotool key XF86LogGrabInfo
[322661.978] End list of registered passive grabs
[322847.388] (II) Printing all currently active device grabs:
[322847.389] Active grab 0x4240000a (core) on device 'Virtual core keyboard' (3):
[322847.389]       client pid 201866 xbindkeys 
[322847.389]       at 322842685 (from passive grab) (device thawed, state 1)
[322847.389]         core event mask 0x3
[322847.389]       passive grab type 2, detail 0x7a, activating key 122
[322847.389]       owner-events false, kb 1 ptr 1, confine 0, cursor 0x0
[322847.389] (II) End list of active device grabs

Offline

#6 2024-06-19 07:20:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: Inconsistent behaviour from xbindkeys

That key is grabbed by xbindkeys, the question is what it's bound to an whether that action does what you want.

Online

Board footer

Powered by FluxBB