Jupyter Shortcut not working

后端 未结 8 1708
庸人自扰
庸人自扰 2021-02-01 19:05

I am working my code on Jupyter(Python). Normally, the shortcut to insert cell below is \'b\' and for above is \'a\', but when I do that search bar opens instead of insertion of

相关标签:
8条回答
  • 2021-02-01 19:34

    Your issue is probably because of your browser settings. b must be set to something else or you are not on command mode.

    Jupyter shortcuts:

    Command Mode (press Esc to enable)

    Enter : enter edit mode

    Shift-Enter : run cell, select below

    Ctrl-Enter : run cell

    Alt-Enter : run cell, insert below

    Y : to code

    M : to markdown

    R : to raw

    1 : to heading 1

    2 : to heading 2

    3 : to heading 3

    4 : to heading 4

    5 : to heading 5

    6 : to heading 6

    Up : select cell above

    K : select cell above

    Down : select cell below

    J : select cell below

    A : insert cell above

    B : insert cell below

    X : cut selected cell

    C : copy selected cell

    Shift-V : paste cell above

    V : paste cell below

    Z : undo last cell deletion

    D,D : delete selected cell

    Shift-M : merge cell below

    S : Save and Checkpoint

    Ctrl-S : Save and Checkpoint

    L : toggle line numbers

    O : toggle output

    Shift-O : toggle output scrolling

    Esc : close pager

    Q : close pager

    H : show keyboard shortcut help dialog

    I,I : interrupt kernel

    0,0 : restart kernel

    Space : scroll down

    Shift-Space : scroll up

    Shift : ignore


    Edit Mode (press Enter to enable)

    Tab : code completion or indent

    Shift-Tab : tooltip

    Ctrl-] : indent

    Ctrl-[ : dedent

    Ctrl-A : select all

    Ctrl-Z : undo

    Ctrl-Shift-Z : redo

    Ctrl-Y : redo

    Ctrl-Home : go to cell start

    Ctrl-Up : go to cell start

    Ctrl-End : go to cell end

    Ctrl-Down : go to cell end

    Ctrl-Left : go one word left

    Ctrl-Right : go one word right

    Ctrl-Backspace : delete word before

    Ctrl-Delete : delete word after

    Esc : command mode

    Ctrl-M : command mode

    Shift-Enter : run cell, select below

    Ctrl-Enter : run cell

    Alt-Enter : run cell, insert below

    Ctrl-Shift-Subtract : split cell

    Ctrl-Shift-- : split cell

    Ctrl-S : Save and Checkpoint

    Up : move cursor up or previous cell

    Down : move cursor down or next cell

    Shift : ignore

    0 讨论(0)
  • 2021-02-01 19:35

    Not quite on topic of the question text but I got here from the title of the question. If you're on MacOS I noticed that the frequently used run-cells shortcut recently (I'm using notebook v6.1.1) changed from the original (Ctrl+Enter) to +Enter. You can check/change the current keyboard mappings from the Help menu in Jupyter. And the keyboard mappings are shown for a (and b) under the Insert menu.

    0 讨论(0)
  • 2021-02-01 19:36

    I had this issue and it turned out that my Chrome plugin (Vimium) was intercepting keypresses before Jupyter could capture them.

    In my case, I just added a rule to the plugin to disable it on my common notebook urls, like localhost:8888.

    There are potentially other plugins that might exhibit the same behavior, so generally I'd try opening a window without any plugins activated and see if the unexpected behavior persists.

    0 讨论(0)
  • 2021-02-01 19:40

    I meet the same problem, and I google it. I found answer from here. You just update your jupyter through pip install -U jupyter. Maybe it works.(if you install jupyter from anaconda,you can use conda update jupyter command.)

    0 讨论(0)
  • 2021-02-01 19:42

    I figured this out! It has to do with a chrome extension blocking your jupyter shortcuts. You can test this by opening http://localhost:8888/notebooks in another browser.

    In my case, I'd installed a chrome extension called Vimium, which was messing everything up.

    0 讨论(0)
  • 2021-02-01 19:44

    try to open the jupyter-lab from cmd, use this command :

    jupyter notebook
    

    it will start working normal and when you finished using these keys will help you to stop the application :

    control + c
    
    0 讨论(0)
提交回复
热议问题