Search code examples
windowsdelphikeyboardchar

List of deadkeys for current keyboard


I want to show users a list of the deadkeys they can press using their current Windows language & keyboard. (As opposed to a list of possible graves, circumflexes and acutes which their keyboard doesn't operate as deadkeys.) Grateful for help.


Solution

  • Keyboard layout (including dead keys) are fixed in the keyboard driver. This means your problem can be reduce to getting the setting for keyboard. Use Windows API GetLocaleInfoW() function to get the information and then create the list of dead keys for each keyboard. For your reference have a look at: Windows-keyboard-layout and GetLocaleInfoW