[3150] in java-interest
Re: keyboard events
daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Wed Nov 1 19:20:43 1995
Date: Wed, 1 Nov 1995 12:12:43 -0800
From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: lemayp@lne.com
Cc: sami@jakarta.Eng.Sun.COM, java-interest@java.Eng.Sun.COM
Hi Laura,
> I've been playing with the Java event system -- keyboard events in
> particular.
>
> Question: how does Java deal consistently with Return and Enter keys
> in a cross-platform way? Does it at all? I ask because if I have a
> user interface that depends on the Return key, that return key may
> generate different characters on different platforms (its line feed
> (ascii 10) on Unix, carriage return on (ascii 13) on Macs, and
> both on DOS. Then there's the enter key, which also does different
> things on different platforms. Many DOS keyboards don't even have a
> Return key -- just enter.
>
> Does the java event system take this into account so a return is a return
> is a return regardless of the platform, or is it up to the
> programmer to understand the differences and code around it?
We should be giving you a consistent event on every platform. Your
code should not have to deal with this. I'm not sure if this is
currently the case though. I'll make sure we figure this out.
Have fun,
Arthur van Hoff
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com