I have defined a trigger on both CTRL-SHIFT-S and CTRL-S in my application, but when I press CTRL-SHIFT-S, the trigger for CTRL-S fires. And - even weirder - when I remove the trigger for CTRL-S, the CTRL-SHIFT-S trigger fires, but KEYLABEL(LASTKEY) reports CTRL-S
What's going on here? (v 11.2) Try with this code:
ON 'CTRL-SHIFT-S' ANYWHERE
MESSAGE 1 KEYLABEL(LASTKEY) VIEW-AS ALERT-BOX.
/* ON 'CTRL-S' ANYWHERE */
/* MESSAGE 2 KEYLABEL(LASTKEY) VIEW-AS ALERT-BOX. */
DEFINE VARIABLE c AS CHARACTER NO-UNDO.
Might have found the answer here:
If you press SHIFT plus a code page character, the AVM turns off the SHIFT key modifier and maps to the appropriate character code. For example, SHIFT+A is equivalent to A, and A is mapped to keycode 65, which accords with the ASCII standard (and therefore most 7–bit character code pages). Also, many code page characters (for example, the comma) do not have uppercase equivalents; therefore, the SHIFT key modifier is turned off.
I think this bites me now, although I wonder why this is done.