Re: Full Keyboard Access
Re: Full Keyboard Access
- Subject: Re: Full Keyboard Access
- From: Guy Fullerton <email@hidden>
- Date: Wed, 16 Oct 2002 10:53:52 -0700
On 10/16/02 4:01 AM, "joe udder" <email@hidden> wrote:
>
I was searching thru ADC for any hint on determining if "Full Keyboard
>
Access" in Prefeences is activated, but I had no success in finding any
>
information.
>
I am especially interested in knowing in the option of being able to focus
>
all kinds of controls.
It sounds like you're not really interested in whether the "turn on full
keyboard access" setting is on, but you're actually interested in whether
the "focus any control" setting is on. (These two settings are orthogonal.)
I'm going to continue my answer based on that assumption. If my assumption
is wrong, let me know :)
There is no API to determine whether "focus any control" is on. In fact, the
"focus any control" setting is stored at the global/system level as well as
at the per-window level. The per-window setting is a temporary override of
the global setting. On top of that, option-Tabbing inverts the sense of the
setting.
The proscribed way of dealing with the "focus any control" setting depends
on whether you're writing a) application event-handling logic or b) a
control/HIView.
A) When your application's event loop sees tab keys, conditionalize your
code for Jaguar and later to call HIViewAdvanceFocus instead of
Advance/ReverseKeyboardFocus. (This is done automatically by the standard
window event handler.) HIViewAdvanceFocus will make sure to consult the
"focus any control" state and make the right request of any controls/HIViews
that it attempts to focus.
B) Your control/HIView should handle the kEventControlSetFocusPart
CarbonEvent (instead of the kControlMsgFocus) to do its focusing. Grab the
kEventParamControlFocusEverything parameter and use its value to determine
whether your control should really accept the focus at this time. (See the
description of kEventControlSetFocusPart in CarbonEvents.h for more
important details about this parameter.)
Unfortunately, there's no way for non-control/HIView-based content to be
given (or to determine) the "focus any control" setting.
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.