Skip to content

Mod+Alt shortcuts fail on the macOS Russian layout: Cmd+Option+S arrives as key "z", composer runs Undo #7909

Open

Description

@FeelsGoodEtc

Summary

On macOS with the Russian input source, Cmd+Option+S reaches the page as key: "z", code: "KeyS". bb compares the typed character, sees Cmd+Option+Z, finds no binding, and the composer receives the event and runs Undo (beforeinput historyUndo). Any Mod+Alt+letter shortcut is affected. I expected bb to match the binding by the physical key, as it already does for non-Latin characters since #7786.

Versions and environment

  • bb 0.50.1 (desktop app), macOS 26.0
  • Input sources: Russian and English, switched with Caps Lock

Steps to reproduce

  1. Bind any command to Cmd+Option+S, for example bb settings keyboard set settings.open Mod+Alt+S. Make sure no installed plugin also handles Cmd+Option+S.
  2. Switch the input source to Russian.
  3. Click into the composer, type some text, press Cmd+Option+S.
  4. Switch to English and press Cmd+Option+S again.
  5. Clean up: bb settings keyboard reset settings.open.

Expected vs actual

Expected: Settings opens with either input source.
Actual (Russian): nothing opens; the composer undoes the last input.
Actual (English): Settings opens.

DevTools log in the desktop app, Russian input source, Cmd+Option+S pressed six times:
keydown "Meta" MetaLeft meta true alt false prevented false
keydown "Alt" AltLeft meta true alt true prevented false
keydown "z" KeyS meta true alt true prevented false
beforeinput historyUndo null
(same sequence repeated; the event is never defaultPrevented)

Evidence

  • Listener used: window.addEventListener('keydown', e => console.log('keydown', JSON.stringify(e.key), e.code, 'meta', e.metaKey, 'alt', e.altKey, 'prevented', e.defaultPrevented), true) plus a beforeinput logger on document.
  • Cause in code: normalizeAppShortcutInputKey uses the physical key with Alt held only when !isAsciiAlphanumeric(input.key). "z" is ASCII, so it returns "z". matchesAppShortcutKey only tries the layout key when Alt is up. The 0.50.1 desktop bundle has the same Alt branch.
  • Suggested fix: with Alt held, decide by the layout's base character for event.code instead of the Option-layer character, for example via navigator.keyboard.getLayoutMap(). If the base character for KeyS is non-Latin ("ы"), match by the physical key. Dvorak, AZERTY and other Latin layouts keep matching by their typed letters.

AGENT GENERATED. Drafted by an AI agent from the reporter's DevTools log and an inspection of the bb 0.50.1 app bundle.

What you ruled out

  • Not Match shortcuts by physical key on non-Latin keyboard layouts #7786: that fix covers non-Latin typed characters and states "The Alt path is unchanged"; here the typed character is Latin ("z") and Alt is held.
  • Still present on main at fab8266 by reading the code linked in Evidence (not run from source).
  • Not system or app hotkeys: no macOS symbolic hotkey or Karabiner rule uses Cmd+Option+S; with the English input source it works.
  • [CHECK: built-in command] Same with a built-in command bound to Mod+Alt+S (steps 1–4).
  • [CHECK: Keyboop] Still happens with Keyboop (a layout auto-switcher) quit.

Suggested priority and effort (optional)

Medium — every Mod+Alt+letter binding for Cyrillic-layout users on macOS; the press silently undoes composer input; workaround: switch to English or rebind; effort probably Low

Checks

  • I reproduced this on the latest release or on main, or I say above that I could not.
  • I searched open and closed issues for the same problem.
  • If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report.

Activity

  1. added theissue type on Nov 20, 2026
  2. added
    ui
    partial-repro
    on Nov 20, 2026
  3. bb-slop-cop commented on Nov 20, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Medium · ui.
    • Report: Reproduction and root cause — PARTIALLY REPRODUCED; high confidence in the matcher cause; reproduction label: partial-repro.
    • Evidence: The focused matcher regression fails identically in two clean trusted-main checkouts; four controls pass in each. All 340 existing domain tests pass without the regression.
    • Root cause: With Alt held, ASCII output bypasses physical-key fallback, so the reported KeyS/Z event cannot match the S binding. The current input contract lacks active-layout base-key context.
    • Limits: Native macOS event generation and composer Undo remain unverified on Linux.
    • No PR: A safe repair needs validated layout context and platform fallback behavior to avoid breaking Latin layouts; this does not meet the simple-fix safety gate.
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

    partial-reproui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions