Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How can I get codepage dependent key codes and characters?

midixmidix Member Posts: 10
Hi all!

I am creating an international keyboard training program (program uses MFC and is compiled using Unicode) and I need help.

There is a text that user has to enter. The text may be in any language. There is also a screen keyboard in my program.

The problem is: I need to display my screen keyboard in a way that depends on the character map that the user has selected for his keyboard. If the user uses Russian keyboard layout I need to display Russian letters on my screen keyboard.

And for the training process I need to highlight every next key the user has to enter so I need to get Unicode symbol of the text and find the appropriate symbol on my screen keyboard. The problem is that some languages may contain a dead char - the user has to press some special key before he presses a symbol key and the result is some language specific symbol. If the training text contains such a letter, I need to highlight the dead char symbol (how can I get that from OS?) and after the user has pressed it I can highlight the symbol key.

I am planning o use low level keyboard hooks (I think this is the only way I can get ALL the keypresses, even the non-symbol keys).

So the question is - how can I get the codepage dependent symbol mappings to the keys and which letters need a dead char (and which key acts as a dead char?). I know that it can be done, I have seen a program with a screen keyboard which reflects the codepage dependent keys and a dead char.

Will be grateful for any info.
Sign In or Register to comment.