Fix Service menu shortcut: Alt+J, not Alt+S (Send owns Alt+S)
Alt+S didn't open the Service menu because the always-visible "Send my audio"
checkbox already owns Alt+S, and a visible control beats a top-level menu for
the same Alt key. Every letter in "Service" (S/e/r/v/i/c) collides with a
control (Send / Receive / Volume / Connected peers / EQ / ...), so the menu
now uses Alt+J -- unused anywhere in the main window, so it opens reliably from
every tab. Same approach the Record menu already uses ("Record (Alt+&K)").
Kept Send on Alt+S (frequent control) rather than moving it.
New self-test "Menu shortcuts don't clash with controls": builds the main
window and asserts no top-level menu mnemonic collides with any control
mnemonic. The existing coverage audit couldn't catch this -- menu items are
ToolStripItems, not Controls, so its control walk never saw them. Confirms the
other four menus (File/Record/Options/Help) were already clean. Gate 31/31.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2dad00c42f
commit
e3e57affb4
@@ -2202,7 +2202,12 @@ public sealed class MainForm : Form
|
||||
/// querying status needs no elevation.</summary>
|
||||
private ToolStripMenuItem BuildServiceMenu()
|
||||
{
|
||||
var serviceMenu = new ToolStripMenuItem("&Service") { AccessibleName = "Service menu" };
|
||||
// Mnemonic is Alt+J, NOT Alt+S: the always-visible "Send my audio" checkbox already owns Alt+S, and
|
||||
// a visible control beats a top-level menu for the same Alt key (that's why Alt+S didn't open this
|
||||
// menu). J is unused anywhere in the main window, so it opens the menu reliably from every tab —
|
||||
// same reason the Record menu uses "(Alt+&K)". Every letter in "Service" (S/e/r/v/i/c) collides with
|
||||
// a control (Send/Receive/Volume/…). The "Menu shortcuts don't clash with controls" self-test guards this.
|
||||
var serviceMenu = new ToolStripMenuItem("Service (Alt+&J)") { AccessibleName = "Service menu" };
|
||||
var status = new ToolStripMenuItem("Service: …") { Enabled = false, AccessibleName = "Service status" };
|
||||
var configure = new ToolStripMenuItem("&Configure service profile...") { AccessibleName = "Configure service profile" };
|
||||
configure.Click += (_, _) => ConfigureServiceProfile();
|
||||
|
||||
Reference in New Issue
Block a user