Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to bind Super and the arrow keys, (s-up, s-down, etc) to change windows in Emacs. Unfortunately I'm having trouble setting it correctly.

I am running Kubuntu 13.04 with Emacs 24.3.1.

xev sees the Windows key as being bound to Super_L.

KeyPress event, serial 40, synthetic NO, window 0x4800001,
root 0x251, subw 0x0, time 7320920, (-362,216), root:(898,899),
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

I've tried the following in my .emacs:

(when (fboundp 'windmove-default-keybindings)
  (windmove-default-keybindings 'super))

I've used describe-function (C-h f) to verify that the windmove commands are bound to super and a directional key, like s-left. However, when I try to use the combination, nothing happens.

I've checked by using view-lossage (C-h l) to see what's being pressed and the super plus directional keys don't show up.

Interestingly, I can bind super and some other key, like s-h and the windmove functions work fine.

This is driving me crazy. Any help is appreciated.

share|improve this question
up vote 0 down vote accepted

A possible explanation for this is that your window manager is catching these key bindings and doesn't forward them to Emacs.

Try looking for Super+arrows bindings in your window manager's configuration, and deactivate them.

share|improve this answer
Good idea. I will check this. – afrosteve May 21 '13 at 14:25
That was it. KDE has bindings in KWin for the super key. Thank you! – afrosteve May 23 '13 at 0:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .