How to receive "Vanilla Keys" in a gadget GM_HANDLEINPUT ?
For those who doesn't know, you can ask an intuition window to receive just "rawkey" messages, that are hardware ids from keyboard position, or also ask "Vanilla keys" which are keys signals translated from locale keyboard settings and have concrete letter or any ANSI/ASCII code. This is very fine, but:
- low level Amiga intuition windows can receive either rawkeys and/or vanilla
- Amiga Boopsi level window object can also receive either rawkeys and/or vanilla
- Boopsi gadget GM_HANDLEINPUT ... can only receive RawKey message, and not vanilla keys...or I may have not seen something in the documentation or I may have been lost somewhere.
... And of course I need exactly that: vanilla keys in GM_HANDLEINPUT.
The thing is, I was suspecting having vanilla keys from rawkeys was just about using keymap.library mapRawKey() ... but no, it doesnt manage the whole thing:
In a french keyboard for example you're meant to type â, by typing first ^, then a, and with vanilla keys you would receive "â" on the second typing (and so on we have words like château or noël )... and I suspect other keyboard confs have different "2 key for one" behaviours I can't guess: mapRawKey() doesnt do that. So well, I finally re-inject the real vanilla key message from the window level to my gadget, but I consider that a hack, it would be better managed in GM_HANDLEINPUT.
Online Status
MapRawKey is the way to do it, and how string.gadget does it: the trick is to make MapRawKey remember previous deadkeys (as they are known)
You can see how in the apidocs:
https://developer.amigaos3.net/autodocs/keymap.library/MapRawKey.html