>LPARAMETERS nKeyCode, nShiftAltCtrl >if IsAlpha(Chr(nKeyCode)) && and nKeyCode=>0 && Remove the first && to see the bug > DoDefault(Asc(Upper(Chr(nKeyCode)))) > NoDefault >EndIf>This code runs fine EXCEPT when any of the function keys are cleared, because default function keys set negative values for nKeyCode, and cause chr(nKeyCode) to generate an error. So I added a check for nKeyCode>0, which appeared to work fine for most keys, but not all. The following keys are simply "eaten" when I check for nKeyCode>0 by adding the "and nKeyCode=>0": D,E,F,G,T,U,V and W, plus a few international characters.
>LPARAMETERS nKeyCode, nShiftAltCtrl >if IsAlpha(Chr(nKeyCode)) > If nKeyCode=>0 > DoDefault(Asc(Upper(Chr(nKeyCode)))) > NoDefault > EndIf >EndIf>