Ribbon key tips: Alt shows codes on tabs, buttons and menu items

A lone Alt shows a code on every ribbon tab and quick-access button.
Typing a tab code opens the tab and shows the codes of its buttons,
dropdowns, slide-outs and collapsed panels; a button code runs it, a
dropdown or slide-out code opens it and shows its item codes, Esc goes
back one level. Codes follow the reference ribbon; buttons without a
reference counterpart get none and unnamed menu items are numbered.

Codes are drawn as accent pills over the widgets that reported their
bounds in the current frame, with a hint bar under the ribbon. While
the tips are open keys go to them only. The automation gets a keytips
action and read operation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-14 11:18:58 +03:00
1 parent 592289f4fd
commit 86429bf439
34 files changed
+1569 -53

No files matched your search

+6
View File
@@ -102,6 +102,7 @@ mod dialog;
mod dynamic;
mod file;
mod graphic_attributes;
mod keytips;
pub(in crate::app) use file::background_task;
#[cfg(not(target_arch = "wasm32"))]
pub(in crate::app) use file::native_paths_match;
@@ -621,6 +622,10 @@ impl OpenCADStudio {
if Some(id) == self.main_window {
self.spacemouse_focused = focused;
}
// Key tips close when the window loses the focus.
if !focused && self.ribbon.keytips_active() {
return self.hide_keytips();
}
Task::none()
}
Message::SpaceMouseEnabled(enabled) => {
@@ -2277,6 +2282,7 @@ impl OpenCADStudio {
Message::PcManager(message) => self.update_pc_manager(message),
Message::Count(message) => self.on_count(message),
Message::SheetSet(message) => self.on_sheet_set(message),
Message::KeyTip(input) => self.on_keytip(input),
Message::RibbonSelectTab(idx) => {
self.ribbon.select(idx);
Task::none()