home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 1.0 KB | 51 lines | [TEXT/ToyS] |
- global gasProg
-
-
- on run
- set gasProg to display progress titled "Modifier Key Test" subtitled "Idling…"
- end run
-
-
- on idle
- set modKeys to (input state with «class KMod»)
-
- set mkeyVal to modKeys
- set mkeyStr to ""
-
- if (modKeys ≥ 16) then
- set mkeyStr to mkeyStr & "-Command"
- set modKeys to modKeys - 16
- end if
-
- if (modKeys ≥ 8) then
- set mkeyStr to mkeyStr & "-Control"
- set modKeys to modKeys - 8
- end if
-
- if (modKeys ≥ 4) then
- set mkeyStr to mkeyStr & "-Option"
- set modKeys to modKeys - 4
- end if
-
- if (modKeys ≥ 2) then
- set mkeyStr to mkeyStr & "-Caps Lock"
- set modKeys to modKeys - 2
- end if
-
- if (modKeys ≥ 1) then
- set mkeyStr to mkeyStr & "-Shift"
- set modKeys to modKeys - 1
- end if
-
- if (mkeyStr is "") then
- set mkeyStr to "None"
- else
- set mkeyStr to the text from character 2 to -1 of mkeyStr
- end if
-
- set test to input state with «class KOpt», «class KCmd» and «class KCtl»
- display progress gasProg subtitled mkeyStr labeled (mkeyVal as string) & ":" & (test as string)
-
- return 1
- end idle
-