-1

I am starting to work with keyboardlayouts on windows using kbd.h. I understood the part scancode->keycode via kbdxx.dll but struggle on the part of processing modifier keys (shift, Ctrl,Alt) especially how the binary coding of the states of those keys go along with the keycodes.

As the description in kbd.h is not helping me I am looking for more literature on this.

Where do I find more information about Keyboards especially the part where modifier keys come into place?

user3443063
  • 1,455
  • 4
  • 23
  • 37
  • 1
    You really need to be clearer on what `kbd.h` is. – Mike Vine Apr 20 '23 at 12:32
  • As you are down at the scancode layer the modifier keys are just scancodes. It's up to your code to track the state of any modifier keys (up/down) and take the appropriate action(s). See also [Virtual-Key Codes](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes). – Richard Critten Apr 20 '23 at 12:46
  • OK, so for example If I have a bitmask of 001 for ALt-Ctrl-Shift : how does this work together with the number of (small) letter a 61 and the (capital) letter A of 41 ? Are there some logic operations on character and bitmask involved (e.g. doing bitmask & Character or bitmask | Character) ? 61 and 41 in binary are different in bit 5. is this by accident? And if not are there similar connections with the ALT and CTRL modifier key? – user3443063 Apr 20 '23 at 13:03
  • You don't have characters at this layer only key-presses. At this layer the keyboard is just a button array with about 100 buttons each with a `VK_...` identifier (and a notional descriptive value see link above). Translating button presses into characters is the layer above. – Richard Critten Apr 20 '23 at 14:12
  • yes, and this is the part I am interested in. How does that work.( VK_... + Modifiers -> Character) – user3443063 Apr 21 '23 at 06:10

1 Answers1

0

There is no official documentation for keyboard layout format aside from kbd.h from SDK and sample keyboard layouts.

There is some unofficial description of these structs and flags: https://github.com/lelegard/winkbdlayouts

DJm00n
  • 1,083
  • 5
  • 18