views:

147

answers:

1

Just the functionality of intercepting the keyboard entry , transforming it and sending it back is required.eg if user press a i wold like to send e etc.

To make a application that accepts the entry from keyboard modify it and send it to the active window (may be application like word, excel,notepad windows screens ) etc. The feature is just like google's transliteration application for windows . I would like to do it in c# . I think this involves hooking in the keyboard and sending keys (like sendkey in vb) to the current window. The working is just like Google transliteration .However the logic for transformation is quite different.

A: 

I'm not sure what the question is exactly, so it may get closed for being too vague. However, it sounds like you'll have to buffer all of the keystrokes, send words or phrases to some service asynchronously to be transliterated and then push them back into keyboard buffer with something like sendkeys as you mentioned. The problem is that if your app has focus, we don't know where the user wants the transliterated text to show up, and if the app such as Word has focus, it will receive both the real keystrokes and the transliterated text, which will then be mixed together (a mess). Seems better just to transliterate chunks of text rather than trying to interfere with the keyboard buffer - besides, backspace, undo, etc. will be nearly impossible to honor.

Eric Mickelsen
That is exactly the problem , the Google guys have done it very nicely ,so I am confident that it is possible but is it possible using c# is still a triumph to conquer.
Thunder
Well, if you build your own little word processor, it should be relatively simple to wire in transliteration, provided you can make use of an existing service such as Google's: http://code.google.com/apis/ajaxlanguage/
Eric Mickelsen
I don't want to build a transliteration software, i just want the functionality of intercepting the keyboard entry , transforming it and sending it again.eg if user press a i wold like to send e etc. This is required to ease the process of typing in Asian languages like Nepali,Newari.
Thunder
@tehMick I have edited the question for more clearity,thanks.
Thunder