http://java.net/jira/browse/MACOSX_PORT-568
Basically the code involved is a KeyListener on a JTextArea
setup like...
From the CmdJConsole class...
TextInterface theText = null, entry = null;
entry = new SwingTextArea("area","",2,80);
((Component)entry).addKeyListener(this);
[The entry component that the KeyListener ends up bolted to...
public class SwingTextAreaImpl extends JTextArea implements SwingTextImpl {
From the CmdJConsole KeyListener (keyTyped method) when CTRL-D is entered
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
The current workaround is...
byte keychar = (byte)kevt.getKeyChar();
if (keychar == (byte)4)
((CmdIn)imp.getIn()).eod();
else if (kevt.isControlDown() && kevt.getKeyChar() == 'd') { ((CmdIn)imp.getIn()).eod(); }
else...
The first 'if' works SE 6, the second works on SE 7.
I haven't come up with one that seems to cover both.
This is an old app I am getting up and running again. I plan on probably uploading shortly if a test case is wanted.
Or I can try to get a more isolated test case.