1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

feat: separate command bar and search hotkeys (#7651)

Currently, the command bar and search hotkeys are conflicting. I am now
separating them and assigning search an extra modifier key: Shift.
This commit is contained in:
Jaanus Sellin 2024-07-24 12:46:03 +03:00 committed by GitHub
parent e2b90ae91d
commit 647ba7b9cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -134,8 +134,8 @@ export const Search = ({
const hotkey = useKeyboardShortcut(
{
modifiers: ['ctrl'],
key: 'k',
modifiers: ['ctrl', 'shift'],
key: 'K',
preventDefault: true,
},
() => {

View File

@ -53,14 +53,14 @@ exports[`renders an empty list correctly 1`] = `
onClick={[Function]}
>
<input
aria-label="Search (Ctrl+K)"
aria-label="Search (Ctrl+Shift+K)"
className="MuiInputBase-input css-mfsqjb-MuiInputBase-input"
data-testid="SEARCH_INPUT"
onAnimationStart={[Function]}
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
placeholder="Search (Ctrl+K)"
placeholder="Search (Ctrl+Shift+K)"
type="text"
value=""
/>