From fcc3cdc7936dc52a441e18e1dd399db2bba73dd3 Mon Sep 17 00:00:00 2001 From: Ednunp <29843396+Ednunp@users.noreply.github.com> Date: Wed, 8 Jul 2026 14:31:22 +0100 Subject: [PATCH] Ctrl+1..9 to jump to a tab by its current position (main window + Preferences) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ctrl and a number selects the Nth tab as it currently appears — positions are live, so they follow the user's tab reordering and the pan/EQ tab's show/hide. Handled in ProcessCmdKey on both the main window and the Preferences dialog; focuses the tab strip afterwards so NVDA reads the new tab (like Ctrl+Tab). Matches Andre's readout app. Manual updated. Build clean; --selftest passes; deployed to both test folders. Held for next release. Co-Authored-By: Claude Opus 4.8 --- MANUAL.md | 5 +++-- readme.html | 5 +++-- src/RemSound.App/MainForm.cs | 19 +++++++++++++++++++ src/RemSound.App/PreferencesDialog.cs | 21 +++++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/MANUAL.md b/MANUAL.md index a5df9fe..045c209 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -761,7 +761,7 @@ Both Opus choices can automatically repair a single missing packet (see the sect ## 15. Keyboard shortcuts (within the main window) -Each tab has its own Alt+letter shortcuts. The same letter can do different things on different tabs without clashing — the shortcuts only work on the tab that's showing. Move between tabs with Ctrl+Tab and Ctrl+Shift+Tab. +Each tab has its own Alt+letter shortcuts. The same letter can do different things on different tabs without clashing — the shortcuts only work on the tab that's showing. Move between tabs with Ctrl+Tab and Ctrl+Shift+Tab, or jump straight to one with Ctrl and its number (Ctrl+1 for the first tab, and so on — the numbers follow whatever order you've set the tabs in). ### Connectivity tab @@ -854,6 +854,7 @@ Key| Action ---|--- **F1**| **Open this manual** in your default web browser. Works anywhere in RemSound — the main window, every dialog, and the profile picker on first launch. Ctrl+Tab / Ctrl+Shift+Tab| Move to the next / previous tab +Ctrl+1…Ctrl+9| Jump straight to a tab by its position — Ctrl+1 is the first tab, Ctrl+2 the second, and so on. The number follows the current order, so if you reorder the tabs (Preferences → Appearance) the numbers move with them. Works in the main window and in the Preferences dialog. Tab / Shift+Tab| Move between controls within the current tab Spacebar| Tick or untick an item in any device list, or toggle the focused checkbox Up / Down| Move between items in any list @@ -999,7 +1000,7 @@ All of these cues play through your default Windows sound output, which is separ ### The Audio cues tab -Open **File → Preferences** (or Ctrl+P) and go to the **Audio cues** tab. (Preferences is organised into five tabs — General, Audio cues, Startup behaviour, Update settings and Logging — which you move between with Ctrl+Tab, or with the arrow keys when the row of tab names has focus.) +Open **File → Preferences** (or Ctrl+P) and go to the **Audio cues** tab. (Preferences is organised into six tabs — General, Appearance, Audio cues, Startup behaviour, Update settings and Logging — which you move between with Ctrl+Tab, Ctrl and a number, or the arrow keys when the row of tab names has focus.) The **Audio cue sounds (Alt+N)** list shows every cue by name. Use the up and down arrow keys to move between them — as you land on each cue, RemSound plays its current sound, so you can hear what's set just by arrowing through. diff --git a/readme.html b/readme.html index b8998ee..34553a4 100644 --- a/readme.html +++ b/readme.html @@ -802,7 +802,7 @@ Audient USB Audio ASIO Driver — Pair 3 (channels 5/6): Loop-back 1 (L) / L

15. Keyboard shortcuts (within the main window)

-

Each tab has its own Alt+letter shortcuts. The same letter can do different things on different tabs without clashing — the shortcuts only work on the tab that's showing. Move between tabs with Ctrl+Tab and Ctrl+Shift+Tab.

+

Each tab has its own Alt+letter shortcuts. The same letter can do different things on different tabs without clashing — the shortcuts only work on the tab that's showing. Move between tabs with Ctrl+Tab and Ctrl+Shift+Tab, or jump straight to one with Ctrl and its number (Ctrl+1 for the first tab, and so on — the numbers follow whatever order you've set the tabs in).

Connectivity tab

@@ -896,6 +896,7 @@ Audient USB Audio ASIO Driver — Pair 3 (channels 5/6): Loop-back 1 (L) / L + @@ -1054,7 +1055,7 @@ Use whatever key combinations you prefer (for example Ctrl+Shift+Up / Ctrl+Shift

The Audio cues tab

-

Open File → Preferences (or Ctrl+P) and go to the Audio cues tab. (Preferences is organised into five tabs — General, Audio cues, Startup behaviour, Update settings and Logging — which you move between with Ctrl+Tab, or with the arrow keys when the row of tab names has focus.)

+

Open File → Preferences (or Ctrl+P) and go to the Audio cues tab. (Preferences is organised into six tabs — General, Appearance, Audio cues, Startup behaviour, Update settings and Logging — which you move between with Ctrl+Tab, Ctrl and a number, or the arrow keys when the row of tab names has focus.)

The Audio cue sounds (Alt+N) list shows every cue by name. Use the up and down arrow keys to move between them — as you land on each cue, RemSound plays its current sound, so you can hear what's set just by arrowing through.

diff --git a/src/RemSound.App/MainForm.cs b/src/RemSound.App/MainForm.cs index 811e2b9..4a8fc9b 100644 --- a/src/RemSound.App/MainForm.cs +++ b/src/RemSound.App/MainForm.cs @@ -7221,6 +7221,25 @@ public sealed class MainForm : Form /// protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { + // Ctrl+1..9 — switch to the main tab at that position. Positions are LIVE: they shift as the + // user reorders tabs (Preferences → Appearance) and the pan/EQ tab may be hidden, so the number + // always means "the Nth tab as it currently appears". Same idea as Andre's readout app. + if ((keyData & Keys.Modifiers) == Keys.Control) + { + int tabNum = (keyData & Keys.KeyCode) switch + { + >= Keys.D1 and <= Keys.D9 => (keyData & Keys.KeyCode) - Keys.D1 + 1, + >= Keys.NumPad1 and <= Keys.NumPad9 => (keyData & Keys.KeyCode) - Keys.NumPad1 + 1, + _ => 0, + }; + if (tabNum >= 1 && tabNum <= mainTabControl.TabPages.Count) + { + mainTabControl.SelectedIndex = tabNum - 1; + mainTabControl.Focus(); // focus the tab strip so NVDA reads the new tab, like Ctrl+Tab + return true; + } + } + // Defensive gate for the global menu shortcuts that change state (Ctrl+R = toggle // recording, Ctrl+S = save profile). The default WinForms behaviour fires these // shortcuts any time the form has keyboard focus — which technically includes the diff --git a/src/RemSound.App/PreferencesDialog.cs b/src/RemSound.App/PreferencesDialog.cs index 4f72ff5..c234029 100644 --- a/src/RemSound.App/PreferencesDialog.cs +++ b/src/RemSound.App/PreferencesDialog.cs @@ -1013,6 +1013,27 @@ internal sealed class PreferencesDialog : Form /// focus event (without the transition WinForms can treat focus as unchanged and stay silent). /// * NotifyFocus re-fires the MSAA focus event as belt-and-braces. /// Ctrl+Tab still switches tabs from inside the page. + protected override bool ProcessCmdKey(ref Message msg, Keys keyData) + { + // Ctrl+1..N switch to that tab by its current position — matches the main window. + if ((keyData & Keys.Modifiers) == Keys.Control) + { + int n = (keyData & Keys.KeyCode) switch + { + >= Keys.D1 and <= Keys.D9 => (keyData & Keys.KeyCode) - Keys.D1 + 1, + >= Keys.NumPad1 and <= Keys.NumPad9 => (keyData & Keys.KeyCode) - Keys.NumPad1 + 1, + _ => 0, + }; + if (n >= 1 && n <= tabs.TabPages.Count) + { + tabs.SelectedIndex = n - 1; + tabs.Focus(); + return true; + } + } + return base.ProcessCmdKey(ref msg, keyData); + } + protected override void OnShown(EventArgs e) { base.OnShown(e);
KeyAction
F1Open this manual in your default web browser. Works anywhere in RemSound — the main window, every dialog, and the profile picker on first launch.
Ctrl+Tab / Ctrl+Shift+TabMove to the next / previous tab
Ctrl+1…Ctrl+9Jump straight to a tab by its position — Ctrl+1 is the first tab, Ctrl+2 the second, and so on. The number follows the current order, so if you reorder the tabs (Preferences → Appearance) the numbers move with them. Works in the main window and in the Preferences dialog.
Tab / Shift+TabMove between controls within the current tab
SpacebarTick or untick an item in any device list, or toggle the focused checkbox
Up / DownMove between items in any list