ON KEY = Command

Included for backward compatibility. Use ON KEY LABEL instead.

This command is undocumented in the original VFP9 help file,
but the following documentation was found in the FoxPro for Windows 2.6 help, and may still be valid:

Executes a command when a specific key or key combination is pressed during a READ.

ON KEY
	[ = expN]
	[command]

Parameters

command
 The command to be executed when the key is pressed is specified with command.

   Corresponding
Key Codes Keystrokes
--------- -------------
 
272 - 281 Alt+Q, W, E, R, T, Y, U, I, O ,P*
286 - 294 Alt+A, S, D, F, G, H, J, K, L*
300 - 306 Alt+Z, X, C, V, B, N, M*

315 - 324 F1 to F10 function keys
327   Home
328   Up Arrow 

329   Page Up
331   Left Arrow
333   Right Arrow

335   End
336   Down Arrow
337   Page Down

338   Ins (On the Macintosh, Help)
339   Del
340 - 349 Shift+F1 to Shift+F10

350 - 359 Ctrl+F1 to Ctrl+F10
360 - 369 Alt+F1 to Alt+F10*
370   Ctrl+Print Scrn

371   Ctrl+Left Arrow
372   Ctrl+Right Arrow
373   Ctrl+End

374   Ctrl+Page Down
375   Ctrl+Home
376 - 387 Alt+1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =*
388   Ctrl+Page Up

* In FoxPro for Macintosh, keystrokes Alt+... are replaced by Ctrl+Option+...

Expand imageRemarks

Expand imageExample

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic