Sign in to follow this  
Juliean

[Windows] Shortcut key problems

Recommended Posts

Juliean    7067

Hello,

 

while working on my custom shortkey system for my gui, I encountered a few problems with certain key combinations not being recogniced by the messages I'm processing. I was using the WM_KEYDOWN and WM_KEYUP messages to record the states of the CTRL, SHIFT, and ALT key, and WM_CHAR for executing the command. I want the system to be platform indepedant, so I'm dispatching this information via my input handler. Now, when processing the ALT key I came across the WM_SYSKEYUP, WM_CHAR etc.. messages I needed to process. OK, so far so good.

 

But now there is certain combinations not being recognized at all. For example, most combinations with CTRL+ALT fire neigther the SYSCHAR nor the CHAR message. Is there some additional message I need to process, or some other way to tell windows to let those key combinations through?

Share this post


Link to post
Share on other sites
wintertime    4108

The WM_(SYS)CHAR messages are not for keys but for textinput and they get generated by TranslateMessage from the other messages in some contrived way, thats why you get problems. You better just use WM_KEYDOWN and WM_SYSKEYDOWN.

Share this post


Link to post
Share on other sites
Juliean    7067
The WM_(SYS)CHAR messages are not for keys but for textinput and they get generated by TranslateMessage from the other messages in some contrived way, thats why you get problems. You better just use WM_KEYDOWN and WM_SYSKEYDOWN.

Weird, I'm pretty sure I checked if the keydown message was send and it didn't happend... oh well, it works now, thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this