Detect an Arrow key from Serial.read() ??

Hi, I am looking for a way to detect an arrow key or detect a special key series using Serial.read().

I have done this in the past after much work, but now i cant seem to work it out.

Preferably, at a minimum I would need to read an arrow key press at the beginning of a line of text going to the serial monitor. Upon detecting the up or down arrow, an action would be taken and then returning to data entry when done.

Has anyone here ever had to do this or anything similar?

Thank you for your help and being here !!!

Bill

The data sent to the serial port comes from some application on the PC. That application needs to recognize what keys are being pressed, and send appropriate data.

What application is that on your PC?

The Serial Monitor does NOT send arrow key data, because the arrow keys have no ASCII representation.

Do you mean the arrow key on your PC keyboard?

You can write a PC program that reacts to the keyPressed and keyReleased events and can then send a suitable message to the Arduino.

...R

thank You, im actully working on a mac which makes it more confusing, i think the last time I detected a word sequense such as WPM to set words per minute. It is just a simple morse generator using serial monitor for data input. Thank you for your reply !

Lightfoot77:
thank You, im actully working on a mac

For the avoidance of doubt, when I used the term "PC" I was including Windows, Mac and Linux.

...R