
I remember having this issue when implementing the SDL port for my MAngband variant. When implementing keysets, I had to use unicode mappings instead of key mappings to get rid of the keyboard dependence (and by default it was mapped to a QWERTY keyboard).
Any chance that the same thing happens in T4?