help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs hyper key


From: Xah
Subject: Re: emacs hyper key
Date: Wed, 2 Jul 2008 11:53:19 -0700 (PDT)
User-agent: G2/1.0

On Jul 1, 12:09 pm, Thr4wn <Seth.A.B...@gmail.com> wrote:
> First of all, what actually IS the emacs hyper key? the emacs meta key
> seems to just be mod1, but I can't seem to figure out what emacs will
> interpret as the hyper key.
> ...

i don't have the complete answer. Here's what i know.

The hyper, super, meta keys are keys in lisp machine keyboards,
popular in the 1980s.

See a photo and links to several other make/models here:
 http://xahlee.org/emacs/emacs_kb_shortcuts_pain.html

Here's prob the right way to assign hyper and super keys:

; 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

; various settings for the Mac keyboard
(setq mac-option-modifier 'hyper) ; sets the Option key as Hyper
(setq mac-option-modifier 'super) ; sets the Option key as Super
(setq mac-command-modifier 'meta) ; sets the Command key as Meta
(setq mac-control-modifier 'meta) ; sets the Control key as Meta


The syntax for defining keys with the Super or Hyper modifier keys is
the same as Meta and Control. Use “H” for Hyper, “s” for Super.
Example:

(global-set-key (kbd "H-b") 'cmd) ; H is for hyper
(global-set-key (kbd "s-b") 'cmd) ; lower case “s” is for super

(global-set-key (kbd "M-H-b") 'cmd) ; Meta+Hyper+b
(global-set-key (kbd "M-s-b") 'cmd) ; Meta+Super+b

The above is from:
http://xahlee.org/emacs/keyboard_shortcuts.html
which you can find out about how to define keyboard shortcuts.

--------------
here's a excerpt from
(info "(emacs)User Input")


   Emacs defines several other modifier keys that can be applied to
any
input character.  These are called <SUPER>, <HYPER> and <ALT>.  We
write `s-', `H-' and `A-' to say that a character uses these
modifiers.
Thus, `s-H-C-x' is short for `Super-Hyper-Control-x'.  Not all
graphical terminals actually provide keys for these modifier flags--in
fact, many terminals have a key labeled <ALT> which is really a <META>
key.  The standard key bindings of Emacs do not include any characters
with these modifiers.  But you can assign them meanings of your own by
customizing Emacs.

   If your keyboard lacks one of these modifier keys, you can enter it
using `C-x @': `C-x @ h' adds the "hyper" flag to the next character,
`C-x @ s' adds the "super" flag, and `C-x @ a' adds the "alt" flag.
For instance, `C-x @ h C-a' is a way to enter `Hyper-Control-a'.
(Unfortunately there is no way to add two modifiers by using `C-x @'
twice for the same character, because the first one goes to work on
the
`C-x'.)

---------------------------------

excerpt from
http://xahlee.org/elisp/Character-Type.html
(elisp)Other Char Bits

   The X Window System defines three other modifier bits that can be
set
in a character: "hyper", "super" and "alt".  The syntaxes for these
bits are `\H-', `\s-' and `\A-'.  (Case is significant in these
prefixes.)  Thus, `?\H-\M-\A-x' represents `Alt-Hyper-Meta-x'.  (Note
that `\s' with no following `-' represents the space character.)
Numerically, the bit values are 2**22 for alt, 2**23 for super and
2**24 for hyper.


------------------------------

  Xah
∑ http://xahlee.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]