Go Down

Topic: Shift-Ctrl M (to open Serial Monitor) inserts a carriage return in the editor. (Read 1 time) previous topic - next topic

dsacmul

I'm a keyboard shortcut kinda guy (my second word processor was WordStar, and I still have to tell my brain not to hit ^K^P to open the print menu, no, it's just ^P now...)

Sometimes I forget to move the cursor to a blank place in my code when I want to pop up the monitor, and end up with stuff like:

if (i =
=6) {   (If the cursor was between the equal signs when I hit SHIFT-CTRL M)

Which, of course generates an error. It can be a bit tedious. Also, when I do remember to move the cursor somewhere reasonable before hitting the shortcut, I end up with code that looks like a high school student tried to pad out a 20 page paper (lots of vertical whitespace) and have to go back and re-edit the file. The IDE does strange things when the mouse pointer is over the tools menu (like reset the boards) in Ubuntu, and this shortcut is a bit of a longcut.



Could the IDE be modified so that if SHIFT-CTRL M is pressed to just open the monitor and not insert a CTRL-M (CR)?

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

dsacmul

I've never done much coding (well, really any coding) in Java, but I poked around in the source a bit, and it looks like an
event.consume()
would eat the keystroke before it got sent to the editor.

Just don't know where to put it.

Hmm.

DCContrarian

Happens to me too, I'm also a keyboard shortcut guy. But not all the time.

Go Up