Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

OSR Seminars


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 5  
09 Jul 18 08:59
Gaurav Khuntale
xxxxxx@gmail.com
Join Date: 05 Sep 2014
Posts To This List: 20
Keyboard device driver for custom keyboard?

Hello, We have a custom HID keyboard hardware with approx 20 keys extra than the normal keyboard keys. Also this keyboard will support multiple script modes (For example Devanagari, English). I don't have good understanding of how exactly keyboard device driver and its device stack works (but i have good understanding and experience in writing other windows kernel drivers like minifilter, network filter driver, virtual audio driver).From some initiale google search i understood that,keyboard device reports scan codes, these scan codes are translated into virtual keys and then virtual keys are translated into characters. After some study, I came to conclusion that I need to write new device driver for this custom keyboard because it has some extra keys whose scan codes will not be recognized by standard driver and hence these extra keys will not work if used with standard driver. Please let me know if my conclusion above is correct or not. Thank you, Gaurav
  Message 2 of 5  
09 Jul 18 09:25
Gaurav Khuntale
xxxxxx@gmail.com
Join Date: 05 Sep 2014
Posts To This List: 20
Keyboard device driver for custom keyboard?

I think i should have mentioned new keyboard HID client driver instead of new device driver for custom keyboard, as custom keyboard will be detected as HID device.
  Message 3 of 5  
09 Jul 18 10:34
R0b0t1
xxxxxx@gmail.com
Join Date: 24 Mar 2017
Posts To This List: 123
Keyboard device driver for custom keyboard?

On Mon, Jul 9, 2018 at 7:58 AM, xxxxx@gmail.com <xxxxx@lists.osr.com> wrote: > Hello, > > We have a custom HID keyboard hardware with approx 20 keys extra than the normal keyboard keys. Also this keyboard will support multiple script modes (For example Devanagari, English). > I don't have good understanding of how exactly keyboard device driver and its device stack works (but i have good understanding and experience in writing other windows kernel drivers like minifilter, network filter driver, virtual audio driver).From some initiale google search i understood that,keyboard device reports scan codes, these scan codes are translated into virtual keys and then virtual keys are translated into characters. > > After some study, I came to conclusion that I need to write new device driver for this custom keyboard because it has some extra keys whose scan codes will not be recognized by standard driver and hence these extra keys will not work if used with standard driver. > > Please let me know if my conclusion above is correct or not. > It doesn't seem like a device driver will solve any problems you wish to solve. You have not explained the problems you wish to solve very well. Most things I could imagine you wish to do would be best done by adding elements to your keyboard's HID descriptor to create settings which can be changed from an application running on the PC. This would, unfortunately, require users of your keyboard to install software. Other problems you can solve in the firmware of the keyboard, by having it reconfigure its layout, potentially while running and without reenumerating. Keep in mind that the USB HID specification intends a keyboard to look like a matrix of buttons. There is not really supposed to be a concept of language. On Mon, Jul 9, 2018 at 8:25 AM, xxxxx@gmail.com <xxxxx@lists.osr.com> wrote: > I think i should have mentioned new keyboard HID client driver instead of new device driver for custom keyboard, as custom keyboard will be detected as HID device. > What are you trying to do? If existing scan codes don't cover the input you wish to produce then adding new scan codes (how?) won't help, because no existing application (namely the Windows input stack) would know about them. Look at http://www.usb.org/developers/hidpage/Hut1_12v2.pdf, usage page 0x07. There are reserved keys you *could* use. It may be best to create a non-keyboard control for the keys. Read the HID specification, you can create collections that work like keyboards. Cheers, R0b0t1
  Message 4 of 5  
09 Jul 18 11:20
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10220
Keyboard device driver for custom keyboard?

Not quite correct. Are you expecting windows to consume and use these extra scan codes directly or are you going to consume them from a special app? You can author a keyboard language mapping dll that maps scan codes to keys without a custom driver if you want windows to consume these keys directly. If you are going to consume them in your special app, put these extra keys in a separate top level collection with a custom usage page and you can open the HID directly from your app. d Bent from my phone ________________________________ From: 30131445600n behalf of Sent: Monday, July 9, 2018 5:59 AM To: Windows System Software Devs Interest List Subject: [ntdev] Keyboard device driver for custom keyboard? Hello, We have a custom HID keyboard hardware with approx 20 keys extra than the normal keyboard keys. Also this keyboard will support multiple script modes (For example Devanagari, English). I don't have good understanding of how exactly keyboard device driver and its device stack works (but i have good understanding and experience in writing other windows kernel drivers like minifilter, network filter driver, virtual audio driver).From some initiale google search i understood that,keyboard device reports scan codes, these scan codes are translated into virtual keys and then virtual keys are translated into characters. After some study, I came to conclusion that I need to write new device driver for this custom keyboard because it has some extra keys whose scan codes will not be recognized by standard driver and hence these extra keys will not work if used with standard driver. Please let me know if my conclusion above is correct or not. Thank you, Gaurav --- NTDEV is sponsored by OSR Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fshowlists.cfm%3Flist%3Dntdev&amp;data=3D02%7C01%7CDoron.Holan%40microsoft.com %7C176b557ff30f4011a5cb08d5e59bc35c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C 636667379519189951&amp;sdata=3DBuwy1ch3hprI6GtTuK00M9zk%2FghZJCn95HPJ%2B9Ps8X0%3D &amp;reserved=0> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fse minars&amp;data=02%7C01%7CDoron.Holan%40microsoft.com%7C176b557ff30f4011a5cb08d5e 59bc35c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636667379519189951&amp;sdata =bRSuNJLQ2IOo2tcWvyfstM0H1%2F884uX3gZ66otW5EF4%3D&amp;reserved=0> To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fpage.cfm%3Fname%3DListServer&amp;data=02%7C01%7CDoron.Holan%40microsoft.com%7 C176b557ff30f4011a5cb08d5e59bc35c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63 6667379519189951&amp;sdata=p8hNJjNSbx9dfA4fO0SMsdyIJLM4m2AahYo%2BcEvvghY%3D&amp;r eserved=0> --
  Message 5 of 5  
09 Jul 18 14:30
Gaurav Khuntale
xxxxxx@gmail.com
Join Date: 05 Sep 2014
Posts To This List: 20
Keyboard device driver for custom keyboard?

Thank you Robot1 and Doron for the response. Sorry i was not able to address correctly the problem that i want to solve. Actually i want that custom keyboard along with extra keys to work properly on Windows ( Exactly similar to what Doron mentioned that i am expecting windows to consume input of extra keys along with default keys that my keyboard has). Also along with normal combination of keys, i am expecting that combination of letter keys along with those extra keys should also produce required result in applications. @Doron: so are you saying that i should write new keyboard layout dll which will contain mapping of virtual keys to required characters? If this is true, then i am not clear who will translate scan codes of new keys to virtual keys as standard driver will not understand new scan codes.? As i said, i am not much aware of how exactly keyboard stack works, so my questions might be silly. I would love to get better understanding of keyboard stack before solving the problems that i am trying. Along with above expectations i also want to achieve more like if keyboard is switched to Devanagari script mode then i would like to produce some specific output if user pressed two keys simultaneously. Likewise there will be couple of combination of keys which have some specific meaning to each combination. Please point me to the direction to solve this. Thank you in advance. On Mon, 9 Jul 2018 at 8:50 PM, xxxxx@microsoft.com < xxxxx@lists.osr.com> wrote: > Not quite correct. Are you expecting windows to consume and use these > extra scan codes directly or are you going to consume them from a special > app? You can author a keyboard language mapping dll that maps scan codes > to keys without a custom driver if you want windows to consume these keys > directly. If you are going to consume them in your special app, put these > extra keys in a separate top level collection with a custom usage page and > you can open the HID directly from your app. > > d > <...excess quoted lines suppressed...> --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 19:25.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license