Re: Extra Suites.app
Re: Extra Suites.app
- Subject: Re: Extra Suites.app
- From: Craig Williams <email@hidden>
- Date: Fri, 11 Sep 2009 18:49:06 -0600
Thanks Craig,
Only problem, this recommendation uses "KeyboardViewerServer" which does nor exist with Snow Leopard.
On Sep 11, 2009, at 6:42 PM, Robert Poland wrote:
Here is the code I am speaking of. I am currently using it on Snow Leopard. You can download a compiled version here.
#import <Carbon/Carbon.h>
int main (int argc, const char * argv[]) { unsigned int modifiers = GetCurrentKeyModifiers(); if (argc == 1) printf("%d\n", modifiers); else { int i, result = 1; for (i = 1; i < argc; ++i) { if (0 == strcmp(argv[i], "shift")) result = result && (modifiers & shiftKey); else if (0 == strcmp(argv[i], "option")) result = result && (modifiers & optionKey); else if (0 == strcmp(argv[i], "cmd")) result = result && (modifiers & cmdKey); else if (0 == strcmp(argv[i], "control")) result = result && (modifiers & controlKey); else if (0 == strcmp(argv[i], "capslock")) result = result && (modifiers & alphaLock); } printf("%d\n", result); } return 0; } |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden