Does anyone know if there is a keyboard shortcut to toggle next / previous tabs in JupyterLab (if there is, how to do it)? or if we can customize keyboard shortcuts?
EDIT
This youtube shows how you can customize your keyboard shortcuts in JupyterLab. I tried it and it works for me.
"[" and "]" on an international keyboard are the two keys right of "p". On the German keyboard "ä" and "+". "ctrl shift ä" switches to the left/previous tab as expected.
Switch to the Next Tab To jump to the next tab (on the right) press Ctrl + Tab or Ctrl + PgDn on your keyboard. This shortcut works perfectly on Windows devices and other operating systems (e.g Chrome OS on Chromebooks and Linux) with a familiar keyboard layout.
Shift + Enter run the current cell, select below. Ctrl + Enter run selected cells. Alt + Enter run the current cell, insert below. Ctrl + S save and checkpoint.
If you click the "Tabs" menu in Jupyter Lab, the keyboard shortcut should be listed there.
example: On my macbook it is CTRL+SHIFT+[ or CTRL+SHIFT+]
Answer for German - (and other non-international) keyboards:
Since the previous answer does not work on a German keyboard I describe the problem for this keyboard and then I describe a solution for this keyboard which shall work similarly on other keyboards as well.
1. Problem with current settings
"[" and "]" on an international keyboard are the two keys right of "p". On the German keyboard "ä" and "+". "ctrl shift ä" switches to the left/previous tab as expected. But "ctrl shift +" as well as "ctrl shift ]" does not switch to the next/right.
I tried almost every shortcut. But had to change the shortcuts themselves.
2. The problem of choosing a new shortcut
Since "ctrl shift ä" worked as expected I tried to change the other shortcut to "ctrl shift +". And since the other two assignments of the key "+" on a German Keyboard are "*" and "~" I tried "ctrl shift *" and "ctrl shift ~" as well.
After saving, all failed to work, when I tested them.
3. Solution
Here is a description of how to change the shortcuts in Jupyter Lab.
I chose the shortcuts "Ctrl Shift 8" and "Ctrl Shift 9" since “8” and “9” are on the same keys as “[“ and “]”. Then you have to enter the following code as described in the link above.
{ "shortcuts": [ { "command": "application:activate-previous-tab", "keys": [ "Ctrl Shift 8" ], "selector": "body" }, {"command": "application:activate-next-tab", "keys": [ "Ctrl Shift 9" ], "selector": "body" } ] }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With