LPARAMETERS nKeyCode, nShiftAltCtrl >DO case > case nKeyCode = 18 && PageUp key remapped to Shift+Tab **> Keyboard "{SHIFT + TAB}" nodefault dodefault(15, nShiftAltCtrk) > case nKeyCode = 3 && PageDown key remapped to Tab **> Keyboard "{TAB}" nodefault dodefault(9, nShiftAltCtrk) > otherwise > DoDefault(nKeyCode, nShiftAltCtrl) >EndCaseWhile stufffing the keyboard generally works, specially within keypress method, it's still not entirely bulletproof - just tried using a keyboard macro which stuffs "abcdefghijklmnoprst" and had
LPARAMETERS nKeyCode, nShiftAltCtrl IF nKeyCode%16=1 NODEFAULT * DODEFAULT(nKeyCode+1, nShiftAltCtrl) KEYBOARD CHR(nKeyCode+1) endiffor Keypress - it gave me "bcdefghijklmnoprstbr" instead of "bbcdefghijklmnoprrst". It did work with the Dodefault uncommented and Keyboard commented. What happened: the keyboard macro stuffs all the characters at once, and keypress reacted by not accepting the two characters (a and q) and by stuffing b and r instead in the keyboard buffer - only after the other characters were already there. While it may not hurt your case, I still think that this technique is cleaner - KeyPress processes immediately, not relying on an external mechanism such as stuffing characters in keyboard buffer.