Pop! OS Keyboard shortcut / hotkey to run command

Hy there!

I am quite done with Windows atm. The last few updates screwed my system up over and over again. So I am back home to Linux now.

Well, kind of. I am still gaming (and only gaming) on Windows, but running on KVM (Thank you L1T for all those neat guides and walkthroughs to set up VFIO GPU Passthrough :heart_eyes: :kissing_heart:)

So I am running on Pop!_OS 19.04 right now, and I am kind of visually impressed! :astonished: I have been a XFCE guy for a long time so to say.

Iโ€™ve set up 2 GPUs, using Evdev mouse/keyboard switching (LCtrl + RCtrl), one display with 2 HDMI inputs.

HDMI input switching is done via ddcutil on Pop! OS and ControlMyMonitor on Windows. For the Win guest Iโ€™ve set up AutoHotKey to catch my LCtrl + RCtrl to flick mouse and keyboard. So thatโ€™s pretty neat, I can switch controls and display at the same time.

But I can not figure out how to set up hotkeys on Pop!. Sure, there is gnome-control-center to set up hotkeys, but this wonโ€™t differentiate LEFT and RIGHT Ctrl. :point_right::ok_hand:

Any idea on how to set up LCtrl + RCtrl to run a script?

Thanks in advance! :kissing_heart:

If you are using Xorg as the display manager, then you need to run xinput to capture the controls and emit the sequence into a keyboard shortcut.

xmodmap would let you do something similar but it is lower level

Otherwise your can fiddle with libinput on X or Wayland.