Key XFCNs V2.0

Hypercard utilities, externals and info for Hypercard programmers.
User avatar
Info-Mac
Administrator
Posts:13716
Joined:December 21st, 1988, 11:00 am
Key XFCNs V2.0

Post by Info-Mac » September 11th, 1998, 9:00 am

Download: http://archive.info-mac.org/dev/card/key-xfcns-20.hqx

Key XFCNs V2.0 (replaces Key XFCNs V1.0 and the ControlKey XFCN)

New in this version:
xfcns and xcmds for PowerMacs added.

This HyperCard stack contains four XFCNs and one XCMD, all related to
key events.

The ControlKey XFCN, that came in a separate stack before, is now
included in this file.

controlKey()
returns "down" if the control key is pressed, "up" otherwise.

keyIsDown (|-1)
returns true if the specified key is pressed. With -1 as key code,
the XFCN
returns true if at least one key ist pressed, false if no key is
pressed.

virtualKeyCode ()
returns a comma delimited list of the virtual key codes of all
currently
pressed keys.

charKeyCode (["m[odifiers]"])
returns the character of the currently pressed key. If "modifiers" is
specified, the function returns them too. If command-option-x is
pressed, the function returns the string "cmd opt x".

flushKeyEvents
removes keyDown, keyUp, and autoKey events from the OS event queue.

Requirements:
This stack needs at least System 7.1 and HyperCard 2.2

Regards
Rolf Heller
Post Reply