keyboard interface

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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





Re: keyboard interface
Quoted text here. Click to load it
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 ?

Re: keyboard interface
Quoted text here. Click to load it

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



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

Rob



Re: keyboard interface

Quoted text here. Click to load it

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 ( snipped-for-privacy@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Re: keyboard interface
Quoted text here. Click to load it

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

You want VT100 codes, or something like that.

Re: keyboard interface
Quoted text here. Click to load it

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.

Quoted text here. Click to load it

termcaps and a lot of frustration, generally :)



Re: keyboard interface

Quoted text here. Click to load it

http://www.networktechinc.com/ps2-prots.html
http://home.ecn.ab.ca/~jsavard/comp/scan.htm
http://panda.cs.ndsu.nodak.edu/~achapwes/PICmicro/PS2/ps2.htm
http://panda.cs.ndsu.nodak.edu/~achapwes/PICmicro/keyboard/scancodes.html
http://panda.cs.ndsu.nodak.edu/~achapwes/PICmicro/keyboard/atkeyboard.html


Re: keyboard interface
Quoted text here. Click to load it


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 ( snipped-for-privacy@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Site Timeline