Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there some way to get more than Meta and Ctrl on Windows? Long time Emacs user wants Hyper/Super

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?

like image 724
shapr Avatar asked Dec 10 '08 16:12

shapr


People also ask

How do I change Meta key in Emacs?

From SecureCRT's menu, choose Options | Session Options. Under Emulation | Emacs, select Use Alt as Meta key. Select OK.

What is the Meta key in Emacs?

The META key is sometimes labelled ALT . If you do not have it, press ESCAPE instead, followed by, say, x . frame: the rectangular "area" in which Emacs runs; Emacs starts with only one, but you can create more (look under the menu Files, or type C-x 5 2 ).


1 Answers

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)

like image 132
Michael Paulukonis Avatar answered Nov 01 '22 21:11

Michael Paulukonis