LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write enter key to serial port

Hi i was does anyone know how to write the "enter key" to a serial port? (com, any help would be useful thanks
0 Kudos
Message 1 of 6
(4,318 Views)

What do you mean the "Enter key"? There are ASCII codes for "Carriage Return" and "Linefeed", but these are just programmatic interpretations of what the "Enter" key means. What are you trying to do?

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 6
(4,312 Views)

You send the scan code "\5A" without the quotes

Here is a good source for keyboard Scan codes.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(4,303 Views)

Jeff,  Are you sure about that?

 

I don't believe keyboard scan codes have anything to do with a serial port.  If you send the byte 5A out to a serial port, then it is just sending the character "Z".

 

 

Tokyghy, please clarify what you are trying to do.  The hardware interface for a keyboard is a different entity from a serial port.  Which is why Putnam questioned what you meant by sending an "enter key" to the serial port.

Message 4 of 6
(4,293 Views)

@RavensFan wrote:

Jeff,  Are you sure about that?

 

I don't believe keyboard scan codes have anything to do with a serial port.  If you send the byte 5A out to a serial port, then it is just sending the character "Z".

 


Hmmm, That made me go back to my old source code where I peeked at some very old code.....Smiley Embarassed where I cecalled needing to send arrow keys out to a "chatty Cathy" UART.  I dug down deeper into the source since you pointed out my obvious brain slippage

 

the commands were:

(In \codes)

\1B[A

\1B[B

\1B[C

\1B[D

 

I apparently didn't add comments to the codeSmiley Tongue to explain to myself what I thought I was doing


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(4,285 Views)

HI, thanks for your responses, but at the end i figured it out and all that i needed was a carriage return, sorry if my question was not clear enough =/

 

Thanks all!

0 Kudos
Message 6 of 6
(4,251 Views)