Skip to content

Choosing an app menu item opened from the keyboard under --focus may do nothing in VS Code #954

Backlog

Description

@M4n0x

What happens

With #943, App menus opened with the pointer leave the keyboard with the app in front, so VS Code runs the item you choose. A menu opened from the keyboard, after StableBar --focus, still takes the keyboard on purpose so you can move through it. When you then choose an item, StableBar's popup is still the key window, so VS Code likely drops the command, as it did for every App menus item before #943 (#941).

This comes from reading the code and from #941's evidence. It hasn't been reproduced by hand yet.

Steps to reproduce

  1. Add an App menus widget, and bind StableBar --focus to a key.
  2. Bring VS Code to the front, and set its log level to Trace ("Developer: Set Log Level…").
  3. Press the key bound to --focus, move to File with the arrow keys and press Return.
  4. Tab to New Text File and press Return or Space.

Expected

The command runs in VS Code, as it does from a native menu opened with Control-F2 and from App menus opened with the pointer.

Environment

Evidence

Without #943, VS Code logged this line at Trace level for every App menus item (#941):
menubar#runActionInRenderer: no active window found {"type":"keybinding","userSettingsLabel":"cmd+n"}

Diagnosis

  • WidgetPopup sets leavesKeyboard = !window.isKeyWindow on an app menu popup (and on the tray in showRow). Under --focus, BarPanel.focusWidgets() has made the bar key, so the popup keeps canBecomeKey and becomes key when it opens.
  • AppMenu.press(_:) sends kAXPressAction on a detached task right away. Nothing gives the keyboard back to the app in front first, so it has no key window when the press arrives.
  • A fix should keep keyboard navigation in the menu (Use the bar with VoiceOver and the keyboard #212, Popup sliders, toggles, segmented controls, the chooser and text fields show no keyboard focus #517). For example, StableBar could close the popup and give up the keyboard before the press, then wait until the app has a key window again.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    bug
    accessibility
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions