Jump to content

Image of the Day

#QuestOfDungeons is an old-fashioned dungeon crawler. #ScreenshotSaturday  #PS4share

https://t.co/1mztLegxeN https://t.co/DpYimg3MZb
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

[Windows] Shortcut key problems

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Juliean   GDNet+   

6674
Like
0Likes
Like

Posted 05 October 2013 - 08:34 AM

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?



#2 wintertime   Members   

3990
Like
1Likes
Like

Posted 05 October 2013 - 08:48 AM

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.



#3 Juliean   GDNet+   

6674
Like
0Likes
Like

Posted 05 October 2013 - 10:11 AM

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!






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.