Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Experts,

I am trying to monitor Keyboard activity with the use of Keyboard Hook.
It works successfully.

But if I'm changing my Keyboard Language via Control Panel > Regional settings > Keyboard settings to Arabic...

Then Keyboard Language will be Arabic.

But the Keyboard Hook is not changing its value.
It is returning same for US Keyboard.

So please describe me how can I change according to Keyboard Language settings.
Posted
Updated 1-Feb-11 9:57am
v4
Comments
Sandeep Mewara 1-Feb-11 1:48am    
Not sure but might be you missed all language settings. Not just Keyboard, but also system language, etc.
Dalek Dave 1-Feb-11 3:08am    
Edited for Spelling, Grammar and Readability.
Sergey Alexandrovich Kryukov 1-Feb-11 15:56pm    
More grammar fixes on top of yours, even in Title... after all, who is native English speaker -- I'm not... :-)
Watch this: http://www.youtube.com/watch?v=u9_kahA_wQo
--SA
Sergey Alexandrovich Kryukov 1-Feb-11 15:53pm    
More grammar changes...

i know this is an old thread , but i am now working on the same project and i had the same problem in arabic , if your keylogger has a list of ASCI characters that is hooked (like mine ) that translate the asci into English letters , make another one that convert the asci into Arabic (according to the keyboard layout) and check for the current layout to switch between them , or you can track the shift+alt keys as they are the default arabic-english switch
 
Share this answer
 
The keyboard hook is low-level. I don't think even in US layout the hook returns US characters. It returns key codes, they are language-independent. By the way, for the hook function is would not make sense, because current keyboard layout / input language is not system-wide, it's set individually for every different application, which if above the level of the hook.

If you're at the point you may need the current keyboard layout you can always retrieve it.

You can get current keyboard layout for a current thread using this API: http://msdn.microsoft.com/en-us/library/ms646296(v=vs.85).aspx[^].

—SA
 
Share this answer
 
v3
Comments
Dalek Dave 1-Feb-11 3:09am    
Good answer.
Sergey Alexandrovich Kryukov 1-Feb-11 3:26am    
Thank you, Dave,
How's you camera streaming? Did you try VLC yet?
--SA
Dalek Dave 1-Feb-11 3:31am    
Got it working perfectly using TinCam.
Thanks for asking, buddy!
Sergey Alexandrovich Kryukov 1-Feb-11 3:38am    
Pity. :-) I wanted to learn how VLC would do -- never had a chance to try this way myself.
--SA
[no name] 1-Feb-11 23:28pm    
Hello Sir,

I do't know what is VLC. It's player or some thing else.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900