Jupyter command : "notebook:undo-cell-action" not working as expected

Hi there,

I am a user of Jupyter Lab (an amazing tool btw), I mostly use it on a linux system. My question is regarding a new unexpected behaviour with the shortcut key “Z” which is assigned to the command: “notebook:undo-cell-action”.

Before, I could use “Z” to undo cell operations and “Ctrl Z” to undo text operations within a cell (and only for the selected cell). Nowadays, after an unexpected update of my Jupyter (maybe because another third party module), “Z” and “Ctrl Z” are behaving the same, they undo operations, be it text operations or cell operations in an orderly fashion. Let me give you an example:

If I do: “New Cell-a” “Text Cell-a” “Text Cell-a”
I expect “Ctrl Z” to undo 2 text operations and then nothing (until I select another cell)
I expect “Z” to directly undo the Cell-a (together with the text) and then undo other cells.

The problem is that both “Ctrl Z” and “Z” are undoing the same way which is just undoing text or cell operations indistinctly. Now that’s very uncomfortable for me.

Regarding my notebook Keyboard shortcut settings I have only the “Z” key, which looks like the following:

        "command": "notebook:undo-cell-action",
        "keys": [
        "selector": ".jp-Notebook:focus"

I haven’t found any command assigned to the “Ctrl Z” keys.

How can I go back to the expected behaviour??
Thanks a lot fro your help!

1 Like

I believe there is already a recent discussion of this pointing to a filed issue. I searched ‘undo’ to find it again. Does that cover what you described?

Author of other thread here - I think it sound the same. The mentioned config was also confusing me in the beginning.

For the meantime I downgraded to the 3.0.x and it seems to work fine for me while waiting for fix to 3.1.x branch.

1 Like