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. :)
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).
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! :)
@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.
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2