My I3-Emacs Integration

One coder rewired their computer just to stop keyboard chaos — and the comments had ideas

TLDR: A developer changed their computer’s window system so their favorite app and desktop controls would stop tripping over the same keys. Commenters split between "just keep the shortcuts separate," suggesting alternative tools, and celebrating this as the kind of charmingly nerdy tech tinkering people miss.

A programmer went full "fine, I’ll do it myself" after getting annoyed that their favorite writing app, Emacs, and their window manager, i3, kept fighting over keyboard shortcuts. Their first workaround was clunky and laggy, so instead of living with it, they patched i3 itself so certain keys could be handed to Emacs when Emacs was the active window. It’s a deeply niche desktop problem, but the crowd reaction turned it into a delightfully relatable saga about control, obsession, and the eternal dream of making your computer behave exactly the way you want.

And the comments? Peak geek drama, but cozy. One camp basically said, why perform keyboard surgery when you can just separate duties like a normal person? PunchyHamster came in with the practical-parent energy: just use the Windows key or Hyper key for i3 and let Emacs mind its own business. Another commenter slid in with an alternative tool, ewm, like the classic internet move of answering a custom hack with "have you tried my entire different setup?" Meanwhile, SubiculumCode delivered the feel-good hot take of the thread: this kind of gloriously nerdy personal project is exactly what makes tech forums fun, especially in a moment when every conversation seems to boomerang back to artificial intelligence. The vibe wasn’t angry so much as lovingly opinionated: part DIY flex, part workflow philosophy debate, part celebration of people spending absurd effort to save a fraction of a second.

Key Points

  • The author wanted shared keybindings between Emacs and i3 without switching fully to EXWM.
  • A prototype based on xdotool and emacsclient worked functionally but introduced measured latency of about 30 to 100 ms and perceived lag up to about one second.
  • To reduce overhead, the author patched i3 so it can check whether the focused window is Emacs before handling a bindsym-triggered keypress.
  • The article notes that similar i3 functionality has been requested before, but the author says i3 maintainers considered it out of scope.
  • The technical explanation centers on i3’s use of xcb_grab_key() on the root X window and the event flow through handle_event() and handle_key_press() in the i3 source code.

Hottest takes

"leave emacs to its own devices" — PunchyHamster
"using ewm to get this kind of unification" — skulk
"Fun geeky stuff that isn’t AI" — SubiculumCode
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.