1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-10 01:16:39 +02: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( const hotkey = useKeyboardShortcut(
{ {
modifiers: ['ctrl'], modifiers: ['ctrl', 'shift'],
key: 'k', key: 'K',
preventDefault: true, preventDefault: true,
}, },
() => { () => {

View File

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