all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* MacOS X: Not all Alt keys are equal?
@ 2011-03-23 12:36 Lars-Johan Liman
  2011-03-25  2:52 ` Kevin Rodgers
  0 siblings, 1 reply; 9+ messages in thread
From: Lars-Johan Liman @ 2011-03-23 12:36 UTC (permalink / raw)
  To: help-gnu-emacs

Hi!

I'm a veteran Emacs user (how many of you used Emacs on TOPS-20? ;-),
and mostly an X11 user under *nix, and I've been using various Emacsen
under MacOS X the past few years.

My problem is that I want to map the Alt keys to allow for input of
special characters. (A Swedish Mac keyboard maps, e.g., vertical bar
(pipe) to Alt-7, and backslash to Alt-Shift-7).

I just tried the emacsformacosx.org package, and it was very promising
until I noticed the following.

By setting

(custom-set-variables
 '(ns-alternate-modifier (quote none)))

in my .emacs file, I got the disired behaviour on the _left_ Alt
key. Alt-7 produces pipe, Alt-Shift-7 produces backslash. Fine!

Now, to make the _right_ Alt key behave the same way, I tried adding

 '(ns-right-alternate-modifier (quote none))

to the config, as in

(custom-set-variables
 '(ns-alternate-modifier (quote none))
 '(ns-right-alternate-modifier (quote none)))

One would now believe that it would work. It does not.

It's true that I get the "Alt" behaviour, but only to some extent. Now
rAlt-7 (rightAlt-7) gives me pipe (fine!), but rAlt-Shift-7 does not
give me the expected backslah, it gives me forwardslash, which is what
you get with just Shift-7 on a Swedish keyboard. The same goes for
rAlt-8 and rAlt-9 which give brackets "[" and "]" respectively, but the
corrseponding braces "{" and "}" exepcted from rAlt-Shift-8 and
rAlt-Shift-9 show up only as the dull parentheses "(" and ")". Footnote *)

Conclusion: the Alt-function for the right Alt key does not work in
conjunction with Shift, but the left one does.

Now I just found out that there is yet another value for the variable,
which is "left", which means that rAlt shall have the same function as
lAlt. When I set it to that, it _DOES_ work! But then, I cannot have a
different function on lAlt. Duh!

Why are not all Alt keys created equal? ;-) What did I miss?
How can I make my lAlt be "meta" and my rAlt be "none" with shift
function intact?

... or, is this a bug?

Platform:

Darwin 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386

Emacs:

Emacs-23.3-universal-10.6.6.dmg

				Best regards,
				  /Lars-Johan Liman

*) Paretheses are "shifted" one step to the left on a Swedish keyboard,
   compared to a US or UK one, so the numbers are actually correct.
#-------------------------------------------------------------------------
# Lars-Johan Liman, M.Sc.		 ! E-mail: emacshelp@cafax.se
# Cafax AB				 ! HTTP  : //www.cafax.se/
# Computer Consultants, Sweden		 ! Voice : +46 8 - 564 702 30
#-------------------------------------------------------------------------



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

end of thread, other threads:[~2011-03-25 15:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2.1300886420.19469.help-gnu-emacs@gnu.org>
2011-03-24 12:04 ` MacOS X: Not all Alt keys are equal? Peter Breitfeld
2011-03-25 13:56   ` Lars-Johan Liman
2011-03-25 15:03     ` Peter Dyballa
2011-03-25 15:15       ` Lars-Johan Liman
2011-03-25 15:46         ` Peter Dyballa
2011-03-23 12:36 Lars-Johan Liman
2011-03-25  2:52 ` Kevin Rodgers
2011-03-25 10:18   ` Peter Dyballa
2011-03-25 13:09   ` Perry Smith

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.