Add `/` keyboard shortcut to focus the search field (#29921)

shrike
Claire 2024-04-12 11:42:12 +02:00 committed by GitHub
parent 3f821e0d5e
commit c386c36866
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ class KeyboardShortcuts extends ImmutablePureComponent {
<td><FormattedMessage id='keyboard_shortcuts.back' defaultMessage='to navigate back' /></td> <td><FormattedMessage id='keyboard_shortcuts.back' defaultMessage='to navigate back' /></td>
</tr> </tr>
<tr> <tr>
<td><kbd>s</kbd></td> <td><kbd>s</kbd>, <kbd>/</kbd></td>
<td><FormattedMessage id='keyboard_shortcuts.search' defaultMessage='to focus search' /></td> <td><FormattedMessage id='keyboard_shortcuts.search' defaultMessage='to focus search' /></td>
</tr> </tr>
<tr> <tr>

View File

@ -89,7 +89,7 @@ const mapStateToProps = state => ({
const keyMap = { const keyMap = {
help: '?', help: '?',
new: 'n', new: 'n',
search: 's', search: ['s', '/'],
forceNew: 'option+n', forceNew: 'option+n',
toggleComposeSpoilers: 'option+x', toggleComposeSpoilers: 'option+x',
focusColumn: ['1', '2', '3', '4', '5', '6', '7', '8', '9'], focusColumn: ['1', '2', '3', '4', '5', '6', '7', '8', '9'],