mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Adding keyboard shortcut (command or ctrl w) for closing the serial monitor window.
This commit is contained in:
@ -46,6 +46,15 @@ public class SerialMonitor extends JFrame implements MessageConsumer {
|
|||||||
closeSerialPort();
|
closeSerialPort();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// obvious, no?
|
||||||
|
KeyStroke wc = Editor.WINDOW_CLOSE_KEYSTROKE;
|
||||||
|
getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(wc, "close");
|
||||||
|
getRootPane().getActionMap().put("close", new AbstractAction() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
closeSerialPort();
|
||||||
|
setVisible(false);
|
||||||
|
}});
|
||||||
|
|
||||||
getContentPane().setLayout(new BorderLayout());
|
getContentPane().setLayout(new BorderLayout());
|
||||||
|
|
||||||
|
2
todo.txt
2
todo.txt
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
PROCESSING 5503 SYNC
|
PROCESSING 5503 SYNC
|
||||||
|
|
||||||
Don't require save before upload.
|
|
||||||
|
|
||||||
Add library keyword highlighting.
|
Add library keyword highlighting.
|
||||||
|
|
||||||
Allow closing of the serial monitor with keyboard short cuts.
|
Allow closing of the serial monitor with keyboard short cuts.
|
||||||
|
Reference in New Issue
Block a user