Calculation Code

From Fmfaq

Jump to: navigation, search

This is a growing list of calculation code where you can find common calculations. As this page grows it can be broken out into various areas of use.

Control Key or Command Key Down

Note: This is FileMaker 7+ format. FileMaker 6 and earlier uses Status() functions.

( ( Get( ActiveModifierKeys ) =16 or Get( ActiveModifierKeys ) =18 ) and Abs( Get( SystemPlatform ) ) = 1 )
or
( ( Get( ActiveModifierKeys ) =4 or Get( ActiveModifierKeys ) =6 ) and Abs( Get( SystemPlatform ) ) = 2 )

That calculation can fail if additional modifier keys are held down.

I use this as the method to determine whether a specific key if down:

Mod(Get(ActiveModifierKeys) / n, 2)

where 'n' is the 1, 2, 4, 8, 16 denoting the various modifier keys outlined in help.

Personal tools