Hotkeys
Matt James
mattejames at gmail.com
Sun Jul 6 17:23:11 PDT 2008
On Sun, Jul 6, 2008 at 8:18 PM, Gregory Weston <gweston at mac.com> wrote:
> On Jul 6, 2008, at 8:04 PM, Matt James wrote:
>
> 3) Can a mouse event participate in being a hotkey? Ie, can my hotkey be:
>>>> "mouse-down+cmd+T" or something like that?
>>>>
>>>
>>> Not really. You can fake it by establishing a cmd-t handler and then
>>> looking for the mouse to also be down before actually processing the key,
>>> but I wouldn't rely on that technique.
>>>
>>
>> Why wouldn't you recommend doing that? Is efficiency the only concern?
>>
>
> I wouldn't rely on it because it's not reliable. As far as I know there's
> no way to identify that the mouse *was down* when the other elements of the
> combination were pressed. Only that it's down right now. So you have to hope
> that your code gets invoked quickly enough that the user hasn't released the
> button yet. And it *probably* will. But you're going to frustrate your users
> on the rare times that it doesn't; they'll start considering your software
> unreliable and will start looking for alternatives.
>
I see. Yeah, that makes total sense. Crappy that it doesn't work though.
:(
--
Matt James
http://www.macyenta.com
More information about the MacOSX-dev
mailing list