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

JDK1.1/1.2 compat. problem: cursor keys



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:
ZZKeyBindings1.java:
-- 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)


Tuukka

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