View previous topic :: View next topic |
Author |
Message |
temtronic
Joined: 01 Jul 2010 Posts: 9081 Location: Greensville,Ontario
|
|
Posted: Tue Nov 28, 2017 6:34 am |
|
|
re:
Quote: | But I don't know where to find the value of each key. |
Just Google 'PC keyboard scan codes' or something similar.
I did a LOT of keyboard 'emulations and translations' in the good old days. Used PIC16C84 to interface a PC kbd to replace $700 ASCII RS232 keyboards.
While keyboards have more keys these days, the extra keys 'keypress codes' are extentions to the original 102 keyboards. |
|
|
spilz
Joined: 30 Jan 2012 Posts: 216
|
|
Posted: Tue Nov 28, 2017 6:42 am |
|
|
Thank you, I didn't know what words to use in google. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9081 Location: Greensville,Ontario
|
|
Posted: Tue Nov 28, 2017 6:52 am |
|
|
Goggle can find anything IF you know some 'keywords'. One trick is the order of those words...
USB keyboard scan code... will 1st locate anything 'USB', then anything 'keyboard', then anything 'scan' ......
changing the order of the words will change the 'hits' you get.
Having PIC first is generally bad as it looks for PICtures,
PIC microcomputer is better but you'll still get a lot of PICture hits....
The sad thing about USB is the 'overhead' it requires. Those RS232 keyboards sent ONE byte per key..clean and simple, USB takes several. They 'compensate' by speeding up the USB datarate but then PCB layout and wiring becomes critical..
sigh, I miss the old days !
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19195
|
|
Posted: Tue Nov 28, 2017 9:19 am |
|
|
The codes are actually published in the USB spec.
However assuming you don't want to read this, the github list is very good:
<https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2>
It has all the extended ones for high function keys, and things like volume control. |
|
|
|