thanks, that is what I am doing now. I thought there might be some way into the keyboard driver to ask for the translation. Some layer has to do the translation !
Post by Peter RitchieThis is a completely application-specific mapping based on whatever
Windows keyboard language mapping the user currently has set? Yuck.
I don't think you'll be able to get much out the the framework (.NET or
Platform) to help you here. You'll have to handle the storage and lookup
of data yourself based solely on the scan-code. You would have to iterate
through all the scan-codes and look-up the virtual key with MapVirtualKey
when you bring up the dialog (or if the user changes languages while your
dialog is opened--see WM_SETTINGCHANGE) to find out what that scan code
means at that moment (if they exit your app and change language settings
that scan code could have a different virtual key). Even then, anything
other than English characters are not well documented, see the Keys and
KeyCode enumerations for example.
If you want to map a specific key to another specific key, the best you
can hope for is to ask the user to press the key they want to map then
press the other key they want to map to. Everything else is OEM specific.
Good luck.
http://www.peterRitchie.com/
On Tue, 31 Jan 2006 13:20:03 -0500, Jeff Roberts
Post by Jeff RobertsMy situation is a little complicated, but, I'll try;
My application reads a keyboard mapping file, this file contains a scan
code and any special mapping my application may want to assign a key. Each
line of the file represents a physical key. My application is 100%
unicode. This technique allows me to have a single keyboard mapping file
for all possible Countries that Windows XP runs in (UK, France, etc.). My
application uses the OnChar to process "normal" Unicode characters and the
WM_KEY messages for determining special function keys from the scan code
in the message. My application has a "Keyboard Mapping" function that
displays a dialog window that looks like a keyboard on the screen. Each
key represents a line in the keyboard mapping file and is a Button. When
I display the dialog window, I need to figure out which Windows XP
keyboard is currently configured (UK,France,etc.), and display
the "normal" Unicode key character as the Text property of each Button.
Post by Jeff RobertsI hope this makes sense, any help would be greatly appreciated !
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com