keyboard interface

I'd like to be able to read cursor keys from a keyboard as part of an "official" character code set if possible.

Are these key codes included somewhere in the unicode character set ? Or is there a standard practice for handling these keys ?

Thanks, Rob

Reply to
Robert Finch
Loading thread data ...

What sort of keyboard? PS2? if so there is a scan code for every key, just look on the scancode table. You do have a table ?

Reply to
CBarn24050

A guess, since your question was rather vague - are you doing something over a serial link, and trying to add support for command-line editing using the cursor keys? If so, the keystrokes sent by those keys are dependent on the terminal emulation software you're running.

termcaps and a lot of frustration, generally :)

Reply to
Lewin A.R.W. Edwards

formatting link
formatting link
formatting link
formatting link
formatting link

Reply to
Guy Macon

Unicode is for characters, not for keys. The difference may be subtle, but suffice it to say that cursors keys are patently outside the scope of unicode.

Have a look at ANSI terminal control characters instead. Note that they'll be multi-byte sequences, not single-byte codes, though.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

I'm using a PS2 compatible keyboard. I have a hardware interface that translates the scan code into unicode (ascii at the moment) and makes it available in an IO port. What I'm trying to do is make a keyboard that returns unicode characters rather than scan-codes. I would like to translate the scan-codes for the cursor edit keys into their equivalent unicode values. What are these values ?

Thanks, Rob

Reply to
Robert Finch

Maybe an example would help. If I press cursor left on the keyboard, what is the equivalent unicode character ?

Rob

Reply to
Robert Finch

I think we all understood the question correctly the first time you asked it. What you're not understanding is that it may be the wrong question to ask. Unicode is not designed to represent keyboard input, and as such, it's somewhat unlikely it'll have code points for things that aren't characters. But don't take my word for it: go look it up yourself.www.unicode.org awaits your visit.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

There is none. It'd probably be helpful if there was, but there isn't.

You want VT100 codes, or something like that.

Reply to
Simon Hosie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.