I was doing some experiment with my console earlier I asked about now I observed following thing.I have created my own CustomKeyListener a subclass of KeyAdapter I have overriden keyPressed method.Now I have put a condition like getKeyCode==VK_ENTER to listen to enter key.Now my question is I have kept the body of if block empty but still on hitting enter key caret is moving down to the next line.
posted 4 years ago
Don't add your custom keylistener class.
What happens now? does it still go to the
If so, you need to look into the source
code for the reason why [enter] goes to
the next line.