Hot key in monitor?

Once I've got the monitor open (via Ctl-SHift-M or whatever) is there any way to make it communicate using just a single keypress? If I'm using the monitor to interact with an application while it's running, it's kind of frustrating that every command has to be at least 2 characters, because nothing gets sent until I type "Enter". Is there a way to change this, or am I just stuck with it?

No, but you can use a real terminal emulator application like Putty or Tera Term.

The SM is basically a simplified debug tool.

If you set the serial monitor to "no line ending" then you can send a single character, nothing is sent for the "enter" key.

1 Like

Thanks. Yes, I just tried TeraTerm, and it did work. So that's a solution. I suppose "simplified debug tool" is about right, and they expect that anyone who wants more will use other software. I'd have thought that responding to a single key would be something a lot of people would find useful, but perhaps I'm the only one!

You can send a single character by changing the monitor setting as mentioned in reply #3. I just forgot about that...

Most significant human text interactions are line oriented, for which single character response is not needed. The most common need for it, is to eliminate any complexity in the input handling code.

It's fine, but realize that you can't support any normal, user friendly line oriented communications that way.

"Send a single character" isn't what I was asking about. That would be typing 2 keys and causing the computer to send only a single byte! What I wanted was to hit any single key, and have my sketch respond to it immediately.

I'd really like to see a mode for the monitor where any key typed in, would cause that character to be sent to the Arduino immediately, without the need to hit the Enter key. This would be helpful for controlling the processor during operation.

Note that I'm not talking about the "No line ending" mode. All that does is suppress sending the Enter character to the Arduino, but you still have to type it. What I'm suggesting is to hit any single key, and have the sketch respond to it immediately.

It is true that terminal programs like TeraTerm can do what I'm suggesting, but that involves leaving the Arduino environment and returning to it, if a project is in an experimental mode. I'd prefer having the hotkey feature within the Arduino monitor.

I would support such an enhancement but there are more important things to put right first with respect to the Serial monitor

I have in mind

  • allowing the Serial monitor to be placed in its own window
  • the bug whereby you cannot select all of the text shown in the Serial monitor to copy and paste it elsewhere

Currently, if I want to do something beyond the capabilities of the Serial monitor I use an external terminal program. The only annoyance of doing that is the need to disconnect it from the Arduino COM port before uploading a new version of the sketch that I am working on

I have merged your topics due to them having too much overlap on the same subject matter @Beminetonight.

In the future, please only create one topic for each distinct subject matter and be careful not to cause them to converge into parallel discussions.

The reason is that generating multiple threads on the same subject matter can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Thanks in advance for your cooperation.

OK, but that was deliberate. The first posting was asking for help, in case there was some control mode that I'd missed and someone could direct me to. Then when it seemed clear that what I wanted really couldn't be done in the Arduino environment, I posted again in what I thought was the "suggestions" section in the hope that if there are developers working on future changes, they might pick it up. I don't mind seeing the threads merged, if there's the best chance of that happening!

Hello Beminetonight

You can might use either the AHK program or you design your own Arduino-Keyboard.

I was right the first time, I just tested it and it's true, nothing gets sent until the EOL is pressed. No option selection changes that. So my post #5 is false. However, I don't think the devs will be at all interested in changing it unless you can present some compelling use cases. What problem is it currently causing for you?

This is IDE1.x and I doubt that OP's request will never be implemented.

@Beminetonight started 2 topics on the subject, one in IDE1.x and another in Suggestions for the Arduino Project. I originally commented to the second one which was in the correct category

When the two were merged they ended up in IDE1.x so I have moved the topic to Suggestions for the Arduino Project which is where it belongs

No major problem, but having single keys as input to the processor would make it easier to use. I'm playing with a positioning system using a stepper motor and an optical sensor. I'm using alphanumeric keys in the monitor to tell it to do various things--'a' to start the motor, 'b' to stop it, 'c' and 'd' to set direction, 1-9 to set speed, or 'h' to home using the sensor. It's working, but it would certainly be quicker if I didn't have to keep hitting Enter after every character.

It seems like such a simple setting to add to the monitor! As people have pointed out, terminal programs can work this way, but leaving the Arduino IDE and coming back to it is a different kind of hassle. (Go to the terminal program to run the system, come back to the IDE to change the sketch...repeat and repeat...) But as Sterretje said, most likely the developers will feel that the Arduino IDE is a mature product that they don't want to make changes to.

The AHK (Auto Hot Key) program is certainly another approach. I'm not sure if it can tell the difference between the Arduino programming environment versus the Arduino monitor, though. I wouldn't want to cause any problems while I'm writing code.

Hello Beminetonight

Use locally buttons connected to the Arduino to control the process.

Hence the use of Tera Term here.

How is that different from go to the external monitor to run the system, come back to the edit window to change the sketch...repeat and repeat

The only real difference is the need to connect and disconnect to and from the COM port when wanting to stop/start using the monitor. You are not, after all, stopping and starting the monitor program and there is very likely to be a keyboard command to connect/disconnect to/from the previously defined COM port (take a look at Coolterm for example) in any decent external monitor so you don't even need to use the mouse when switching about between applications

Also an application that uses serial for control shouldn't be tied to an IDE forever. That should end when development ends. So you need a standalone terminal emulator for that, anyway.

Adding extra buttons is "Use more hardware". Switching back and forth to TeraTerm is "Use more software". I just want to set up my project, connect to the Arduino, and operate the hardware with minimum additions. This isn't the first time I've done this with Arduino, and of course millions of people have built similar devices. I bet a good number of them would use a Hotkey interface if the Arduino environment allowed it!

When you've got experimental hardware on the desk in front of you, you want to concentrate on the project and not on the computer keyboard, and having to hunt for two keys rather than one is a distraction. If nobody else has asked for this feature, I'm surprised. It seems obvious to me.

And while I'm asking for more stuff in the IDE, I'd also like a mode where after a compile-and-load operation, the IDE would automatically give focus to the monitor, if it's open. One thing that's very easy to do if you're using the monitor to control something, is to forget to switch to the monitor after changing the code, and your keypresses end up putting extra characters into your sketch. At least I do that pretty often, and it's annoying.