Reputation: 1427
I am writing a key logger in windows 7 ( using SetWindowsHookEx ) and I need to know the correct keyboardLayout for the key being pressed. I tried getting the keyboardLayout from the ForegroundWindow and this works fine in most cases but in Internet Explorer 9 it doesn't work as expected (it returns the wrong layout ). I thought about getting the layout from the language bar ( because it shows the language of the window that is currently being typed on ) but I don't know how to retrieve this data. Maybe there is a registry key with this data or I can ask the language bar window for its text. Any ideas ?
Upvotes: 1
Views: 979