Okay, the method of using windows key events seems to work everywhere. It leaves open the question of exactly when to use Getkey, Keydown, Hitkey, Flushkeys etc, and what exactly they do, but I can leave that for the purpose of the present exercise.
Thanks to all who answered.
Thanks to all who answered.