mirror of
				https://github.com/qemu/qemu.git
				synced 2025-10-27 05:04:40 +00:00 
			
		
		
		
	 9423751645
			
		
	
	
		9423751645
		
	
	
	
	
		
			
			This is pretty ubiquitous. ('/' is already taken by some browsers for
quick search)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
		
	
			
		
			
				
	
	
		
			10 lines
		
	
	
		
			298 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			298 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| document.addEventListener('keydown', (event) => {
 | |
|     // find a better way to look it up?
 | |
|     let search_input = document.getElementsByName('q')[0];
 | |
| 
 | |
|     if (event.code === 'KeyS' && document.activeElement !== search_input) {
 | |
|         event.preventDefault();
 | |
|         search_input.focus();
 | |
|     }
 | |
| });
 |