Skip to content

Instantly share code, notes, and snippets.

@BitesizedLion
Last active December 27, 2025 11:26
Show Gist options
  • Select an option

  • Save BitesizedLion/cbd05da0b218e0e073163f439450ebeb to your computer and use it in GitHub Desktop.

Select an option

Save BitesizedLion/cbd05da0b218e0e073163f439450ebeb to your computer and use it in GitHub Desktop.
Disable Ctrl+R in Chrome/Chromium on Linux (X11)

1. Install xbindkeys, etc.

sudo apt install xbindkeys xdotool wmctrl

2. Create config

xbindkeys --defaults > ~/.xbindkeysrc

3. Edit ~/.xbindkeysrc

Add the following at the bottom of the file:

# Disable Ctrl+R in Chrome/Chromium only
"bash -c 'wmctrl -lx | grep -qiE \"(google-chrome|chromium)\" && :'"
  Control + r

4. Restart xbindkeys

killall xbindkeys
xbindkeys

To autostart add xbindkeys to your session startup.

Extras:

Disable Alt + left arrow and Alt + right arrow:

# Disable Alt+Left in Chrome/Chromium
"bash -c 'wmctrl -lx | grep -qiE \"(google-chrome|chromium)\" && :'"
  Alt + Left

# Disable Alt+Right in Chrome/Chromium
"bash -c 'wmctrl -lx | grep -qiE \"(google-chrome|chromium)\" && :'"
  Alt + Right
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment