Re: Patch for Mouse-wheel
Steven Tamm <[email protected]> Mon, 5 Aug 2002 17:57:46 -0700
| Newsgroups | gmane.emacs.macintosh.devel |
|---|---|
| Message-ID | <[email protected]> |
> I tried the patch and found that I can enter Japanese characters through
> Japanese Input Method. However, the script switching key, i.e,
> command+space, doesn't work. It is natural that command keyboard
> events directly passes to ReceiveNextEvent as you wrote.
>
> I changed the line;
> if (!(er.modifiers & cmdKey)) {
> to
> if(1){
> then the command+space worked.
The problem with leaving it as (1) is when command-key-is-meta set to
t. In that case, M-h never gets sent to emacs, but instead is sent to
the application menu and causes emacs to hide. It's not a standard
binding, but I use it and I didn't want to prohibit it. But in your
case, it seems that command_key_is_meta is nil, so at the very least it
should be...
if (NILP( Vmac_command_key_is_meta) || !(er.modifiers & cmdKey)) {
And next time I'll put the left brace on the next line to follow the
coding standard...
> By the way,
> I also tried to change the above line to
> if (!(er.modifiers & controlKey) || (er.modifiers & cmdKey) ||
> (er.modifiers & optionKey)) {
>
> This is very useful for me because only the contorl+key event is
> directly
> send to the event manager, so that I don't need to switch from Japanese
> mode
> to Roman mode when I would like to issue control+key command in emacs.
> If someone assigns the control+key sequence to some Japanese input
> method functions,
> there will be some problems.
The test you gave would send everything but C- and C-S- to the event
manager. I don't know the best way to go here. It appears that control
key sequences (at least C-S-) are used by the input methods to specify
something and I don't know enough to say whether or not they should
supercede emacs control-key sequences in general. My ignorance of asian
languages is showing. Was this possible before, without
USE_CARBON_EVENTS?
One possible solution would be to introduce yet another variable, like
"mac-ctrl-to-tsm", which would determine whether C- and C-S- key
sequences would go to the TSM (and change the pen menu) or go directly
to emacs. Or there could be a lisp function that can send a keyboard
event back to the event manager, so if specific control keys should be
made to call back to the script menu. What do other people think?
-Steven
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf