How can I make keyboard shortcuts register on key release, rather than on key press?

I want to have shortcuts like in Windows; Super opens the start menu, Super+S opens a search window, Super+E opens Thunar, etc.

I know how to set keyboard shortcuts, but when I set Super to open whiskermenu, whiskermenu also pops up in every other instance of Super+* shortcuts. I think this is because XFCE registers the shortcuts as they come, rather than waiting for simultaneous release (like in Windows).

How do I set that up?

3

2 Answers

You can achieve it this way:**

  1. Install xbindkeys

    sudo apt install xbindkeys
  2. Run the command:

    xbindkeys --key

    In the white box that appears, Press your key combination. Example Win + E will return the following :

    "(Scheme function)" m:0x50 + c:26 Mod2+Mod4 + e

    Now copy the last (or last second) line and use it as given below.

    In newer versions before you need to do this, which let you jump the next step:

    Please, create one with 'xbindkeys --defaults > /home/$USER/.xbindkeysrc'.
    or, if you want scheme configuration style,
    with 'xbindkeys --defaults-guile > /home/$USER/.xbindkeysrc.scm'

  3. Create a new file .xbindkeysrc in your home Directory

    touch $HOME/.xbindkeysrc

    Open it

    nano $HOME/.xbindkeysrc

    Enter your required command and keys as given below

    "nautilus" release+Mod2+Mod4 + e

    (Note: Don't forget release , Replace "nautilus" with any command.)

    Similarly add all the requires command-key combinations one below the other

  4. Now add xbindkeys to xinitrc:

    sudo nano /etc/X11/xinit/xinitrc

    add xbindkeys to the starting (1st line or before . /etc/X11/Xsession)

Reboot your system and you should get expected behavior

TIP: Make sure you don't set conflicting configurations in xbindkeys and your GUI method provided by your DE

For more examples, man xbindkeys.

2

You can fix it by install patched XOrg

sudo add-apt-repository ppa:nrbrtx/xorg-hotkeys
sudo apt update && sudo apt upgrade -y
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like