47

What is the Jupyter shortcut key to toggle between insert and overwrite mode whilst editing?

I must keep hitting it by accident and then cannot turn off overwrite mode. I have looked at the list of shortcuts in Jupyter and online, but I could not find a match. I am working on Firefox on a Linux virtual machine running on a Mac.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
eknumbat
  • 928
  • 1
  • 8
  • 12
  • 4
    Isn't it simply the Insert key? – agold Jun 03 '16 at 07:00
  • Unfortunately no such beast on my Mac keyboards. I've tried some Mac key combinations to simulate an insert key - like fn+return, fn+alt+return, and cmd+shift+U - but no luck so far. – eknumbat Jun 03 '16 at 07:35
  • 2
    Jupyter does not have any shortcut that does that. It might be something in CodeMirror - the editor component - but it's most likely to be an OS shortcut (for... one of those OSes). If you've got a spare normal keyboard handy, you could try plugging it in and pressing the insert key. – Thomas K Jun 03 '16 at 15:24
  • 2
    Thanks all. Looks like for now I'll have to stick to swapping in a Windows keyboard or closing and restarting the Jupiter notebook when it happens. – eknumbat Jun 05 '16 at 08:58
  • 1
    I have exactly the same issue! I'm working on a Linux machine with a Mac keyboard too. – cjm2671 Apr 26 '17 at 17:54

10 Answers10

32

Finally tracked down the problem: it was a Linux one to do with enabling Numlock. As Numlock was not turned on, the 0-key on the number keypad was acting as a toggle for insert mode.

To turn on Numlock, I had to install numlockx and then change login window preferences to enable it, e.g. see https://unlockforus.com/numlock-linux-mint/.

eknumbat
  • 928
  • 1
  • 8
  • 12
  • Same issue here; What's very confusing to me is that my keyboard also has an "ins" key, but this cannot be used to toggle insert mode if the number pad "ins" has been triggered. Also, the issue (so far) only affects Jupyter notebooks. – MRule May 14 '21 at 18:31
  • Very confusing for me too (Jupyter lab in Firefox on Linux). No idea what I do, but I frequently find myself in this annoying replace mode (who actually uses that anyways?). I think I can go back to normal insert mode by un-num-locking, then using the 0/insert key. – bli Jun 20 '22 at 13:08
22

For me fn + insert solved the problem.

Sanjolly goyal
  • 231
  • 2
  • 3
  • 1
    Your solution worked on my setup. This was _very_ fun for me: I'm working on a Mac and port forwarding a linux instance of Jupyter Lab, accessed via the mac's browser. Thank you for the life saver. – Jason R Stevens CFA Feb 15 '21 at 23:40
  • Worked for me. I was typing on notebooks in kaggle – Noob Aug 08 '21 at 08:14
15

FWIW, on a Macbook running Linux, fn + return toggles insert mode.

On a Chromebook, Search + . or Search + Shift + Backspace toggles insert mode.

Wes Turner
  • 1,211
  • 13
  • 15
  • 2
    You're a lifesaver! I _knew_ what was happening (overwrite mode was on), but I was going crazy trying to figure out what key I'd accidentally typed to turn it on, since I'm on a Mac laptop with no actual Insert key. – TheDudeAbides Feb 03 '23 at 19:46
10

The Insert key on Linux should toggle it.

waydegg
  • 113
  • 2
  • 6
8

For Windows: Press fn + insert keys

2

Toggle off the num-lock on your keyboard and press the ZERO key on your Numpad. You will notice that it toggles the overwriting mode on and off.

DharmanBot
  • 1,066
  • 2
  • 6
  • 10
Sebi John
  • 21
  • 2
0

For those, still facing the problem with jupyter notebook....The solution that worked for was to press Ins key above the delete key

I found out that pressing this Ins key Insert/overwrite the character.

0

Enter + Insert together in a Jupyter notebook

Sara
  • 1
0

Simply pressing the 'insert' key worked for me, if you hit help in the toolbar up top, you can see and edit your keyboard shortcuts to see if your shortcut is any different (or change it!)

BadgerTaco
  • 21
  • 3
0

I don't have an insert key on my laptop so I just turned on the virtual keyboard from settings in windows and then pressed the insert key there. Solved it

Amlan Jena
  • 36
  • 1