Re: Possible to simulate just the control key?
Re: Possible to simulate just the control key?
- Subject: Re: Possible to simulate just the control key?
- From: roncross <email@hidden>
- Date: Fri, 26 Mar 2004 21:20:34 -0700
You can use ASCIIseek to simulate a control key command. On my
keyboard, it is ASCII number 246; it may be something different on your
computer. Just put this in an applescript as follows:
key down (ASCII character 246) -- on my machine the control key is
ASCII character 246. The control key will be a caret symbol.
Be sure to wrap it with the appropriate tell commands, system events,
etc.... This is a system events.
To find out what the control is with ASCIIseek. Try pushing down the
alt key with one of the alphabetical keys. Once you find it, you can
you it in your applescript.
For system event, you will have to make sure that you are GUI enabled.
You do this by going to the Universal Acess pref pane and "Enable
access for assistive devices. This is required for scripts that
interact via GUI scripting.
Here is the web site for ASCII key:
http://www.railheaddesign.com/
thx
RLC
On Mar 24, 2004, at 10:32 AM, Michael Ziober wrote:
>
Does anyone know how to make iDVD 3 running on OS X 10.3.2 think that
>
_just_ the control key is down? Hopefully something better than "lay a
>
book on the control key"! :-)
>
>
iDVD (aside from its odd object model and dictionary) has an
>
unofficial feature which checks the state of the control key, plus a
>
few other things, when burning a disc, which allows it to be used to
>
automatically batch build and "burn" DVDs as disk images.
>
Unfortunately, iDVD is testing the key directly as opposed to whether
>
it is used as a modifier for a keyboard event, so "keystroke using
>
control down" isn't what I need.
>
>
I have a keyboard map which indicates that the code for the control
>
key is 0x3B, but "key code 59" doesn't seem to have any effect. It
>
appears to generate a single keyboard event, rather than allowing me
>
to set the key state to down, send a command to iDVD, and then set the
>
state to up. This makes sense because the syntax makes no distinction
>
as to the key state.
>
>
Finally, I stumbled across this key combo by random experimentation:
>
press and hold LEFT control key, press and hold RIGHT control key,
>
release LEFT control key, release RIGHT control key. This locks the
>
control key in the down state. Press and release the LEFT control key
>
to unlock it. Oddly, this combination works only for the control key
>
and no other modifiers. It also seems to be independent of any
>
keyboard or universal access settings, so why is it there?
>
>
While the last method is functional, it's also an ugly hack which is
>
very confusing when you forget that it's active! So, does anyone have
>
any wisdom on using key code or perhaps an OSAX that works with
>
Panther? I'm willing to entertain anything: BSD, SystemUIServer,
>
System Events, etc.
>
>
Thanks,
>
Michael
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
>
>
thanks
Ronald Cross
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.