- a keysym (the letter Z, wherever it happens to be in your current layout)
- or a keycode/scancode (the physical button under your pinky, no matter the current layout)
I use both methods for different bindings. For example I've bound the vim keys (hjkl) by scancode, and the layout keys ("S"tack, "F"ullscreen, "R"esize, etc) by symbol.
In my case I'm not sure what I prefer. When switching from AZERTY to QWERTY, I'm lost because the keybindings are not the same. Especially that CTRL+Z "becomes" CTRL+W which kills the current tab, and CTRL+W "becomes" CTRL+Q which kills the app.
OTOH, I don't usually switch layouts, and like that the configuration file / the UI matches the current layout.
I guess the conf could allow setting layout-specific keybindings. It complicates things quite a bit though.
I saw a few games where it wasn't that way, it was always treated as a bug.
Think of it from the user side: People are used to their shortcuts. They are used to press CTRL+Z where it is on their layout, as their keyboard keys will also be printed accordingly. Someone with a non-qwerty-layout may have never seen CTRL+Z leading to the physical key on the bottom left, for them it was always somewhere else. How would they know what to press, when the config says CTRL+Z, and they press CTRL+Z on their keyboard and nothing happens? How would someone who grew up with azerty know qwerty?
If you want to support "what people actually use", the keypresses have to be evaluated according to the actual keyboard layout used. I say this with absolute certainty, and as a multilingual developer who switched from qwertz to qwerty and had azerty in use as well for a time.
Of course the best is the ability to remap and to adapt such positional keybindings to (known) layouts. But it's a big 'localization' task to consider all niche layouts (Dvorak, Colemak, Azerty, Bépo, ...).