CodeFaster

CodeFaster

Share this post

CodeFaster
CodeFaster
Fixing a stuck control key without rebooting

Fixing a stuck control key without rebooting

Tyler Adams's avatar
Tyler Adams
Aug 04, 2023
∙ Paid
2

Share this post

CodeFaster
CodeFaster
Fixing a stuck control key without rebooting
Share

If you’ve messed with xte or xdotool, you’ve inevitably found your computer…not typing right. Turns out, your control is stuck down with no way of unsticking it. You begrudingly reboot the computer.

Last week, that was me, here’s a solution to the problem:

  1. write a keyup-modifiers script

    #!/usr/bin/env bash
    echo keyup Control_L | xte
    echo keyup Control_R | xte
    echo keyup Shift_L | xte
    echo keyup Shift_R | xte
    echo keyup Meta_L | xte
    echo keyup Meta_R | xte
    echo keyup Alt_L | xte
    echo keyup Alt_R | xte
    echo keyup Super_L | xte
    echo keyup Super_R | xte
  2. Bind it to your window manager’s keychord alt + shift + ctrl + c in i3. the c doesn’t matter but alt + shift + ctrl is super important as it’ll work no matter which one’s accidentally stuck.

    in i3 this is

    bindsym $mod+Shift+Control+c exec keyup-modifiers

And voila, no more rebooting.

Thanks for reading CodeFaster! Subscribe for free to receive new posts and support my work.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Tyler Adams
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share