KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Determine whether the control key is pressed down
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: June 3, 2005
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Versions: 2003 and 2004

Here is a project method that check to see if the Control Key is pressed down. If so, the command returns a true value as the function result.

  ` Method: IsControlKeyDown
  ` Description
  ` Returns true if the control key is pressed
C_LONGINT($platform)
C_BOOLEAN($0)
PLATFORM PROPERTIES($platform)
If ($platform=3)
  $0:=Windows Ctrl down
Else
  $0:=Macintosh control down
End if