Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

For interacting with the Mathematica front-end using the keyboard: shortcut keys, KeyEvents, keyboard navigation, etc.

0
votes
0answers
30 views

Keyboard shortcuts to invoke and navigate help attached cell?

How to create a keyboard shortcut to invoke and navigate the small help attached cell with that contains the syntax templates and the link to the documentation? Currently this help cell only shows up ...
1
vote
1answer
32 views

Custom Hotkey Toggle Initialization

In this old stack overflow answer (referring to this even older page) it is shown how to make custom hotkeys by modifying the file KeyEventTranslations.tr. Some ...
2
votes
1answer
32 views

Shortcut key to extend selection in the same way as mouse multiclicks

I would like to make a key-binding to select everything below one level above my the current postion of the cursor. This should be the same what happens if I multi-click on an expression -- each click ...
3
votes
2answers
73 views

Keyboard Shortcut to “Align Center” a Text Cell

I'm attempting to create a keyboard shortcut to center the contents of a text cell exactly as clicking "Align Center" accomplishes in the Format Menu. As far as I can tell, there is no frontendtoken ...
0
votes
0answers
24 views

Solution for multiple cursors to perform multiple simultaneous edits

Is there any good solution available for performing multiple edits simultaneously in a Mathematica notebook? As a workaround, I occasionally paste Mathematica code into a Visual Studio Code editor, ...
1
vote
0answers
24 views

Keyboard control of 1d and 2d sliders in Manipulate

I would like to be able to control the sliders in Manipulate via keyboard control (not just by dragging with the mouse). How can I do this? I've seen this post, but unfortunately the keyboard part ...
1
vote
0answers
51 views

“NewRow” shortcut on OS X Mathematica 11 not working

The shortcut to add a row to a matrix ("ctrl"+"Return") on my OS X version 11.1.1.0, isn't working. Instead of inserting a new row it just inserts a new line into the cell. Has anyone else experienced ...
2
votes
0answers
22 views

remapping MacBook Power button to work as Esc?

MacBook power button symmetrically mirrors Esc key on MacBook Pro keyboards, so it seems natural to remap make it work as Esc to ease on left-hand some strain, any idea if that's possible?
0
votes
0answers
53 views

Close/Open current section

I want to create a keyboard shortcut to open or close the section my cursor is currently in, or in case I am selecting a cell or multiple cells (let's assume not headers (alt 1-6) them self for ...
3
votes
1answer
48 views

Remap escape key for entering special characters?

My keyboard does not have an escape key, and remapping it through my computer/keyboard settings is turning out to be much harder than I previously thought. Also, ...
1
vote
1answer
44 views

How to make WholeCellGroupOpener menu shortcut that toggles

I put the following code using the Xcode application into an init.m file that is auto-loaded at startup. I can now turn on WholeCellGroupOpeners using a shortcut. Works great. ...
0
votes
0answers
23 views

Installing a Custom MenuItem into Init File [duplicate]

I have created a MenuItem that switches Wholecellgroupopeners On and Off for the currently selected notebook using the Control+w shortcut. ...
0
votes
0answers
27 views

How to create a shortcut for zooming in/out in Mathematica for Linux 11.3?

I want to use Ctrl +Scroll to zoom in/out in the notebook front-end of Mathematica for Linux 11.3 How to achieve this?
0
votes
0answers
22 views

How to read an integer/real from the keyboard and assign it to a variable

I am trying to assign to variable "a" a value from the keyboard (as in a Fortran program with read(,)a ). How can I do this?
2
votes
1answer
76 views

`NotebookEventActions` for special keys (“F2”, “F3”, “pause”, etc.) on Windows [duplicate]

Using NotebookEventActions one can make MMA evaluate a function when a key is pressed. For example: ...
2
votes
1answer
37 views

Keyboard short-cut to duplicate a line

Is there a built-in keyboard short-cut to duplicate a line in Mathematica? If not, is it possible to create such a short-cut?
0
votes
0answers
39 views

Register Meta key in keyboard shortcut

I frequently switch between an ubuntu computer and a mac. To make the shortcut consistent, I use a mac keyboard with ubuntu and map the super key in ubuntu to the command key on the mac keyboard. This ...
7
votes
2answers
68 views

Can Quantity interpretation be accepted using the keyboard?

Entering Ctrl+= on selected text results in the display of an interpreted Quantity, with the option to accept it, or choose other interpretations. The only way I ...
13
votes
1answer
727 views

Is there a keyboard shortcut to navigate to a matching parenthesis/bracket?

I use Mathematica on a Mac. If I place the text cursor in the middle of some text/maths and press ALT $\rightarrow$ or ALT $\leftarrow$, the cursor moves forwards or backwards (respectively) one full "...
2
votes
1answer
47 views

Input without dialog

I'm programming a game, similar to a Sudoku in the sense that you have to put numbers in a grid. When Sudoku is played in a computer, (for instance, in https://www.chiark.greenend.org.uk/~sgtatham/...
1
vote
1answer
161 views

How can I use Ctrl-n and Ctrl-p to interact with the completion menu on macOS?

I would like to use CTRL-N and CTRL-P to select the next or previous entry in the context-sensitive autocompletion menu of ...
3
votes
1answer
77 views

How to Automate Esc [[ Esc formatting in version 11.2 on windows?

Existing answers given in automating-esc-esc-formatting no longer work in 11.2 on windows 7 for some reason. At least I could not make them work. It was suggested I open new question to find a ...
4
votes
0answers
162 views

Is there a shortcut for typing brackets and parenthesis? [duplicate]

Is there shortcut for putting {...}, (...), or [...] around highlighted code (as opposed to ...
2
votes
1answer
77 views

How do I make a keyboard shortcut to change the color of selected text?

I am a beginner. I would like to add a keyboard shortcut to the Format > Text Color > Red menu item. I know I can type alt-r-x-up arrow-up arrow-return (Windows7). But I want to include this command ...
2
votes
1answer
85 views

Select all text in input cell to comment out

I am wondering if there is any shortcut to select all text in the input cell to comment out. Normally to comment a line, I type all the line then use mouse to select all text and then press ...
7
votes
1answer
1k views

How can I get 'KeyDown' without writing 26 commands?

EventHandler and {"KeyDown","x"} work for registering a specific letter. Is there a direct way to return whichever letter keys ...
1
vote
1answer
61 views

How to use a shortcut to evaluate an expression without having it show in the notebook, using the KeyEventTranslations.tr?

I'm trying to have a custom function evaluated via a keyboard shortcut, and add this shortcut via the KeyEventTranslations.tr. As a test example I took the example ...
0
votes
0answers
45 views

Fold/unfold all groups at given level via keyboard shortcut

The combination ctrl+' can be used to fold/unfold a selected group. Is there a way to fold/unfold all cells at a given nesting level, and possibly also to fold/...
1
vote
1answer
49 views

Annoying problem with hotkeys

How to prevent Mathematica from using its internal hotkey grammar while pressing the standard combinations like ctrl+c, ctrl+v etc.? In my case, after some period of using of Mathematica, instead of ...
2
votes
0answers
48 views

how can I bind “Control”+“Return” to “Evaluate Notebook”

how can I bind "Control"+"Return" to "Evaluate Notebook" Attempt1 I tried by modifying KeyEventTranslations.tr and restarting my computer. To no avail :( ...
0
votes
0answers
31 views

Writing vectors with hotkeys [duplicate]

I was searching the web for an answer but couldnt' find it: I use Mathematica and instead of writing a vector like: u = {1,2,3} I was trying to do it hotkeys I ...
4
votes
1answer
101 views

Changing CMD+1,CMD+2,… shortcuts to ALT+1,ALT+2

Style shortcuts are mapped to keys like Cmd+1/Cmd+2 which conflicts with MacOS spaces switching. Can someone suggest how to remap them to Alt+1/Alt+2/etc.? Keyboard translations file for Mac is in <...
6
votes
3answers
261 views

How to Detect Special Key Presses in a Notebook?

We can use: SetOptions[EvaluationNotebook[], NotebookEventActions -> {{"KeyDown","s"} :> Print["triggered"]}] to make the current notebook respond to s ...
2
votes
0answers
49 views

Is it possible to navigate in the frontend by cell merely by keystrokes?

What are the keystrokes to go to the next cell? (depending on cell(s) currently selected) go to the previous cell? (depending on cell(s) currently selected) select the enclosing group of cells? (i.e....
3
votes
1answer
85 views

How can I jump to the next initialization cell?

I've got a long document and I suspect know that I mistakenly set some cell in the middle of the document to be an initialization cell, probably hidden inside multiple collapsed sections and ...
2
votes
0answers
59 views

Create keyboard shortcut for automatic source formatting in workbench

In the context menu under Source there is an option to automatically format/indent code, but it doesn't have a keybinding associated. The command also doesn't seem to appear in the Window → ...
6
votes
1answer
159 views

Making a keyboard shortcut using the Fn (function) key on OS X

A lot of my use for Mathematica is creating notebooks that read like textbooks. For this reason, most of my time is spent in text cells. As I type in a text cell, I am constantly creating inline ...
8
votes
3answers
2k views

How to clear all output cells and run all input cells

I am new to mathematica and I am a little frustrated. There are a few things that I would like to do but I am finding difficult Use a keyboard shortcut to clear all output cells and run all input ...
3
votes
3answers
301 views

Shortcut to open Input Assistant

tl;dr the answer is F2 How can I re-open the Input Assistant after I've mistakenly closed it? E.g. Write the command Plotand ...
4
votes
1answer
86 views

Keyboard entry of square bracketed matrices in text cells, How to?

In order to produce square bracketed matrices I execute the following code at the bottom of my notebook, then copy and paste it into the text cell where I'm composing: ...
3
votes
1answer
106 views

How to create my own inline drop down autocompletion in a text cell?

Mathematica has a nice dropdown feature when typing along in an input cell. If I type "Pl" a dropdown appears with options on how I can complete the command. It's basically a shortcut. I can then ...
5
votes
1answer
66 views

How to use user defined keys for navigating in Slideshows?

How would I define, say < and >, or the left arrow key and right arrow key as keyboard shortcuts for moving forward and backward in slideshows?
1
vote
1answer
128 views

How can I get emacs key bindings to repeat when held down in Mathematica?

I like using emacs key bindings to navigate (c-f, c-b, etc.). But unlike every other application I use on my Mac, those commands don't repeat when I hold them down. So I have to press 'f' each time I ...
5
votes
0answers
112 views

Using an umlaut for a keyboard shortcut

How can I define a keyboard shortcut based on an umlaut like ü? KeyEvent in KeyEventTranslations.tr doesn't seem to register umlaut based keyboard inputs. For ...
2
votes
0answers
53 views

Native keyboard input for Ctrl+ü

The physical layout of my keyboard is a German one. However, for Windows I'm using a custom keyboard layout created with the Keyboard Layout Creator. Within that layout I defined Ctrl+ü to be ...
9
votes
3answers
417 views

What is the middle mouse button called in Mathematica's code?

I want to create a custom shortcut triggered by clicking (not rolling) the middle mouse button. But a seemingly trivial question gets in the way: What is the middle mouse button called in Mathematica? ...
6
votes
0answers
118 views

How to input Abs[x] as |x|? [duplicate]

I could swear that I have seen Mathematica expressions (in something like InputForm or FullForm, as opposed to ...
5
votes
2answers
316 views

Simpler way to type Derivative[1, 0][u][0, x]

Though not unbearable, I always feel a little nervous when typing partial derivatives at a specified place e.g. $u^{(1,0)}(0,x)$, which happens a lot when setting initial/boundary conditions for PDEs. ...
1
vote
1answer
64 views

How to specify assumptions without typing out functions

So I want to add assumptions in carrying out integration. I know I could use the Integrate function: Integrate[V Exp[-x/a] ,{x,0,10}, Assumptions->a>0] but ...
8
votes
2answers
647 views

Is there a keybinding for absolute value?

Is there a keyboard shortcut or esc-sequence for typing in the absolute value bars into input cells? I know that if you do, Abs[-4] // TraditionalForm and copy ...