User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2
Hi Henry et al.,
I was wrong in writting parts of my previous answer, but Henry wrote it with a
better approach (and plain english).
These kind of things were 'acceptable' 20 to 15 years ago, but no more since then.
_BUT_ after some minutes I realize that maybe this is just a side-effect of a
lack of Macintosh knowledge...
I read once more Henry’s message (just before hitting the reply button) and
definitely, he is right, but his description apply to a Windows machine. Using
Alt (instead of Option) make me feels that. Running Windows XP, the user press
Alt were the Macintosh user press Command. Here is the lying :(.
I may be wrong, but when the software runs under Mac OS, the keyboard shortcuts
must use Command instead of Alt (Mac OS says Option where Windows says Alt).
Eventually, if this is important to still use Alt, hardcode it to Command-Alt,
so no Character translation will be done !
For the record (and the Windows centric people): the Command Key under Macintosh
is the keys that have a propeller and an outlined Apple.
Nota:
For the Macintosh centric people: when Henry wrote Alt, I feel that he meant the
Option key.
At first, his writting (adding a 'Compose' key) disturb my understanding, but
after some seconds I understand what he meant.
> It seems wasteful for each project to re-discover
> the problem and work out a new solution. Are there any general
> guidelines that other people have adopted?
The real problem is to take some times exploring the Apple documentation, the
Apple software to discover how this is used 'internally' and apply it to
NetBeans (?).
I mean: how - programmatically - do you know that Option-Character [Alt-Char if
you prefer) is a Menu ShortCut (Accelerator under Windows ?) and when the Option
key is used as a modifier and then the corresponding character have to be sent
to the frontmost window.
Example:
In my French keyboard (hardware [printed layout] and software [key mapping]),
Option-& (the & key cap contains also the '1' character) gives me the
Closed-Apple (dark filled Apple: ).
The question Henry ask is how to code to be able to fire a Keyboard shortcut
using the Apple character or sending that Apple character into the frontmost window.
OK, in my example, I use non ASCII character, but this is part of the trouble
since the non US-Domestic keyboards do not have some characters; some of them
are: {[|\]} for example.
For the Windows centric people, you can get some characters using Alt+Gr (or is
it Alt+Ctrl ?) plus a character to get the third printed character on the key cap.
(For the European people, look at the Euro symbol in the '*', '$' key: the
Windows keyboard have more than one of this special case. This is not equal but
similar to what the Option key uder Macintosh is able to do.)
I hope that this message clears a bit the trouble and will help to understand it,
Cheers,
Emile
BTW: I think at one thing; I do not think (or recall) that there is an
Option-Char keyboard shortcut under Mac OS. But: Command-Option-Char and
Command-Option-Shift-Char exists. This may be the culprit: if the Command-Key is
down, this is a keyboard shortcut, else, this is a modifier key, so send the
appropriate character (in fact, do not handle this case, let the OS do its job).
email@hidden wrote:
Date: Wed, 29 Sep 2004 13:31:39 +0200
From: Henry Story <email@hidden>
Subject: keyboard shortcut problems
To: Tim Boudreau <email@hidden>
Cc: java mailing list <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=MACINTOSH; format=flowed
Well I am now confirmed in my view that there is a general problem with
the apple keyboard stemming from the fact that the Alt and Compose
character keys are combined on a number of international keyboards.
In the latest developer edition of Netbeans 4.0 I can now compose the
'{' and '}' characters, but as a result of the recent fix a lot of the
shortcuts no longer work. For example 'go to source' should be Alt-o,
but since Alt is also the character compose key it turns into the
character 'Ï' instead (o with an attached e). Another example is 'Go
to declaration' which is keyed as 'Alt-g' but which is first generates
the 'Þ' character (something that looks like an h).
Every company writing editing software in java will end up having these
types of problems. It seems wasteful for each project to re-discover
the problem and work out a new solution. Are there any general
guidelines that other people have adopted?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden