Parse IDCMP_EXTENDEDKEYBOARD through WM_HANDLEINPUT ?

4 posts / 0 new
Last post
TomSoniq
TomSoniq's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2011-08-29 16:41
Parse IDCMP_EXTENDEDKEYBOARD through WM_HANDLEINPUT ?
Hi, I've opened a ReAction window which has (among others) the IDCMP_RAWKEY and IDCMP_EXTENDEDKEYBOARD flags set. Whenever I'm signalled that something has happened with the window I call its WM_HANDLEINPUT method. This is what happens: When a normal key is pressed the method's result has got the WMHI_RAWKEY bit set and I can parse the raw key as expected. The next result I get is WMHI_LASTMSG. However, when a multimedia key is pressed I'm still signalled but the very first WM_HANDLEINPUT returns WMHI_LASTMSG. Interestingly the int16 pointed to by wmh_Code contains 0x4000 in this case which matches IMSGCODE_INTUIRAWKEYDATA. A coincidence? Could be because I can't squeeze any more information out of it. Even GetAttrs(WinObj, WINDOW_InputEvent) doesn't give me any valid data. I guess that's to be expected. I haven't received a WMHI_RAWKEY, so why should it? So ... am I missing something? Pressing a multimedia key causes a signal to be sent but WM_HANDLEINPUT doesn't give me anything back? Any help appreciated. :)
thomas
thomas's picture
Offline
Last seen: 3 weeks 5 days ago
Joined: 2011-05-16 14:23
Re: Parse IDCMP_EXTENDEDKEYBOARD through WM_HANDLEINPUT ?
I guess you cannot expect anything from WM_HANDLEINPUT because window.class neither knows nor handles IDCMP_EXTENDEDKEYBOARD (yet). Your only choice probably is WINDOW_IDCMPHook / WINDOW_IDCMPHookBits with a function which extracts the required values from the IntuiMessage and somehow forwards them to your main program (for example using the h_Data pointer).
TomSoniq
TomSoniq's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2011-08-29 16:41
Re: Parse IDCMP_EXTENDEDKEYBOARD through WM_HANDLEINPUT ?
Aah, thanks a lot! I was looking for a way to handle IDCMP_EXTENDEDKEYBOARD myself but still use WM_HANDLEINPUT for all the other IDCMP flags. Didn't know about this IDCMP hook. Thanks for pointing me to it! :)
trixie
trixie's picture
Offline
Last seen: 2 months 3 days ago
Joined: 2011-02-03 13:58
Re: Parse IDCMP_EXTENDEDKEYBOARD through WM_HANDLEINPUT ?
@TomSoniq The WM_HANDLEINPUT method does not (and will not, I was told) support all IDCMP events, so as Thomas says, WINDOW_IDCMPHook is the way to go.
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition Author of [url=http://www.os4depot.net/index.php?function=showfile&file=utility/scienti... for OS4
Log in or register to post comments