I have an application that I am writing that reads in a configuration file for shortcuts such as "Ctrl+C" that are mapped to shortcut buttons. The keys for the shortcuts are stored as their linux input event codes so for Ctrl + C that would be: [29, 46].
My keyboard is a Japanese JIS layout keyboard and has keys like the @ symbol where the open bracket "[" key is and is thus represented by the code [26].
Is there a way to get the currently set X11 keyboard layout and map the input key event codes to the represented keys on the user's keyboard (i.e. when I indicate code [26] in the config I should get "@" and not "[")?
This is also a problem for users of my application that use other layouts like the French keyboard layout so I do not want to resort to hard-coding any mapping.