Skip to content

Instantly share code, notes, and snippets.

@iandanforth
Created December 3, 2017 22:59
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iandanforth/1e2efee1213933311db51d73a5d7b091 to your computer and use it in GitHub Desktop.
Save iandanforth/1e2efee1213933311db51d73a5d7b091 to your computer and use it in GitHub Desktop.
Enable smooth scrolling with arrow keys in Jupyter Notebooks
%%javascript
Jupyter.keyboard_manager.command_shortcuts.remove_shortcut('up');
Jupyter.keyboard_manager.command_shortcuts.remove_shortcut('down');
@iandanforth
Copy link
Author

Paste the above into the first cell in a notebook.

@nyck33
Copy link

nyck33 commented Nov 1, 2019

Thanks!

@H-Sorkatti
Copy link

Very useful. Thanks a lot.

@bhrdj
Copy link

bhrdj commented Oct 2, 2021

I was looking for how to re-enable the up/down shortcuts with a similar line of javascript.

But for now, I can re-enable by going to the jupyter notebook menu:
Help > I input 'up' (including single quotes) into the "Move Cursor Up" option

And then it went back to defaults for both up and down keys. Not sure how that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment