Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ const App = () => {
return;
}

if (e.key === '/') {
toggleDeDxMarkers();
e.preventDefault();
return;
}

const layerId = layerShortcuts[e.key.toLowerCase()];
if (layerId && window.hamclockLayerControls) {
const isEnabled = window.hamclockLayerControls.layers?.find((l) => l.id === layerId)?.enabled ?? false;
Expand Down
77 changes: 76 additions & 1 deletion src/components/KeybindingsPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,43 @@ export const KeybindingsPanel = ({ isOpen, onClose, keybindings, nodeId }) => {
{t('keybindings.panel.toggle', 'Toggle this help panel')}
</span>
</div>
<div
style={{
padding: '6px 8px',
background: 'var(--bg-panel)',
border: '1px solid var(--accent-cyan)',
borderRadius: '4px',
display: 'flex',
alignItems: 'center',
gap: '8px',
}}
>
<kbd
style={{
minWidth: '24px',
padding: '3px 6px',
background: 'var(--bg-secondary)',
border: '1px solid var(--accent-cyan)',
borderRadius: '3px',
fontSize: '0.85em',
fontWeight: '700',
fontFamily: 'JetBrains Mono, monospace',
color: 'var(--accent-cyan)',
textAlign: 'center',
}}
>
{'/'}
</kbd>
<span
style={{
fontSize: '0.85em',
color: 'var(--text-primary)',
lineHeight: '1.3',
}}
>
{t('keybindings.panel.toggleDeDx', 'Toggle DE and DX Markers')}
</span>
</div>
</div>
</div>
);
Expand Down Expand Up @@ -282,7 +319,6 @@ export const KeybindingsPanel = ({ isOpen, onClose, keybindings, nodeId }) => {
display: 'flex',
alignItems: 'center',
gap: '12px',
gridColumn: 'span 2',
}}
>
<kbd
Expand All @@ -302,6 +338,7 @@ export const KeybindingsPanel = ({ isOpen, onClose, keybindings, nodeId }) => {
>
?
</kbd>

<span
style={{
fontSize: '12px',
Expand All @@ -312,6 +349,44 @@ export const KeybindingsPanel = ({ isOpen, onClose, keybindings, nodeId }) => {
{t('keybindings.panel.toggle', 'Toggle this help panel')}
</span>
</div>
<div
style={{
padding: '8px 12px',
background: 'var(--bg-panel)',
border: '1px solid var(--accent-cyan)',
borderRadius: '6px',
display: 'flex',
alignItems: 'center',
gap: '12px',
}}
>
<kbd
style={{
minWidth: '32px',
padding: '4px 8px',
background: 'var(--bg-secondary)',
border: '2px solid var(--accent-cyan)',
borderRadius: '4px',
fontSize: '12px',
fontWeight: '700',
fontFamily: 'JetBrains Mono, monospace',
color: 'var(--accent-cyan)',
textAlign: 'center',
boxShadow: '0 2px 0 var(--accent-cyan)',
}}
>
/
</kbd>
<span
style={{
fontSize: '0.85em',
color: 'var(--text-primary)',
lineHeight: '1.3',
}}
>
{t('keybindings.panel.toggleDeDx', 'Toggle DE and DX Markers')}
</span>
</div>
</div>

{/* Footer note */}
Expand Down
1 change: 1 addition & 0 deletions src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -422,5 +422,6 @@
"keybindings.panel.title": "KEYBOARD SHORTCUTS",
"keybindings.panel.description": "Press the following keys to toggle map layers:",
"keybindings.panel.toggle": "Toggle this help panel",
"keybindings.panel.toggleDeDx": "Toggle DE and DX Markers",
"keybindings.panel.note": "Press ESC or click outside to close this panel"
}