skip to Main Content

I am having a weird problem. When I edit a Jupyter Notebook for a while, the arrow keys would suddenly stop working for a particular cell. However, the CTRL-arrow keys and all other keys would continue to work. Further, other cells are not affected.

One cumbersome workaround is creating a new cell and copying and pasting the contents from the affected cell. As you see, this is highly inconvenient.

I feel like VSCode gets into some odd state, but I don’t know how to escape it. I would appreciate it if anyone knew how to recover from this.

3

Answers


  1. I found an answer here: https://github.com/microsoft/vscode-jupyter/issues/13263#issuecomment-1495291228. I found an extension (Kite) showing an error (in the OUTPUT window). I disabled Kite and all is good for me so far and the problem has not returned. Of course if you really need an extension that is giving this type of error you would obviously need to correct the problem instead of just disabling the extension.

    Login or Signup to reply.
  2. Collapse and un-collapse the cell.

    No idea why i have this issue since i dont have kite but the above worked for me.

    Login or Signup to reply.
  3. This was a pain in the a$$, but here is how I got it to work again without restarting my notebook.

    1. Go to a cell output where there is more stuff than fits the screen (big dataframe for example) so that you can scroll.

    2. Press the middle mouse button so that the mouse enter the hover scroll mode.

    3. Scroll up or down until you reach a cell.

    4. Now focus and click on the cell whose output you are scrolling (or just makes sure to exit the scroll mode, I think).

    Arrows should start working again. Repeat if it still does not work – sometimes it does not work on the first try.

    It looks like the hover locks the editor in editorHoverFocused mode so the arrows stop invoking as cursorRight/cursorLeft but rather editor.action.scrollLeftHover/editor.action.scrollRightHover.

    PS1: still some cells work well, others don’t. Just CUT the content of the broken cells, copy it in a new cell and you are ready to go.

    TL;DR

    Just cut and paste the broken cells’ contents into new cells. Seems to work every time.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search