0

Let's say I have two programs: Program A and Program B. I want to use some hotkey to trigger certain action in Program A. So, I add corresponding lines in xbindkeysrc (telling the daemon what to do and what the hotkey is). It works just fine with Program A. The problem is that the same hotkey is used in Program B to do something as well (which I am totally happy with). But Program B does not trigger that action anymore because xbindkeys intercepts the hotkey now.

Is it possible make xbindkeys to intercept hotkeys for certain programs only or should I take a look at another tool (if so, which one)?

S. N.
  • 287

1 Answers1

0

Yes, it is possible to make xbindkeys to only intercept hotkeys for certain programs. To do this, you need to specify the program name in the configuration file of xbindkeys. You can also use the xbindkeys-config GUI application to set the program name and assign a hotkey. Alternatively, you can also use a different tool like AutoHotkey to assign hotkeys to specific programs.

Mix tutor
  • 110
  • I am not sure I understand how xbindkeys-config can help here for it does not extend xbindkeys functionality in any way, it is just a GUI. The problem is xbindkeys intercepts the hotkey as soon as it has been added to xbindkeysrc. So the Program B in my example simply has no chance to catch the hotkey pressing event. As for AHK it is an absolutely marvellous piece software that runs in Windows (and I do use it there to achieve similar goals), is it? And we are talking about Linux in this case... – S. N. Jan 16 '23 at 13:50
  • You can use a program like xbindkeys to assign a specific keyboard shortcut to a particular program in your Linux system. You can create a configuration file and edit it to assign the shortcut to the program, or you can use the xbindkeys-config GUI application to set the shortcut. Additionally, you can use other programs such as AutoHotKey for Windows to assign shortcuts for specific programs. – Mix tutor Jan 16 '23 at 18:27