mirror of
https://github.com/standardnotes/app.git
synced 2026-01-16 23:01:30 +00:00
fix: The shortcut for displaying the keyboard shortcut help dialog has been changed to Ctrl + /
This commit is contained in:
parent
865ebe58d3
commit
5a49005e79
4 changed files with 8 additions and 3 deletions
|
|
@ -194,6 +194,10 @@ export class KeyboardService {
|
|||
|
||||
const helpItem = this.getKeyboardShortcutHelpItemForHandler(observer)
|
||||
if (helpItem) {
|
||||
const existingItem = Array.from(this.keyboardShortcutHelpItems).find((item) => item.command === helpItem.command)
|
||||
if (existingItem) {
|
||||
this.keyboardShortcutHelpItems.delete(existingItem)
|
||||
}
|
||||
this.keyboardShortcutHelpItems.add(helpItem)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export type PlatformedKeyboardShortcut = KeyboardShortcut & {
|
|||
export type KeyboardShortcutCategory = 'General' | 'Notes list' | 'Current note' | 'Super notes' | 'Formatting'
|
||||
|
||||
export type KeyboardShortcutHelpItem = Omit<PlatformedKeyboardShortcut, 'command'> & {
|
||||
command?: KeyboardCommand
|
||||
category: KeyboardShortcutCategory
|
||||
description: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,9 +195,8 @@ export function getKeyboardShortcuts(platform: Platform, _environment: Environme
|
|||
},
|
||||
{
|
||||
command: TOGGLE_KEYBOARD_SHORTCUTS_MODAL,
|
||||
key: '?',
|
||||
preventDefault: true,
|
||||
modifiers: [KeyboardModifier.Shift],
|
||||
key: '/',
|
||||
modifiers: [primaryModifier],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ const KeyboardShortcutsModal = ({ keyboardService }: { keyboardService: Keyboard
|
|||
useEffect(() => {
|
||||
return keyboardService.addCommandHandler({
|
||||
command: TOGGLE_KEYBOARD_SHORTCUTS_MODAL,
|
||||
category: 'General',
|
||||
description: 'Toggle keyboard shortcuts help',
|
||||
onKeyDown: () => {
|
||||
setItems(createGroupedItems(keyboardService.getRegisteredKeyboardShorcutHelpItems()))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue