Discussion:
emacs hyper key
Thr4wn
2008-07-01 19:09:57 UTC
Permalink
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. right now, my left-windoze button is
assigned to be Super_L. I tried mapping Super_L to mod1 (whereupon
emacs interpreted it as meta, and I could use it just like meta). Then
I mapped Super_L to mod2, mod3, mod4, and mod5 (making sure that I
removed the previous binding each time); emacs acted like it did not
even know that button existed (ie after executing C-h k , pressing
'a' returned binding for 'a' and pressing L-Windoze button and 'a'
also returned the binding for 'a' (self-insert)).

Looking back over some old .emacs file I have, I used define-key but
the KEY arguments were things like [166...], but I do not even
recognize that notation anymore and I don't think that notation works
across different computers.

so...

what does emacs interpret as hyper?
what is that other notation I used in define-key?


I have a more recent version of Debian.
Pascal J. Bourguignon
2008-07-01 19:43:09 UTC
Permalink
Post by Thr4wn
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. right now, my left-windoze button is
assigned to be Super_L. I tried mapping Super_L to mod1 (whereupon
emacs interpreted it as meta, and I could use it just like meta). Then
I mapped Super_L to mod2, mod3, mod4, and mod5 (making sure that I
removed the previous binding each time); emacs acted like it did not
even know that button existed (ie after executing C-h k , pressing
'a' returned binding for 'a' and pressing L-Windoze button and 'a'
also returned the binding for 'a' (self-insert)).
Looking back over some old .emacs file I have, I used define-key but
the KEY arguments were things like [166...], but I do not even
recognize that notation anymore and I don't think that notation works
across different computers.
so...
what does emacs interpret as hyper?
what is that other notation I used in define-key?
I have a more recent version of Debian.
M-x apropos RET hyper RET

This is specified by: x-hyper-keysym
Usually, it's Hyper_L and Hyper_R.

You can choose what key generate these keysyms with xmodmap(1).
--
__Pascal Bourguignon__ http://www.informatimago.com/

THIS IS A 100% MATTER PRODUCT: In the unlikely event that this
merchandise should contact antimatter in any form, a catastrophic
explosion will result.
Thr4wn
2008-07-02 21:09:24 UTC
Permalink
Post by Pascal J. Bourguignon
Post by Thr4wn
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. right now, my left-windoze button is
assigned to be Super_L. I tried mapping Super_L to mod1 (whereupon
emacs interpreted it as meta, and I could use it just like meta). Then
I mapped Super_L to mod2, mod3, mod4, and mod5 (making sure that I
removed the previous binding each time); emacs acted like it did not
even know that button existed (ie after executing C-h k , pressing
'a' returned binding for 'a' and pressing L-Windoze button and 'a'
also returned the binding for 'a' (self-insert)).
Looking back over some old .emacs file I have, I used define-key but
the KEY arguments were things like [166...], but I do not even
recognize that notation anymore and I don't think that notation works
across different computers.
so...
what does emacs interpret as hyper?
what is that other notation I used in define-key?
I have a more recent version of Debian.
M-x apropos RET hyper RET
This is specified by: x-hyper-keysym
Usually, it's Hyper_L and Hyper_R.
You can choose what key generate these keysyms with xmodmap(1).
--
__Pascal Bourguignon__ http://www.informatimago.com/
THIS IS A 100% MATTER PRODUCT: In the unlikely event that this
merchandise should contact antimatter in any form, a catastrophic
explosion will result.
For some reason when I apropos 'hyper' it says it couldn't find any
matches. I also did ^h v x-hyper-keysym and nothing was found
Pascal J. Bourguignon
2008-07-02 22:11:53 UTC
Permalink
Post by Thr4wn
Post by Pascal J. Bourguignon
Post by Thr4wn
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. right now, my left-windoze button is
assigned to be Super_L. I tried mapping Super_L to mod1 (whereupon
emacs interpreted it as meta, and I could use it just like meta). Then
I mapped Super_L to mod2, mod3, mod4, and mod5 (making sure that I
removed the previous binding each time); emacs acted like it did not
even know that button existed (ie after executing C-h k , pressing
'a' returned binding for 'a' and pressing L-Windoze button and 'a'
also returned the binding for 'a' (self-insert)).
Looking back over some old .emacs file I have, I used define-key but
the KEY arguments were things like [166...], but I do not even
recognize that notation anymore and I don't think that notation works
across different computers.
so...
what does emacs interpret as hyper?
what is that other notation I used in define-key?
I have a more recent version of Debian.
M-x apropos RET hyper RET
This is specified by: x-hyper-keysym
Usually, it's Hyper_L and Hyper_R.
You can choose what key generate these keysyms with xmodmap(1).
For some reason when I apropos 'hyper' it says it couldn't find any
matches. I also did ^h v x-hyper-keysym and nothing was found
Perhaps you're not using the same version of emacs than me. I've got:
emacs-version --> "22.2.1"
--
__Pascal Bourguignon__ http://www.informatimago.com/

WARNING: This product attracts every other piece of matter in the
universe, including the products of other manufacturers, with a
force proportional to the product of the masses and inversely
proportional to the distance between them.
Giacomo Boffi
2008-07-07 09:45:12 UTC
Permalink
Post by Thr4wn
For some reason when I apropos 'hyper' it says it couldn't find any
matches. I also did ^h v x-hyper-keysym and nothing was found
have you installed the help system? debian usually doesn't install it
by default
--
sono sicuro che sotto, sotto SdC è uno dei nostri -- MMAX, in IFQ+IPI
Xah
2008-07-02 18:53:19 UTC
Permalink
Post by Thr4wn
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/


Continue reading on narkive:
Loading...