File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
sphinx/themes/basic/static Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -294,21 +294,26 @@ var Documentation = {
294294 if ( activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
295295 && activeElementType !== 'BUTTON' && ! event . altKey && ! event . ctrlKey && ! event . metaKey
296296 && ! event . shiftKey ) {
297- switch ( event . keyCode ) {
298- case 37 : // left
297+ switch ( event . key ) {
298+ case 'ArrowLeft' :
299299 var prevHref = $ ( 'link[rel="prev"]' ) . prop ( 'href' ) ;
300300 if ( prevHref ) {
301301 window . location . href = prevHref ;
302302 return false ;
303303 }
304- break ;
305- case 39 : // right
304+ case 'ArrowRight' :
306305 var nextHref = $ ( 'link[rel="next"]' ) . prop ( 'href' ) ;
307306 if ( nextHref ) {
308307 window . location . href = nextHref ;
309308 return false ;
310309 }
311- break ;
310+ case '/' :
311+ case 's' :
312+ $ ( 'input[name=q]' ) . focus ( ) ;
313+ return false ;
314+ case 'h' :
315+ Documentation . hideSearchWords ( ) ;
316+ return false ;
312317 }
313318 }
314319 } ) ;
You can’t perform that action at this time.
0 commit comments