Re: Setting key equivalent for menu items in IB?
Re: Setting key equivalent for menu items in IB?
- Subject: Re: Setting key equivalent for menu items in IB?
- From: Lee Ann Rucker <email@hidden>
- Date: Fri, 04 Sep 2015 01:45:19 +0000
- Thread-topic: Setting key equivalent for menu items in IB?
Between the Key Equivalent label and the Alternate checkbox, there’s a thing that looks like a textfield but which Accessibility Inspector seems to be unaware of. It’s not a normal textfield; when focused it grabs all keystrokes including cmd-F7 which ought to do “lock focus” in the AX inspector but instead is set as the item’s key equivalent.
The textfield has a button that lets you clear it (since of course typing backspace in that field just sets the shortcut to backspace); that’s the only part of it I can get to show up in the inspector. Its parent is the AXScrollArea that contains all the Menu Item stuff.
As an aside, it annoyingly grabs cmd-S too, so every so often I’ve thought I’ve saved a file but actually all I’ve done is broken my app’s menus. So if it had some accessible content that you had to actively choose to use, that would help all users: my UI to choose a modified key combination consists of a segmented control to let you toggle on shift, control, option, cmd, and a combo box where you choose the special keys from a popup (delete, FN keys, etc) or type a letter. And it has apply and cancel buttons so you never change it by mistake. And, of course, AX works on it.
On Sep 3, 2015, at 6:25 PM, Alex Hall <email@hidden> wrote:
> Hello all,
> I know this is normally a trivial process: select the menu item, click the Attributes Inspector, set the key equivalent. The problem is, it's apparently impossible for VoiceOver to manage, and when I file the bug, I want to be sure I know where the problem lies.
>
> The question, then, is simple: exactly how do you set a key equivalent in IB, assuming enough vision to do it the "normal" way? Specifically, where do you go in the Attributes Inspector, and how do you enter the desired keystroke?
>
> VO tells me about the text field for the title of the menu item, then it reports a text label that reads "key equivalent". Next to that is the checkbox for whether this menu item is an alternate. For items that are preset, like Undo or Copy, there's an unlabeled AX button just before the "key equivalent" label. Sometimes, by playing with mouse routing/click commands while focused on that label, I can get an untitled window to appear. Switching to it results in VO being completely stuck for the few seconds I have before the window vanishes. I've tried quickly typing the keystroke I want--thinking I had landed in some kind of odd text field--while this mysterious window is open, but that doesn't do anything. I have a feeling there's either a step I'm missing, or--more likely--the necessary control for this is invisible to VO.
>
> Setting it in code, for the record, fails as well, since I get errors about the key mask I want not being a member of NSEvent. That's a different topic, but I wanted to mention that I've tried just coding it, and was unable to do so, hence my desire to alert Apple to the inaccessibility of this process in IB.
>
> --
> Have a great day,
> Alex Hall
> email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden