Advertisement

11.28.2003 at 09:32PM PST, ID: 20811380
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Systemwide Keyboard Hooks for Non-English Keyboards

Asked by petoskey-001 in Windows Programming

Tags: , , , ,

OK, This is my first question and all my points are up for grabs.  I can earn them back later.  :o)

I have successfully created a system-wide keyboard hooking application.  It is an auto-correct application that has a buffer of the last X keys and does automatic spell checking as well as a custom short-hand for fast typing.  It is written in Delphi and uses shared memory to communicate between the DLL and the EXE.  I hook the keyboard, mouse, and CBT to track the state of the system.  I create a message buffer and use JournalPlayback to start send backspaces and the replacement text as if the user had typed it.

That's just a bit of background to tell you I more or less know what I'm doing.   The system is created in Delphi, but I can work with C sources without problem.

How can I make it work on non-english keyboards?  For instance to create spanish characters I've read that users press ALT+1+4+0 to get an I with a caret over it.  There are also things called Dead Keys which can modify some key presses and have to be ignored.  

Currently I have a lookup table of 256 values that I use to translate WParam of (30 Hex or 48 Dec) to '0' or ')' depending on Shift State, and then I add it to my buffer.  I built these by hand for each ascii key, but I think this is the source of my problems when the keyboards are changed.

I would like to see...

1) source code snippets using keyboard hooks to translate hook data into a buffer, that can handle ALT+1+4+0 type sequences producing a single keypress, and similar code for handling dead keys.

      ~ or failing that ~

2) Links to relevant documentation so I can accomplish this myself.

Please ask if there is anything I'm have not made clear.  

Thank You!Start Free Trial
[+][-]11.29.2003 at 05:59AM PST, ID: 9842220

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Windows Programming
Tags: delphi, caret, english, keyboard, non
Sign Up Now!
Solution Provided By: AlexFM
Participating Experts: 1
Solution Grade: A
 
 
[+][-]11.29.2003 at 05:38PM PST, ID: 9844119

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32