Genius! Sometimes all it takes is a fresh brain.
I’ll be honest, I wasn’t expecting that to work because of the quirks of these three apps working in conjunction, but it’s certainly cured the “locked shift” problem that was interfering with other investigations.
Part of the larger issue is that as well as CTRL and SHIFT keys the Gemini keyboard also has a FN key for accessing symbols such as |, \ and [ that are “under” some of the keys, and an ALT key that doubles as a shortcut for system functions, some of which can be trapped and others that can’t. All four of these can interact in very odd ways.
Also, depending on the IME used the SHIFT keys can return an individual scancode of their own, or a scancode in conjunction with the key they’re pressed with, or sometimes both in sequence depending on how rollover is handled. It all makes for some interesting trial and error.
For instance, playing around this evening I’ve discovered that while SHIFT-comma (which is / on the Gemini keyboard for legacy reasons) doesn’t register in either Magic DOSbox or the Psion emulator, it does work if you do FN-SHIFT, hold SHIFT, press comma. I have absolutely no idea why.
On the other hand FN-3 (which is \ on the Gemini) works fine in Magic DOSbox but stops working as soon as the Psion emulator is launched from within it, presumably because the emulator is using its own custom keyboard routines that expect to see an IBM-compatible keyboard and not something emulated by an Android IME. Emulators within emulators.
Thanks again for the heads-up on the SHIFT remapping thing. I’d have no doubt tried it eventually out of sheer desperation but it would have taken me a long time to get there.