Consistency of SDL scancodes across different keyboards

I’m trying to make a game that is layout-agnostic. So let’s say WASD for moving, but that becomes ZQSD on an azerty layout, for instance.

My question:
Is the scancode for W on a qwerty keyboard the same as the scancode for Z on an azerty keyboard? And what about korean or scandinavian keyboards for instance, with completely different keys?

And what happens if somebody plucks and rearranges their keyboard keys so they now have a dvorak layout?

I’m asking because I want my game to be international, but I don’t have the keyboards to test it myself.

Yes, the Scancodes should always be the same regardless of layout - that’s their whole point :slight_smile:
(Of course it can happen that some keys just don’t exist on some keyboards, depending on the layout - like some keyboards have a key between left shift and QWERTY-Z while others just have a bigger shift key, also the sizes of the enter and backspace keys vary and with it the number of keys around them, but the “main” keys should always be at the same position with the same Scancode, but different Keycode. https://en.wikipedia.org/wiki/Keyboard_layout#/media/File:Physical_keyboard_layouts_comparison_ANSI_ISO_KS_ABNT_JIS.png illustrates this)

If someone rearranges their keys, they’ll only rearrange their keycaps, not the actual switches, so it shouldn’t make a difference.

Great, just what I needed to know. Scancodes are software and hardware keymap agnostic.