I've tried it a few hours ago on my Mac. At least with normal AWT/Swing, the
Enter and Return key both produce the key code 0x0A (KeyEvent.VK_ENTER).
There also is no constant KeyEvent.VK_RETURN available.
--
Best regards,
Thomas Singer
_____________
SyntEvo GmbH
Brunnfeld 11
83404 Ainring
Germany
www.syntevo.com
werdnativ schrieb:
> --- In smartsvn%40yahoogroups.com">smartsvn
yahoogroups.com, "Thomas Singer (SyntEvo)" <thomas.singer
...> wrote:
>
>> BTW, both, the Return key and Enter key, produce the same key code, so
>> there is no simple solution to detect which key was pressed.
>
> http://macromates.com/blog/archives/2005/07/05/key-bindings-for-switchers/
> http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html
>
> I don't know about other platforms, but on the Mac at least, the Return and Enter keys have
> distinct functions and many applications identify them separately.
>
> I find it curious that the two charts above have different codes for these keys though. I don't
> know which is right.
>
> --Andrew Vit
.