mirror of
https://github.com/mattermost/focalboard.git
synced 2025-02-07 19:30:18 +02:00
Support Cmd+ alternative to Ctrl+ hotkeys
This commit is contained in:
parent
37adf0a081
commit
e708f3e8f5
@ -58,6 +58,7 @@ class CenterPanel extends React.Component<Props, State> {
|
||||
e.stopPropagation()
|
||||
}
|
||||
|
||||
// TODO: Might need a different hotkey, as Cmd+D is save bookmark on Chrome
|
||||
if (keyName === 'ctrl+d') {
|
||||
// CTRL+D: Duplicate selected cards
|
||||
this.duplicateSelectedCards()
|
||||
|
@ -29,7 +29,7 @@ const ViewHeaderSearch = (props: Props) => {
|
||||
setSearchValue(boardTree.getSearchText())
|
||||
}, [boardTree])
|
||||
|
||||
useHotkeys('ctrl+shift+f', () => {
|
||||
useHotkeys('ctrl+shift+f,cmd+shift+f', () => {
|
||||
setIsSearching(true)
|
||||
searchFieldRef.current?.focus(true)
|
||||
})
|
||||
|
@ -96,7 +96,7 @@ class BoardPage extends React.Component<Props, State> {
|
||||
return
|
||||
}
|
||||
|
||||
if (keyName === 'ctrl+z') { // Cmd+Z
|
||||
if (keyName === 'ctrl+z' || keyName === 'cmd+z') { // Cmd+Z
|
||||
Utils.log('Undo')
|
||||
if (mutator.canUndo) {
|
||||
const description = mutator.undoDescription
|
||||
@ -109,7 +109,7 @@ class BoardPage extends React.Component<Props, State> {
|
||||
} else {
|
||||
sendFlashMessage({content: 'Nothing to Undo', severity: 'low'})
|
||||
}
|
||||
} else if (keyName === 'shift+ctrl+z') { // Shift+Cmd+Z
|
||||
} else if (keyName === 'shift+ctrl+z' || keyName === 'shift+cmd+z') { // Shift+Cmd+Z
|
||||
Utils.log('Redo')
|
||||
if (mutator.canRedo) {
|
||||
const description = mutator.redoDescription
|
||||
@ -161,7 +161,7 @@ class BoardPage extends React.Component<Props, State> {
|
||||
return (
|
||||
<div className='BoardPage'>
|
||||
<HotKeys
|
||||
keyName='shift+ctrl+z,ctrl+z'
|
||||
keyName='shift+ctrl+z,shift+cmd+z,ctrl+z,cmd+z'
|
||||
onKeyDown={this.undoRedoHandler}
|
||||
/>
|
||||
<Workspace
|
||||
|
Loading…
x
Reference in New Issue
Block a user