CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

[solved] 18F47J53 dual USB mode : uart /hid
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 6254
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Nov 28, 2017 6:34 am     Reply with quote

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: 187

View user's profile Send private message

PostPosted: Tue Nov 28, 2017 6:42 am     Reply with quote

Thank you, I didn't know what words to use in google.
temtronic



Joined: 01 Jul 2010
Posts: 6254
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Nov 28, 2017 6:52 am     Reply with quote

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: 13552

View user's profile Send private message

PostPosted: Tue Nov 28, 2017 9:19 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group