In Jupyter Notebook, how can I disable Drag to Edit Text? - jupyter-notebook

When editing in Jupyter Notebook, often when I attempt to select an area of text, I accidentally select a few characters. When I drag, the characters are moved.
How can I disable drag to edit? I searched online and in keyboard shortcuts. No luck.

Related

How do users who navigate using a keyboard change the style of the text they are editing in ckeditor5

Disabled users who cannot control a mouse use the keyboard to navigate the page. How do you allow them to select the various styles (like bold etc) in ckeditor5? These elements are NOT in the tabindex of the page by default.
Tabbing through a form, I expect to be able to interact with every interactable element on a page
I see that CKEditor 5 has a list of keyboard shortcuts in their documentation. Pressing Alt + F10 (may require Fn) when the editor input area has focus moves keyboard focus to the editor toolbar. Then, keyboard arrow keys can be used to navigate the toolbar.
I am not saying that CKEditor is accessible, but it is information you may consider.
WCAG 2.1.1 says that all functionality must be available from the keyboard. Sometimes people mistakenly interpret that to mean that all interactive elements on the page must be keybaord accessible.
Here's a screenshot of ckeditor5 from their website. I'm not a ckeditor5 user but I'm assuming you're talking about the editing bar at the top.
While it's strongly encouraged to allow a keyboard user to navigate to the editing bar of ckeditor5, it's not strictly required if all the functionality of the editing bar is available via the keyboard.
For example, if I can select text then press Ctrl+B to make it bold, then the functionality of bold is available even if I can't tab to the 'B' on the editor bar.
The editing bar has a lot of stuff on it so everything would need a keyboard shortcut in order to pass WCAG 2.1.1. It looks like you can configure ckedit5 pretty extensively, https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/configuration.html
The docs on CKEditor keyboard support will list the possible keyboard controls to format text.
Text can be selected with Shift + the arrow keys
and formatted bold with Ctrl + b
for more options the menubar can be focused with Shift + F10
For web applications, the idea is to follow the desktop application’s keyboard conventions, so that users of assistive technology don’t need to learn yet another interaction paradigm.
The example to look at for rich text editors on Windows would probably be Word or Wordpad. There are two ways to format text.
Shortcut to open the menubar
The Menu bar pattern on the ARIA Authoring Practices Guide (APG) specifically mentions rich text editors in a note:
For example, a rich text editor may have a menubar that receives focus when a shortcut key, e.g., alt + F10, is pressed while editing. In this case, pressing Escape or activating a command from the menu may return focus to the editor.
For any common pattern you should find recommendations for the keyboard interface on the APG. Since it’s platform-independent (not only for Windows), such shortcuts will only be found in notes.
Shortcuts for formatting directly
Selected text can often be formatted directly by pressing + a letter for the English abbreviation of the format, like i for Italic or b for Bold.
CKEditor supports these.

Is there a way to preserve the highlight when wrapping a selection with quotes/brackets in RStudio?

In many IDEs, there's a feature where you can highlight a section of code and then press a key like ", ', (, or [ (to name a few) to surround the highlighted section with the corresponding open/close characters of the given key. In Jupyter Notebooks, the highlighted portion stays highlighted after surrounding the code with the desired characters. However, in RStudio the text cursor falls to the end of the highlighted section after pressing the key to surround the code with.
I find the behavior of this feature in Jupyter much more desirable since I can press either the left or right arrow keys to immediately place the text cursor on either side of the selected code (without touching the mouse no less). But in RStudio I find myself constantly surrounding code in parentheses or quotes then spamming the left arrow key to get the text cursor to the beginning of the code I just highlighted.
Is there a way to change this setting in RStudio to match the behavior in Jupyter Notebooks? This is the only other question I've found relating to this behavior in RStudio, but unlike OP I want to alter the behavior of this setting, not turn it off completely.
I have looked in Tools > Global Options... under the Code tab (per the link above), but don't see any obvious solution there.
EDIT: I found from this question that I can use Option+J and Option+L (Mac) or Alt+J and Alt+L (Windows) to navigate the cursor to the other end of a word quickly, but I'm still curious if anyone knows of a way to match the settings in RStudio with the behavior of Jupyter Notebooks.

how to print something in a new window in jupyter notebook?

I have seen that in some IDEs, when you print something , a new window opens up.
my question is that is it possible to have the same thing for jupyter notebook ?
P.s:
It would be better if it was customizable; like being able to change the background color of the new window.
You'd want the newer generation of Jupyter interface, JupyterLab. (At least if you want this soon. I don't know what will be possible as Jupyter notebook 7 starts using more of the underlying machinery that JupyterLab uses.)
Default JupyterLab
Using default current JupyterLab, you can make a separate window for any output that you can drag around and arrange how you want. Right-click on an output cell and select from the menu 'Create New View for Output'. That will open a new window that respects the current JupyterLab theme. (There's a lot of theme adapting abilities so maybe that can provide what you need as far as background.) Once the new window is generated you can click and drag it around the JupyterLab window to arrange it relative to the notebook and then release when you have it outlined the way you want. You can try it right in your browser by clicking this link and letting the session spin up.
(This ability was covered in an answer to a similar question 'How to display Jupyterlab output in new tab?'.)
Similarly, you can have a window that keeps updating with the most recent output by using an attached console and toggling on 'Show All Kernel Activity'. When you have a notebook open, either right-click and select 'New Console for Notebook' or go under the main 'File' menu and select 'New Console for Notebook'. This will open a console and you can then right-click on the console pane and toggle on 'Show All Kernel Activity'. As you run things in the notebook, the output will show at the bottom of this window as well. Even rich output like plots and dataframe displays. You can click on the tab and drag to arrange this window as you wish in the main JupyterLAb pane. See some example images using this here and here.
Related:
It's not a separate window; however, a nice feature of JupyterLab is switching to 'View' to 'Render Side-by-Side' where the output goes to the side of the code cell and not below. Alternatively, you can modify the output cell in some ways like you could do in the classic notebook interface, see here.
Sidecar extension of JupyterLab
There's an extension called sidecar for Jupyterlab that I believe has more options. I wonder if you could combine widgets to control the background as you seek. Don't know about the layering possibilities there.
ipylab extension of JupyterLab
ipylab has even more abilities than sidecar for customization, with 'SplitPanel' and 'DockPanel'. Scroll through the examples shown to get an idea of the possibilities. There's also a 'launch binder' badge so you can try it out.
(You may also want to see Related projects listed at the bottom of ipylab's github page.)

Is there a keyboard shortcut in Jupyter Notebook to begin typing in newly created cell?

I assumed that there would be a keyboard shortcut to begin typing within a newly created Jupyter Notebook cell, but I titled my question asking if it even exists to not build any assumptions. If it does exist, please also include in your answer the shortcut to use.
I will try to provide as much relevant information as possible that will help in answering my question:
I installed Jupyter Notebook on my Windows 10 PC from their website (not using Anaconda). I view and edit Jupyter Notebook files in my Google Chrome browser. After running a cell with Ctrl+Enter, I press b to create a new cell below. I would like to immediately begin typing within that cell without having to click inside that cell with a mouse.
Thank you
There is a builtin-shortcut that does exactly what you want. Just enter a cell an press Alt + Enter. This will execute the current selected cell, insert a new cell below it and enter edit mode.
Notice, that this also works if you are not in edit mode.
My setup is a little bit different than yours. Here is a reference.

How to make Aptana's keyboard shortcuts to be layout independent?

Aptana Studio 3.6.1.
When I edit source code in Aptana I want to save it on disk. While I am in English keyboard layout I can press Ctrl+S. But when I use Russian keyboard layout this shortcut does not work.
you can get shortcut key combinations via Help > Key Assist

Resources