[Openmcl-devel] support for International keyboards

Gail Zacharias gz at clozure.com
Tue Apr 7 13:21:48 UTC 2009


Thanks Rainer, that's very helpful.

Here's a proposal, mostly rephrasing what you said:

- Typing the normal keys (i.e. no modifiers) on a keyboard in any 
locale should enter those characters.  If it doesn't it's a bug and 
should be fixed.

- Similarly any issue with dead keys is a bug and should be 
fixed.  Specifically, in any context where option is acting as a meta 
key, option-e should execute meta-e and not modify the next 
character; and in any context where option is not acting as a meta 
key, it should do standard multi-character input.  This is 
independent of what decides whether option is or isn't a meta key in 
any given situation.

- c-q should always make the following character have its standard 
Mac meaning and not its emacs meaning, and any case where it doesn't 
do so is a bug and should be fixed.

- ESC should always work as a meta prefix.  I believe it already 
does, but I just mention it for completeness.

- We should offer users the choice of enabling or disabling 
option-as-meta.  I'm not convinced this should take up a menu item, 
but it should certainly be visible in the preferences dialog.

- If option-as-meta is disabled, you have to use ESC for meta.  My 
image of a user doing that is a Mac user who is fine just using the 
standard Mac editor commands and doesn't much care about emacs.  To 
help them out, we might want to look over the command bindings and 
make sure that the most useful Lisp-specific commands have non-meta 
equivalents.  We might also think about usurping some 
arrow-key-with-modifier bindings for moving around by s-exp's rather 
than lines or what not.

- If option-as-meta is enabled, you generally have to use c-q to 
enter option characters.  This is a problem on keyboards where 
standard (in the CL sense) characters are normally entered with 
option.  It is also a problem for users who like to use non-standard 
characters in their source code.  I think we should address the 
former but not the latter.  I would file the latter under "how to 
make it easier for people to customize their key bindings".  I.e. if 
you really like to use delta a lot in your code and don't want to 
type c-q option-d, then you can bind meta-d to insert-a-delta for 
yourself.  It's too much of a personal choice, on a 
character-by-character basis, for us to know which intepretation is better.

- For the standard character problem, we should do the Aquamacs thing 
of usurping those particular meta bindings to insert the character as 
if quoted (I understand there are implementation issues; we can 
figure them out).  We should do this unconditionally out of the box, 
without the user having to tell us what keyboard they're using or 
anything like that.  I think it's important for people to be able to 
just start up the IDE and type in examples from a book without having 
to first learn any special conventions for entering ordinary 
characters.  Again, if some people would rather have m-l do 
lowercase-region, and insert '@' by typing c-q option-l or some other 
key altogether, that's possible as a personal customization.

- I don't much care about offering command-as-meta on a Mac.  I think 
it's basically a unix weenie "real men don't use cmd-C" approach, and 
as such not particularly high priority for the IDE.  If somebody who 
cares about it takes the time to implement it, that would be great, 
but even then I would leave it as something that can be turned on by 
appropriate incantations in your init file;  I wouldn't put it on a 
menu or busy up the preferences dialog with it.


At 4/7/2009 03:18 AM, Rainer Joswig wrote:
>A while ago I wrote the following email about this topic (not to this
>list). Maybe it is worth to send it to this list also, since it
>describes the perspective of a German keyboard user:
>
>----
>
>I have keys for ü, ä, ö (and some others)
>on a German keyboard. I don't press these keys with option-something.
>My keyboard ALU keyboard looks like this:
>
>unshifted
>
>
>
>
>
>
>
>shifted
>
>
>
>
>
>
>
>option
>
>
>
>
>
>
>
>option-shifted
>
>
>
>
>
>
>
>there are basically three problems to address:
>
>1) normal keys like ä, ö, ü, ß, Ä, Ö, Ü should just work (shifted and
>unshifted)
>
>2) in many Lisp environments the OPTION key is used for META
>  (sometimes COMMAND is used as the META key)
>
>  This is for Lisp programming a problem, since many useful characters
>  can only be reached with the option key: @, [, ], {, }, |, ...
>
>  There are usually two solutions to this: a) use c-q as a prefix.
>  b) make some meta-key combinations available, so that they
>  input characters. For example Aquamacs does that.
>  Aquamacs has under the Options menu the entry 'Option key'
>  where I can select Meta & German - this then makes
>  for example option-x act like meta-x and option-l enters
>  the @ character.
>
>  Then there is the possibility to use esc as the meta key prefix
>  and use option key as the OPTION key. Probably something
>  that some users might like.
>
>3) dead keys. CCL should understand the dead key combinations.
>  The orange keys above are 'dead' keys. So 'option-u a'
>  should enter an ä.
>
>
>I don't have the newest version of CCL, but 'Clozure Common Lisp
>Version 1.1-r8157 (DarwinX8664)'
>makes quite a few problems:
>
>1) öäüßÄÖÜ don't work. If I press these keys nothing gets entered.
>
>2) control-q option-somekey  works. But the option key otherwise
>    is used as the meta key. So, I can't enter any character via
>    the option character and have to quote ALL characters with control- q.
>    For example to enter  {    I have to type  control-q option-8 .
>    Probably that is something to live with.
>
>3) dead keys don't work. Unfortunately some keys need to be typed
>    with them. the character ^  is the key ^ followed the space key.
>    As you see above the german keyboard does not even have an
>    'undead' ^ key.
>    The ^ is not recognized as a dead key. Same for the other dead keys:
>    ´`¨~  . Note that there are different dead keys for shift, option,
>and option-shift.
>
>   Note that I can enter dead-key combination using the prefix control- q.
>  So control-q option-shift-6 space  enters ^ . Unfortunately pressing
>  control-q option-shift-6 and then doing something else leaves
>  CCL in some state, where ^ is printed with a yellow background and
>  the editor basically stops working.
>
>----
>
>
>Rainer Joswig, Hamburg, Germany
>http://lispm.dyndns.org/
>mailto:joswig at lisp.de
>
>
>
>
>
>_______________________________________________
>Openmcl-devel mailing list
>Openmcl-devel at clozure.com
>http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list