Keyboard device driver for custom keyboard?
On Mon, Jul 9, 2018 at 7:58 AM, firstname.lastname@example.org
> 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
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
Other problems you can solve in the firmware of the keyboard, by
having it reconfigure its layout, potentially while running and
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
On Mon, Jul 9, 2018 at 8:25 AM, email@example.com
> 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
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.