Older Version Newer Version

Alyce Alyce Jan 10, 2006

Keyboard events can only be trapped in graphics windows and graphicbox controls. Inkey$ is only valid in graphics windows and graphicbox controls.

Look in the helpfile category, "Language Syntax and Usage" and the sub-category "Graphics." You'll find a topic called "Reading Mouse Events and Keystrokes."

The state of the keyboard can be determined in any type of window by using the API call GetAsyncKeyState. Look for the helpfile category "Liberty BASIC Help" for the topic, "Using virtual key constants with Inkey$." In the same category, read "Using Inkey$."

Note that "Inkey$" is case sensitive.