1

When I write text or code, I frequently delete things by highlighting the to-be-deleted text and pressing backspace. Since recently, this does not work anymore in jupyter notebooks on my computer (Kubuntu 19.10). Only jupyter notebooks are affected. I can use the highlight-backspace combination in any other software, including other chrome browser tabs. Highlighting and replacing with other text works in jupyter, as does deleting with the delete key.

How can I restore the highlight-backspace = delete behavior?

Edit: Simple backspace is not assigned to a keyboard shortcut, as seen in the screenshot below. Backspace also works for deleting the character before the cursor if nothing is highlighted. It just does not delete highlighted text.

enter image description here

Edit2: I have narrowed down the problem a bit more. Deleting with backspace works if I mark the to-be-deleted text from right to left (with the mouse of by shift-left arrow). If I highlight the text from left to right, or by double-clicking on a word, then backspace does not delete the text. The behavior is the same in chrome and firefox, and only in jupyter.

Felix
  • 659
  • 2
  • 10
  • 24
  • you try Keyboard Shortcut Customization? (https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Custom%20Keyboard%20Shortcuts.html) – Diego B Jan 03 '20 at 00:09

4 Answers4

2

This may be a long shot but I was experiencing a similar issue with Jupyter Notebooks on Ubuntu 18 running in Chrome. The issue seems to have been some strange interaction with the Google Input Tools which comes with Chrome. Disabling the extension seems to have fixed it for me.

STN
  • 21
  • 2
  • This is interesting. I don't have these Chrome Input Tools installed and I also experience the same issues in Firefox. Your comment is certainly a valuable piece in the puzzle but I still fail to see how to solve the issue on my end. – Felix Apr 14 '20 at 08:55
  • Thankyou very much for this answer – noone Jan 23 '22 at 04:55
2

Turning off Google Input Tools worked for me. No need to disable the extension. It has the option "Turn off".

pawan
  • 113
  • 7
1

First of all, make sure other backspace combination works fine e.g. ctrl+backspace. then check at another browser like firefox to make sure there isn't any problem with the chrome or Jupyter hotkeys.

After checking these things make sure insert mode is not activated too, here is a question about it.

If none of the above ways work try restarting the Jupyter hotkeys. If still, you have the problem, re-install Jupyter.

sadly if it remain unsolved your OS occured the problem not the Jupyter.

Mahdi Mahmoodian
  • 473
  • 2
  • 13
  • I followed you link and enabled and then disabled the fn-lock (= num-lock). Unfortunately I didn't test the behavior right before but the problem is now solved. Surprisingly, even with enabled num-lock I can't reproduce the original problem. Anyways, I'm happy to give you the bounty since my problem is now solved. – Felix Jan 07 '20 at 19:25
  • 2
    Update: The problem is not solved, I just tested it the wrong way. Deleting with backspace works when highlighting the words from right to left, but not from left to right. This is very specific to jupyter. – Felix Jan 11 '20 at 16:56
  • This is really odd bug! did you try reinstallation of Jupyter? I think if its a jupyter problem it might fixed with fresh installation. – Mahdi Mahmoodian Jan 15 '20 at 17:38
  • Re-installing the distribution version does not help (ubuntu). And all the config files in `/etc/jupyter/` and `~/.jupyter` are empty. – Felix Jan 17 '20 at 04:37
0

Disable the Google Input Tools extension and the magic will happen..