unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Mac - X11 - emacs - meta - alt key
@ 2010-03-15  4:27 David Rogoff
  2010-03-15  5:12 ` JF Mezei
  2010-03-28 17:45 ` Stefan Kamphausen
  0 siblings, 2 replies; 5+ messages in thread
From: David Rogoff @ 2010-03-15  4:27 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all.

I'm still getting used to my Mac and have a strange problem with emacs. 
 When running Aquamacs on the Mac itself, the Alt/Option key is meta, 
which is what I expect.  However, I'm also remote accessing a Linux box 
via X11/NXClient.  When I run emacs (or xemacs) on in Linux, it looks 
like X11 has remapped the Mac Command key to be meta.  How do I put 
this back?

Thanks,

 David



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mac - X11 - emacs - meta - alt key
  2010-03-15  4:27 Mac - X11 - emacs - meta - alt key David Rogoff
@ 2010-03-15  5:12 ` JF Mezei
  2010-03-15  5:20   ` unfrostedpoptart
  2010-03-28 17:45 ` Stefan Kamphausen
  1 sibling, 1 reply; 5+ messages in thread
From: JF Mezei @ 2010-03-15  5:12 UTC (permalink / raw)
  To: help-gnu-emacs

David Rogoff wrote:

> I'm still getting used to my Mac and have a strange problem with emacs. 
>  When running Aquamacs on the Mac itself, the Alt/Option key is meta, 
> which is what I expect.  However, I'm also remote accessing a Linux box 
> via X11/NXClient.  When I run emacs (or xemacs) on in Linux, it looks 
> like X11 has remapped the Mac Command key to be meta.  How do I put 
> this back?

On Linux (and on the mac) there is a utility called "xev"  (x events).

You can test to see what event each key combination generates.

xmodmap is the utility you would use on the Mac to remap your keyboard.


For instance:

cat ~/.xmodmap
keycode 79  = KP_F1
keycode 89  = KP_F1
keycode 83  = KP_F3
keycode 75  = KP_F4
keycode 113 = Help
keycode 115 = Menu
keycode 125 = DRemove
keycode 113 = Insert
keycode 127 = Select
keycode 123 = Find
keycode 59 = Delete
keycode 111 = F11 F11 F11 F11
keycode 114 = F16 F16 F16 F16
keycode 72 = F17 F17 F17 F17
keycode 87 = F18 F18 F18 F18
keycode 88 = F19 F19 F19 F19


and you use xmodmap .xmodmap to load that new keymapping.  YOu need to
hunt a bit to find the modifier names.  The last 4 lines map 4 different
combinations of the keys (I think shift, control,meta and some other).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mac - X11 - emacs - meta - alt key
  2010-03-15  5:12 ` JF Mezei
@ 2010-03-15  5:20   ` unfrostedpoptart
  2010-03-15  8:02     ` JF Mezei
  0 siblings, 1 reply; 5+ messages in thread
From: unfrostedpoptart @ 2010-03-15  5:20 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 14, 10:12 pm, JF Mezei <jfmezei.spam...@vaxination.ca> wrote:
> David Rogoff wrote:
> > I'm still getting used to my Mac and have a strange problem with emacs.
> >  When running Aquamacs on the Mac itself, the Alt/Option key is meta,
> > which is what I expect.  However, I'm also remote accessing a Linux box
> > via X11/NXClient.  When I run emacs (or xemacs) on in Linux, it looks
> > like X11 has remapped the Mac Command key to be meta.  How do I put
> > this back?
>
> On Linux (and on the mac) there is a utility called "xev"  (x events).
>
> You can test to see what event each key combination generates.

Thanks.  I tried xev and, as expected, the 2 command keys generate
Meta_L (keycode 63, keysym 0xffe7) and Meta_R (keycode 71, keysym
0xffe8).   Both option/alt keys generate something called Mode_switch
(keycode 69, keysym 0xff7e)

>
> xmodmap is the utility you would use on the Mac to remap your keyboard.
>
> For instance:
>
> cat ~/.xmodmap
> keycode 79  = KP_F1
> keycode 89  = KP_F1
> keycode 83  = KP_F3
> keycode 75  = KP_F4

>
> and you use xmodmap .xmodmap to load that new keymapping.  YOu need to
> hunt a bit to find the modifier names.  The last 4 lines map 4 different
> combinations of the keys (I think shift, control,meta and some other).

I'll have to look into this.  I've done a little digging and didn't
think OS/X used xmodmap.  Will this affect all OS/X programs or only
ones running inside X11?

 David



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mac - X11 - emacs - meta - alt key
  2010-03-15  5:20   ` unfrostedpoptart
@ 2010-03-15  8:02     ` JF Mezei
  0 siblings, 0 replies; 5+ messages in thread
From: JF Mezei @ 2010-03-15  8:02 UTC (permalink / raw)
  To: help-gnu-emacs

unfrostedpoptart wrote:

> I'll have to look into this.  I've done a little digging and didn't
> think OS/X used xmodmap.  Will this affect all OS/X programs or only
> ones running inside X11?


Xmodmap only affects X applications being displayed on the MAC. Not
native MAc (OS-X) applications.  It affects the X application whether
the later runs locally on the Mac or run on a remote system.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mac - X11 - emacs - meta - alt key
  2010-03-15  4:27 Mac - X11 - emacs - meta - alt key David Rogoff
  2010-03-15  5:12 ` JF Mezei
@ 2010-03-28 17:45 ` Stefan Kamphausen
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Kamphausen @ 2010-03-28 17:45 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

> I'm still getting used to my Mac

I think I will never.
http://steve-yegge.blogspot.com/2008/04/settling-osx-focus-follows-mouse-debate.html
:-)

> and have a strange problem with emacs.
> When running Aquamacs on the Mac itself, the Alt/Option key is meta,
> which is what I expect.  However, I'm also remote accessing a Linux box
> via X11/NXClient.  When I run emacs (or xemacs) on in Linux, it looks
> like X11 has remapped the Mac Command key to be meta.  How do I put this
> back?

I struggled with Emacs on OSX, too.  Someday I found the ns-*
variables and could tune everything so that it (almost) works.  Note
however, that I had problems with a non-mac-keyboard and German
characters.  But maybe it can help you, too.


Cheers,
Stefan
-- 
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.
user=> (clojure-buch (Locale/GERMANY))
#<URL http://www.clojure-buch.de>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-28 17:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15  4:27 Mac - X11 - emacs - meta - alt key David Rogoff
2010-03-15  5:12 ` JF Mezei
2010-03-15  5:20   ` unfrostedpoptart
2010-03-15  8:02     ` JF Mezei
2010-03-28 17:45 ` Stefan Kamphausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).