Pages: [1]   Go Down
Author Topic: Shift-Ctrl M (to open Serial Monitor) inserts a carriage return in the editor.  (Read 1337 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Hacking since the 70s
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Behavior confirmed.
Logged

Rob Tillaart

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Hacking since the 70s
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 11
Posts: 147
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: