Re: Listen For command and Escape key
Re: Listen For command and Escape key
- Subject: Re: Listen For command and Escape key
- From: Christopher Nebel <email@hidden>
- Date: Mon, 20 Mar 2006 10:14:17 -0800
On Mar 18, 2006, at 3:11 PM, Bill Cheeseman wrote:
The default Listening Key in the Speech Recognition pane of the
Speech preference pane of System Preferences is the Escape key. ...
Unfortunately, at least in recent versions, holding the Escape key
down causes the Listen For command to exit with an error to the
effect that the user interrupted the script while waiting for a
response -- or, sometimes, I just get a series of angry beeps. This
appears to be the result of AppleScript interpreting the Escape key
as a keyboard equivalent for a cancel operation. If you change the
default Listening Key to something else, say F5, the problem goes
away.
I don't recall having this problem with the Escape key in the old
days. It seems to me that either the problem with the Escape key
should be fixed, or the default Listening Key for speech
recognition should be changed. I would prefer changing the default,
since the Escape key has unfortunate connotations and conflicts.
Interpreting the Escape key as "cancel" is, at least on the surface,
not a bug, since that's what the Human Interface Guidelines say
programs ought to do. (See <http://developer.apple.com/documentation/
UserExperience/Conceptual/OSXHIGuidelines/XHIGUserInput/
chapter_11_section_3.html#//apple_ref/doc/uid/TP30000361-TPXREF44>.)
There's even an API to check for it -- CheckEventQueueForUserCancel.
This didn't cause problems in the old days because Escape wasn't
reliably supported to mean "cancel". You could argue that Listen For
ought to ignore Escape (at least if it's the push-to-listen key, and
possibly all the time), but it wouldn't help matters much, because if
you hold down the Escape key a little too long, the calling script
will see it and interpret it as "cancel".
Go ahead and file a bug, and describe it as you did here. I'd agree
with your assessment that changing the default push-to-listen key is
the preferable solution of the two, but it's good to have the context
and alternatives listed.
--Chris Nebel
AppleScript and Automator Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden