>May be You shoul save the current assosiation , run the code & restore it.
>
> old_assosiation = ON("KEY","PGDN")
> ON KEY LABEL PgDn
> ....
> ON KEY LABEL PgDn &old_assosiation
>
This wasn't fast enough in DOS/FPD2.6 days... I've had users who were able to sneak another keypress between the first two lines. Maybe today's machines are fast enough to prevent that, but there's always a risk that the machine may be slowed down for whichever reason.
Besides, this still keeps Fox listening to other keys, so an OKL on PgUp may fire while it's still working on the code for PgDown.
For a while I used to think that OKL's were a great idea, and I still use them instead of keyboard macros, when I'm doing a repetitive thing on manually selected records and other similar situations - but only in the command window. Not in the application.
Form.keypress:
... case nKeyCode=-1 && F2
etc etc.