[202_105]: Replace Meta with platform-appropriate key name in shortcut …#2856
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the keyboard shortcut rendering so the M- modifier is shown with platform-appropriate key names in shortcut/help pop-ups (addressing issue #2822).
Changes:
- Adjusts Qt keyboard modifier rendering for
M-to display “Win” on Windows and “Super” elsewhere. - Removes an unused
meta::keyboarddictionary entry from the zh_CN translation file. - Adds a developer note documenting the change and manual test steps.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Texmacs/Server/tm_config.cpp | Changes Qt shortcut rendering for M- to “Win”/“Super” based on OS detection. |
| devel/202_105.md | Documents the rationale, implementation, and manual test procedure for the shortcut label change. |
| TeXmacs/plugins/lang/dic/en_US/zh_CN.scm | Removes an unused translation entry related to meta::keyboard. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,30 @@ | |||
| # [202_105] "Meta" will appear in the keyboard shortcut notification pop-up | |||
There was a problem hiding this comment.
Grammar nit: the title reads ""Meta" will appear..." but this file documents a fix; consider changing to ""Meta" appears..." (or similar) to avoid implying this is expected behavior.
| # [202_105] "Meta" will appear in the keyboard shortcut notification pop-up | |
| # [202_105] "Meta" appears in the keyboard shortcut notification pop-up |
|
Please move the "How to Test" section in the document to the very top under its heading. |
|
What's the behavior on macOS? |
|
On macOS, the original code falls through to the else branch, so it would display "Super" — which is incorrect since Mac keyboards label that key "Command" (⌘). I've added an os_macos() check so the mapping is now: Linux: "Super" |
Fixes #2822
What
Replace "Meta" with platform-appropriate key name in keyboard shortcut notification pop-ups:
Why
The notification "Use Meta+Tab in order to insert a tab" shows "Meta" which does not correspond to any key on modern keyboards. On Linux the key is labeled "Super", on Windows it is "Win".
How
In
system_kbd_initializeinsrc/Texmacs/Server/tm_config.cpp, changed the Qt branch mapping forM-fromlocalize("Meta::keyboard", true)to:localize("Win::keyboard", true)on Windowslocalize("Super::keyboard", true)on LinuxAlso removed the dead
("meta::keyboard" "")dictionary entry fromzh_CN.scm.How to test