I'm trying to use Emacs as my main window manager, by using EXWM:



Installation works fine. However, my default Emacs key binding to move between splits is: Shift + Arrow keys. This doesnt seem to work if you have say Firefox on the left split, and say an Emac buffers like scratch buffer on the right (a vertical split).

I can do Shift+ Left and it focuses the cursor on the Firefox instance. However, I cant seem to move from Firefox back to scratch buffer, i.e. doing Shift + Right doesnt work.

Please let me know how to get this to work. I can just use the mouse to click the buffer but I'd rather use the keyboard.

  • Did you try modifying exwm-input-global-keys? Commented Nov 3, 2019 at 12:29
  • I havent modified that. But shouldnt the global key be the same as default, the meta key? In the user guide, to switch between workspace, it defaults to S-r, where S is the global key = meta key. And it works to switch between workspace. But it doesnt work for the above scenario that i described.
    – mle0312
    Commented Nov 3, 2019 at 14:42
  • Let me explain what I said. What I'm saying is that to get this behavior you have to bind these keys globally with exwm. I'm not referring to workspaces. I just tried it and it works for me so I'll post my answer below. Commented Nov 4, 2019 at 13:25

1 Answer 1


The reason your emacs bindings don't work in firefox is because they are not bound through EXWM. EXWM is the medium emacs uses to communicate to x-windows so you need to set the bindings through it. EXWM by default enables only a subset of your emacs bindings are available in x windows (and only in line-mode).

Like in Emacs, there are two kinds of bindings in EXWM, global and local. Based on your question it seems like you'd like these bindings to always work in x windows so I would recommend global binding.

To remedy this you need to set exwm-input-global-keys to the bindings you want.

(setq exwm-input-global-keys
      `((,(kbd "S-<up>") . windmove-up)
        (,(kbd "S-<down>") . windmove-down)
        (,(kbd "S-<left>") . windmove-left)
        (,(kbd "S-<right>") . windmove-right)))

This will set the bindings in Emacs and in all x windows.

Sidenote: some modes like org-mode have these keys bound to something. So in that case you'd have to override those keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.