How to find which program uses hotkey with xdotool

18 November 2022 HackssysadminTechnology
Share with:

So, recently I discovered that the “generate” functionality of my IDE (alt+Insert) has been hijacked by another program. Or to be precise – when I press this combination – nothing happens.

So after some digging – I landed on this answer in stackexchange, which lead me to the right solution. So – I went ahead and installed xdotool, which was the main heavylifter in the current situation, and then I opened a terminal and on it – two tabs.

On the first – I tail-ed the Xorg logs

tail -f /var/log/Xorg.0.log

On the next one – the command. In my case it was:

xdotool keydown alt+Insert; xdotool key XF86LogGrabInfo; xdotool keyup alt+Insert

I have no idea how exactly XF86LogGrabInfo works and what exactly does it don. But in the tailed log file I found the following

[   213.634] Active grab 0x408007b3 (core) on device 'Virtual core keyboard' (3):
[   213.634]       client pid 2964 xfwm4 
[   213.634]       at 213570 (from passive grab) (device thawed, state 3)
[   213.634]         core event mask 0x3
[   213.634]       passive grab type 2, detail 0x76, activating key 118
[   213.634]       owner-events true, kb 0 ptr 1, confine 0, cursor 0x0

This basically is XFCE window manager, and after opening it, its settings – I discovered that alt+insert was configured for creation of a new virtual desktop. A shortcut that I quickly removed.