home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------*/
- /* KEYCODE.C */
- /*------------------------------------------------------------------*/
- /* API ▒` ªí : 1. detecting() ( in keycode.c ) */
- /* 2. undetecting() ( in keycode.c ) */
- /* API ¿τ╝╞└] : keycode.plb */
- /* ⌐IÑsñΦªí : SET LIBRARY TO KEYCODE ( ⌐IÑs DETECTING() ) */
- /* SET LIBRARY TO ( ⌐IÑs UNDETECTING() ) */
- /*------------------------------------------------------------------*/
- #include <pro_ext.h>
-
- int eventid;
-
-
- FAR EventHandler(WHandle theWindow, EventRec FAR *ev)
- {
-
-
- switch(ev->what)
- {
-
- case keyDownEvent:
- if (ev->modifiers & shiftCodeMask) /* ñ@¡╙╜╒╕`┴Σ│Q½÷ñU */
- {
- if (ev->modifiers & altKey) /* Alt ┴Σ */
-
- _PutStr("Alt ┴Σñº½÷┴Σ╜X└│╕╙│Q¿╧Ñ╬\n");
-
- else
- if (ev->modifiers & ctrlKey) /* Ctrl ┴Σ */
-
- _PutStr("Ctrl ┴Σñº½÷┴Σ╜X└│╕╙│Q¿╧Ñ╬\n");
-
- else
- if (ev->modifiers & shiftKey) /* Shift ┴Σ */
-
- _PutStr("Shift ┴Σñº½÷┴Σ╜X└│╕╙│Q¿╧Ñ╬\n");
- }
- else /* Ñ╝½÷ñU╜╒╕`┴Σ */
- _PutStr("Ñ┐│W½÷┴Σñº½÷┴Σ╜X└│╕╙│Q¿╧Ñ╬\n");
-
- return NO;
- break;
-
-
-
- default:
- return NO;
- }
- return YES;
- }
-
- FAR Detecting()
- {
-
- eventid = _ActivateHandler(EventHandler);
-
- }
-
-
-
- FAR Undetecting()
- {
-
- _DeActivateHandler(eventid);
-
- }
-
-
- FoxInfo myFoxInfo[] =
- {
- {"DETECTING", Detecting, CALLONLOAD, ""},
- {"UNDETECTING", Undetecting, CALLONUNLOAD, ""}
- };
-
- FoxTable _FoxTable =
- {
- (FoxTable FAR *)0,
- sizeof(myFoxInfo) / sizeof(FoxInfo),
- myFoxInfo
- };