KeyEvent difference between 1.6 and 1.7
Michael Hall
mik3hall at gmail.com
Thu Oct 13 17:49:06 PDT 2011
I have a CLI type app that sometimes uses CTRL-D to terminate input from standard in.
public void keyTyped(KeyEvent kevt) {
System.out.println("CmdJConsole: byte " + (byte)kevt.getKeyChar() + " code " + kevt.getKeyCode());
int modifiersEx = kevt.getModifiersEx();
System.out.println("CmdJConsole: modifiers " + modifiersEx);
if ((byte)kevt.getKeyChar() == (byte)4)
((CmdIn)imp.getIn()).eod();
With 1.7 I see this here...
CmdJConsole: byte 100 code 0
CmdJConsole: modifiers 128
With 1.6
CmdJConsole: byte 4 code 0
CmdJConsole: modifiers 128
Am I handling this incorrectly and shouldn't expect the 4?
Or is that OK and this should not be different.
More information about the macosx-port-dev
mailing list