Is it possible to control Jupyter with the keyboard instead of the mouse?

Hello,

I like to start using Jupyter notebook for a course ‘Introduction to Datascience in Python’.

I noticed there are several buttons as shown in the image below:

Is it possible to control these buttons with the keyboard or do I have to use the mouse?

In applications like R Studio or Excel for example it is possible to press Alt followed by a letter to select a button or tree option.

Thank you!

1 Like

Look under ‘Help’ in the part of the menubar you post in your figure and then go to ‘Keyboard shortcuts’ for some guidance. The keyboard symbol in the figure you post or Cmd + Shift + P can open the command palette that allows you to search for shortcut information, too. Hopefully those give you options so you can do all you need without the mouse.

Some useful resources for this:
Jupyter Python Notebook Keyboard Shortcuts
Jupyter Notebook Shortcuts

Your example image showed the classic notebook interface. The current generation of development of Jupyter is focused on JupyterLab. You may wish to explore the possibilities there as well:
JupyterLab interface: keyboard shortcuts

1 Like

Thank you for your reply. I noticed there are shortcuts although you have to memorize these or look up for them. I was hoping that there is a way to navigate over the screen with the arrow keys.

I see that it currently is possible to use the up and down arrow keys after selecting Kernel for example or Widgets in the picture above. Although it is not possible to use the right-arrow to switch from Kernel to Widgets.

If that isn’t meeting your needs, you may want to also explore the current focus of development in Jupyter, which is JupyterLab. I added a link to information about JupyterLab to my original post. The current version of JupyterLab is 3.0 and is rather new. Therefore most places won’t offer you what will be the latest version that has significant changes and upgrades, and so at present to try it, you should go here and click the launch binder badge to spin up a session. (Hit ‘Cancel’ to disregard the building suggestion; that apparently is a minor glitch to still work out.)

1 Like

Thanks a lot, that is great! I see this is exactly what I was looking for. I am very happy with this since the use of the mouse is quite a limit for me. Sorry I missed this part in your original post. I hope Coursera will integrate this version of JupyterLab 3.0 with their course as well. Thanks!

1 Like

You didn’t miss it the first time. I added it after the classic wasn’t meeting your needs. As you can see since JupyterLab 3 is so new, JupyterLab has been under very active development. And so I had not originally mentioned it given that fact and since you referenced classic in your image. However, it is the direction of development and offers significant advantages as you’ve found.
Also I don’t know if your course maybe includes support for JupyterLab 2.0 or not and that may have what you need already. You can try JupyterLab 2 at present by going here and launching a session with launch binder. Depending on how your Coursera installed Jupyter they may have JupyterLab installed already as well? You can see here how even when the classic notebook mode opens by default from a Binder session, you can switch to JupyterLab by editing the URL in your browser’s address bar. You may be able to see if your Coursera site already has support for JupyterLab and which version. I doubt it will because they probably are trying to keep things simple, but worth trying. (For the sake of completeness in regards to the discussion of it sometimes being possible to switch classic to JupyterLab and back again modes, you’ll note that it is easier going from JupyterLab to the classic interface from ‘Help’ right in JupyterLab, at least when launched via MyBinder/Binder.)

Thanks a lot for all your support! Indeed JupyterLab 2.0 does have what I need already. Although Coursera uses the classic Jupyter as in this video:

After I started the course, I did find out that I first need a Python course. So this is what I am currently doing (Python 3 programming specialization). After this I will do the course Introduction to Data Science in Python. It is motivating for me to know now that it is possible to use Jupyter with keyboard control since this was a big advantage for me to stay with R. When I next start the Data science course again, I will let you know the outcome if it is possible to switch to JupyterLab by editing the URL. Or maybe they even have start using it at that moment. Thanks!

1 Like

I have tested it in coursera. Although it is possible to add ?urlpath=lab in the browser, it does not result in the JupyterLab 2.0 interface. I will ask on the coursera forum to see if it is still possible.

One additional question. I see that in JupyterLab 2.0 it is possible to use the arrow key to go from File to Edit to View or example and use the arrow down key to select Expand All Code for example:

Althouh is it also possible to select File or Edit or View with Alt or another key first or do I have to use the mouse first activate one of these menu items?

I thought I remeber this was possible although I do not succeed to find how anymore.

Thanks a lot!

It is possible to download the coursematerial and import the files locally! Currently I have downloaded Anaconda with JupyterLab 1.1.4. This interface is similar to JupyterLab 2.0 if I am correct.

Of course, if you can get the notebooks then you can run wherever you want if the environment is what you need. Then you can upload the completed one back as your assignments dictate. The environment is always a concern for getting the exact expected results but as these are for courses, the packages and expected results are probably fairly generic.
Ideally, you’d want to locally (or even remotely where you control environment) use JupyterLab 2.x or JupyterLab 3.x. JupyterLab 1 while available doesn’t have the fullest set of features and won’t be in line with abilities and features of the newer versions of JupyterLab. In other words, you might learn to do what you need to do only to find you have to learn the newer way down the road.