KeyPress Event

Qualifier keys such as ALT, CTRL and SHIFT are prioritized in this order. When the user presses a combination of these three keys, the highest qualifier determines the key code. If, for instance, the ALT key is pressed with SHIFT, the key code is the same as if you pressed the key and just ALT. If the user instead presses SHIFT and CTRL, the key code switches to the CTRL combination. Only when the SHIFT key is pressed, you would end up with the SHIFT key code. The following table clarifies this for the U key:
              nKeyCode  nShiftAltCtrlU                  117 	0Shift+U             85 	1Ctrl+U              21 	2Alt+U               22 	4Shift+Ctrl+U        21 	3Shift+Alt+U         22 	5Ctrl+Alt+U          22  6Shift+Alt+Ctrl+U    22  7 (works only intermittently on my laptop)
The exception from the rule above is the SHIFT+ALT combination on keyboards that support anALTGR key. SHIFT+ALT+Key and ALTGR+Key trigger the KeyPress event with nShiftAltCtrl=0 and the regular key code.
Read More…

Pages objects and the activate event

The Activate event of a page fires under the following circumstances:
Read More…