◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ' This example uses the KEY and ON KEY statements to trap the Ctrl+s (control ' key and lowercase "s") key combination. ' Note: This example requires Caps Lock and Num Lock to be off. ' To try this example: ' 1. Choose New Project from the File menu ' 2. Copy the code example below to the code window ' 3. Press F5 to run the example CONST ESC = 27 KEY 15, CHR$(&H4) + CHR$(&H1F) ' Set up Ctrl+s as KEY 15 ON KEY(15) GOSUB PauseHandler KEY(15) ON WHILE INKEY$ <> CHR$(ESC) PRINT "Press Esc to stop, Ctrl+s to pause." PRINT WEND END PauseHandler: SLEEP 1 RETURN