The event is triggered if key n is pressed. n is the key number [1—10] defined in the KEY statement.
This should, however, be:
The event is triggered if key n is pressed. n is the key number [1—20] defined in the KEY statement.
That is to say, the number is incorrect, making one assume that the ON KEY event only works with function keys and not the arrows or user-defined keys, which not only doesn't make any sense, but doesn't even correspond to the actual behaviour of the emulator.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "[CLOSED] Bug reports" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
The documentation for the ON KEY event reads:
This should, however, be:
That is to say, the number is incorrect, making one assume that the ON KEY event only works with function keys and not the arrows or user-defined keys, which not only doesn't make any sense, but doesn't even correspond to the actual behaviour of the emulator.
That looks like a typo - I'll fix it.
Bug tracker here https://github.com/robhagemans/pcbasic/issues/21