[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

[Tuukka.Hastrup@xxxxxx: JDK1.1/1.2 compat. problem: cursor keys]

Tuukka's mailing list access problems continue, forwarding:

----- Forwarded message from Tuukka Hastrup <Tuukka.Hastrup@xxxxxx> -----

Date: Mon, 10 Jul 2000 13:05:57 +0300 (EEST)
From: Tuukka Hastrup <Tuukka.Hastrup@xxxxxx>
Subject: JDK1.1/1.2 compat. problem: cursor keys
To: ajk@xxxxxxxxxxx

Hi all!

Me and A-J tested the jars with IBM jdk1.3. It worked fine, excluding
the cursor keys. We found out that keyboard events have been changed
between jdk1.1 and 1.2 so that an undefined character is not
represented by number 0 but by 65535 (-1) instead. This change creates
a problem only when gZZ compiled with jdk1.1 (like the jars) is run
with a newer jdk/jre. 

In my opinion there isn't a clean way to fix this, but we have a
kluge that works and probably won't break anything:
-- if(c == k.CHAR_UNDEFINED || kc == k.VK_DELETE ||
--               kc == k.VK_BACK_SPACE)
++ if(c == k.CHAR_UNDEFINED || ( c==0 || c==65535) || kc == k.VK_DELETE ||
++               kc == k.VK_BACK_SPACE)

E-Mail: Tuukka.Hastrup@xxxxxx
WWW:    http://www.iki.fi/Tuukka.Hastrup
ICQ:	#11321669

----- End forwarded message -----

%%% Antti-Juhani Kaijanaho % gaia@xxxxxx % http://www.iki.fi/gaia/ %%%