Locking key window
Locking key window
- Subject: Locking key window
- From: Rick Hoge <email@hidden>
- Date: Wed, 07 Mar 2007 20:58:35 -0500
I know that normally this would be bad bad bad from an HIG
standpoint, but I have a particular application where it makes sense.
I wrote an app for doing psychophysical and cognitive testing which
has two main windows which would normally run on separate monitors.
One window is for the subject to view prompts and provide responses
by the keyboard, while the other is used for the researcher to
monitor the experiment.
The app runs fine at present, but I would like to find a way to
ensure that, while an experimental run is in progress, all keyboard
activity is processed by the window presented to the subject, even if
another window is clicked with the mouse. I had a vague feeling that
this might be achievable using either a run loop or one of the
firstResponder methods defined in NSResponder. However I have yet to
find a solution.
If anyone has any tips on how this might be achieved, it will
probably save some aggravation one day when someone clicks the
experimenter's window by mistake and later realizes that none of the
subject's responses were recorded!
Thanks in advance,
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden