mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +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:
		
							parent
							
								
									e2b90ae91d
								
							
						
					
					
						commit
						647ba7b9cb
					
				@ -134,8 +134,8 @@ export const Search = ({
 | 
			
		||||
 | 
			
		||||
    const hotkey = useKeyboardShortcut(
 | 
			
		||||
        {
 | 
			
		||||
            modifiers: ['ctrl'],
 | 
			
		||||
            key: 'k',
 | 
			
		||||
            modifiers: ['ctrl', 'shift'],
 | 
			
		||||
            key: 'K',
 | 
			
		||||
            preventDefault: true,
 | 
			
		||||
        },
 | 
			
		||||
        () => {
 | 
			
		||||
 | 
			
		||||
@ -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=""
 | 
			
		||||
                    />
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user