Re: Patch for Mouse-wheel

Steven Tamm <[email protected]> Mon, 5 Aug 2002 22:37:53 -0700
Newsgroups gmane.emacs.macintosh.devel
Message-ID <[email protected]>
> Whenever there is a discussion on the use of modifier keys, everyone
> seems to want a different thing.

Especially me.  That's why there's the mac-reverse-ctrl-meta flag.  This 
makes the need for M-h and M-space become the need for C-h and C-space 
(which are much more important.).   One thing that might be useful would 
be a set of lisp variables that controls the mapping of Mac modifier 
keys to emacs modifier keys (with OS X, Fn could be mapped to Hyper?).  
But I can imagine that is fraught with peril.

> Since there were very few choices before (without writing a lot of
> code, i.e.), the existing Classic Event Handler code receives whatever
> was output after all the processing the Toolbox has performed on the
> input.  This presents a nice, simple model to the user since the
> keyboard and toolbox together can be viewed as an "virtual input
> device" that sends characters in different encodings, depending on the
> setting in the Keyboard control panel.

This model is still possible.  Instead of trying to process keyDown and 
autoKey classic events, you process kEventTextInputUnicodeForKeyEvent.  
This seems to be the preferred way of handling these things anyway, and 
when Jaguar comes out and the multithreaded UI is used, it will probably 
be the only way.  In addition, we can probably get rid of all the script 
translation code.

> This is also why even though M-SPC is a useful key in Emacs, I did not
> try to find a way to circumvent the toolbox's handling of
> command-space as the script switching key.
>
> In the interest of keeping this simple model, I am inclined to suggest
> that all key strokes be passed to the Toolbox, and Emacs receives
> whatever is output.

It makes sense for me.  One thing that may be nice out of this is the 
ability to use the Unicode Extended Latin keyboard.  This would allow 
people to "auto-switch" to the Symbol and Dingbat's fonts.

> Of course this leaves the problem of M-h and the other M- keys, which
> you prefer not to pass to the Toolbox, and all the C- and C-S- keys,
> which Toshikazu prefers not to pass along to the Toolbox, and M-SPC,
> which should be passed to the Toolbox.  I would not mind working out
> new Lisp variables to treat the disabling of M- and C- keys as special
> cases, rather than choosing one behavior or another as the default
> behavior.

So a new variable called something like "mac_send_ctrl_meta_to_tsm" with 
the default being t.  If you set it to nil, Emacs will intercept the 
keydown event if it is a M- or C- key.

I'll work on it tomorrow.  In the future, emacs will have to use the 
Unicode stuff for text input, so it might as well be there now.

-Steven



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf