Closed
Labels
🪲 pri/majorBugs will affect your normal use of Mark Text, causing you unwilling or unable to continue using MT🐹 platform/windowsPull request or issue on Windows🐛 bugSomething isn't working🔭 area/editor
Description
Description
Custom Key Binding fails due to lowercase "ctrl" and "alt".
Workaround:
- edit on Windows: %APPDATA%\MarkText\keybindings.json
- Change "ctrl" to "Ctrl" and "alt" to "Alt" -> save
- Keybinding now works as expected.
Steps to reproduce
- Ctrl , (PREFERENCES)
- KEY BINDINGS
- Scroll to Paragraph: Transform into Heading 1 and press the Edit button.
- Press Ctrl+Alt+1
- What appears in the text field is "ctrl+alt+1" (all lowercase)
- Click SAVE
- Go back to document.
- Press Ctrl+Alt+1 on some text, but nothing happens.
Expected behavior:
Text becomes Header 1.
Actual behavior:
Nothing.
Versions
- MarkText version: 0.17.1
- Operating system: Windows 11
Metadata
Metadata
Assignees
Labels
🪲 pri/majorBugs will affect your normal use of Mark Text, causing you unwilling or unable to continue using MT🐹 platform/windowsPull request or issue on Windows🐛 bugSomething isn't working🔭 area/editor
Activity
fix: capitalize accelerator modifiers to fix custom keybindings (mark…
Jocs commentedon Jun 23, 2026
Thank you for the detailed report.
After reviewing the current codebase there are two things to clarify:
Lowercase display is by design. The
@hfelix/electron-localshortcutlibrary that MarkText uses intentionally produces lowercase modifier names (ctrl,alt,shift) fromgetAcceleratorFromKeyboardEvent. Both the validator and the shortcut-matching logic use case-insensitive comparisons internally, soctrl+alt+1andCtrl+Alt+1register and fire identically. Manually capitalising the saved JSON has no practical effect.The real issue on Windows is AltGr. On Windows
Ctrl+Altis an alias for the AltGr key, which means the OS resolves the key combination to a special character before MarkText's shortcut handler can intercept it. This is acknowledged directly in the current codebase:packages/desktop/src/main/keyboard/keybindingsWindows.tsdeliberately leaves the heading shortcuts (paragraph.heading-1throughparagraph.heading-6) unbound with the comment "We cannot set a default value for heading size because Ctrl+Alt is an alias to AltGr on Windows."Because the displayed casing is intentional library behaviour and the underlying Windows AltGr limitation is already documented and accounted for in the code, this issue is resolved in the current release. If you wish to bind a heading shortcut on Windows, please use a combination that does not involve
Ctrl+Alt(for exampleCtrl+Shift+1).