Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting keyboard key presses

Status
Not open for further replies.

flea333

Technical User
Sep 4, 2003
47
US
I need to continually check up on the keyboard input to in order to control the program using the keyboard. My program runs through a process, looping, and I would like to poll to see if for example ctrl+Q was hit to exit the program. How?
 
You would need to use set aspect keys on for your script to take over key processing from Procomm itself, then use the keyget command to actually get the key's value. However, since you are using a dialog I am not certain this will work due to this note in the discussion of the keyget command:

Keys can only be retrieved by the script when Procomm Plus’s main window has the input focus.

aspect@aspectscripting.com
 
I am not using a dialog in this program. I am using the termmsg to display all my data, so I want to be able to have the user press ctrl Q at any time, then at some point my program will check if ctrl Q was pressed and quit. Similiar to DOS programs. So what you said should work, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top