I'm using Jupyter notebooks in the Chrome browser. I've installed nbextensions and am using the emacs keybindings. Most keys work as expected, even those that conflict with Chrome shortcuts, like ctrl-P. But ctrl-N still opens a new window. I've tried Shortkeys, with which I can set ctrl-N to "do nothing", but it is not passed through to the notebook. I tried AutoControl Shortcut Manager and have the same problem.
Old answers to this question say that you can't override ctrl-N at all, which is no longer true in the newer versions of Chrome, but how do you stop the default behavior and allow the key to pass through to the page?
For example to open the jupyter notebook in Google Chrome: Open Chrome, go to Settings, select the Default Browser tab, and make Chrome as your default browser. After this, the jupyter notebook will always open in Chrome.
Windows will open a system folder ( C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Anaconda2 (64-bit) ) in the Explorer app, and highlight the Jupyter shortcut. … then paste to your desktop (you can also click and drag “Jupyter Notebook” onto your desktop, or use Ctrl-C and Ctrl-V ).
Just add <br> where you would like to make the new line. Because jupyter notebook markdown cell is a superset of HTML.
You can do this with AutoControl Shortcut Manager by using the SYNTHESIZE INPUT action to send a synthetic Ctrl+N from the inside of the webpage.
That way, the webpage will respond to the shortcut but not the browser.
This is how you do it:
Set Ctrl+N as the trigger
Choose SYNTHESIZE INPUT as the action and enter the keystroke Ctrl+N
Select option Send from the inside of webpage
Now, whenever you press Ctrl+N, Chrome will do nothing, but the webpage will receive the keystroke and will react to it.
Of course, you'd only want to do this on those Jupyter Notebook pages, so make sure you add a URL condition to that trigger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With