Do Dvorak keyboards use the same scan codes as QWERTY keyboards? I mean, does the letter U have the same scan code on both types of keyboards?
Or, is it more like taking a QWERTY keyboard and moving the plastic key tops around to mod it into a Dvorak keyboard?
Thanks.
This has no single answer, but the typical and recommended approach is that scancodes are attached to positions on keyboard, but usually named according to the "default" QWERTY layout. See ISO 9995 for the main scheme and scancode set descriptions. For example, position D01 has code 0x10 in PC set 1 despite it is Q on QWERTY, A on AZERTY or single quote on Dvorak.
The USB "HID usage tables" document explicitly says:
After scancodes are translated to hardware-independent codes, layout translation is applied and this is where difference between takes place.