char KeyDownC(int code1, int code2) { unsigned int key1 = 0, key2 = 0; short unused = 0; if(Bkey_GetKeyWait(&key1, &key2, KEYWAIT_HALTOFF_TIMEROFF, 0, 0, &unused) == KEYREP_KEYEVENT) { if(key1==code1 && key2==code2) return 1; else return 0; } }
However, when running an Add-In program either in the emulator or actually on my calculator (the FX-9860GII), the function only returns the "first" key pressed, even if other keys are pressed after it, while the original is still held down. Therefore for it to actually register a key change, all keys must be released before pressing the new key. This is not the behavior I want, and I believe it is a change from the original "IsKeyDown()" function which would allow multiple keys to be pressed and returned TRUE for all of them. However, it has been depreciated and seemingly removed from the 9860GII.
I can obtain the multiple key down behavior in the emulator by using the revolution-fx function "FastKeyDown()"; however, this crashes the app on the actual calculator, probably because of the various OS changes between the 9860G and the 9860GII. Attempting to use "IsKeyDown()", again, works fine in the emulator, but crashes the app on the actual calculator, most likely because it has been removed!
Therefore, does anyone know how to obtain the multiple keys down behavior described above on the 9860GII, either by somehow using "BKey_GetKeyWait()" function, possibly "GetKey()" (although that seems to hang until a key is actually pressed), or even by re-writing the assembly for the "FastKeyDown()" to make it work on the 9860GII?
Many Thanks.