Open HistoryTextField with a shortcut
Submitted by Wednesday, 10 March, 2004 - 15:20
on
I think it's useful if you can open the history in a HistoryTextField with
a shortcut. Here my Code suggestion:
HistoryTextField.java:
protected void processKeyEvent(KeyEvent evt) {
if(evt.getID() == KeyEvent.KEY_PRESSED) {
if(evt.getKeyCode() == KeyEvent.VK_ENTER) {
else if(evt.getKeyCode() == KeyEvent.VK_DOWN && evt.isAltDown()) { // Added Line
showPopupMenu("",0,getHeight()); // Added Line
evt.consume(); // Added Line
} // Added Line
a shortcut. Here my Code suggestion:
HistoryTextField.java:
protected void processKeyEvent(KeyEvent evt) {
if(evt.getID() == KeyEvent.KEY_PRESSED) {
if(evt.getKeyCode() == KeyEvent.VK_ENTER) {
else if(evt.getKeyCode() == KeyEvent.VK_DOWN && evt.isAltDown()) { // Added Line
showPopupMenu("",0,getHeight()); // Added Line
evt.consume(); // Added Line
} // Added Line