views:

350

answers:

2

I've used Emacs for years on Linux, and I have lots of personally useful keybindings I've put under Hyper and Super. Nowadays I'm using Emacs on Windows and am missing those extra keybindings.

Is there some way in Windows to get modifier keys other than Ctrl and Meta?

A: 

You may find this difficult, because Super (and, I believe, Hyper) are intercepted by the Windows Shell (explorer.exe) before they ever reach your app.

singpolyma
+10  A: 

There are some settings mentioned in this google-groups thread:

; setting the PC keyboard's various keys to Super or Hyper
(setq w32-pass-lwindow-to-system nil
      w32-pass-rwindow-to-system nil
      w32-pass-apps-to-system nil
      w32-lwindow-modifier 'super ;; Left Windows key
      w32-rwindow-modifier 'super ;; Right Windows key
      w32-apps-modifier 'hyper) ;; Menu key

Update: so, I actually tried the above code in my own Win32 emacs setup. Lo, it works! awkward demo follows:

(defun super-test ()
  (interactive)
  (message "Super"))

(defun hyper-test ()
  (interactive)
  (message "Hyper"))

(global-set-key [(super h)] 'super-test)
(global-set-key [(hyper h)] 'hyper-test)

Unless I've done something else funky, these work natively; I'm running GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-08-19 on LENNART-69DE564 (patched)

Michael Paulukonis