[Top][All Lists]

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

Re: Behavior of M-x and A-x

From: Xah
Subject: Re: Behavior of M-x and A-x
Date: Mon, 11 Aug 2008 12:21:06 -0700 (PDT)
User-agent: G2/1.0

On Aug 11, 10:48 am, Peter Weiss <address@hidden> wrote:
> Hello,
> sitting on a Sun keyboard, which behaves always a bit unusual...
> There are two keys on my keyboard: One marked with a diamond and the
> other one with "Alt" letters. Both behave different. So "M-x" and
> "A-x" give different commands. The usual meta commands like "M-x",
> "M-q", etc. are bound to the M-key, all the A-<keys> seem to be
> unbound.
> Is there a way to make emacs use A-key like the meta key?

not sure how to do it on Solaris. But on Windows and Mac, do it like

; 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.

(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


reply via email to

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