Questions tagged [keyboard]

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

1
vote
1answer
45 views

Turn PasteButton into keyboard shortcut

I'm looking for a general "recipe" to do with a keyboard shortcut what I currently do with a PasteButton. Here is a working toy example ...
2
votes
1answer
93 views

Automated (lazy) method to make custom (key-input) shortcuts (not menu items) for letter-like symbols? [duplicate]

The Problem: I don't know about you, but every time I am trying to do analytical work in Mma, it is rather difficult/cumbersome for me to type the following, here specifically for ...
1
vote
0answers
15 views

Custom (emacs) key bindings for open/save in Mathematica 11

Is it possible to change the key bindings for Open and Save? This used to be possible in MenuSetup.tr, along the lines of this post. In Mathematica 9, there were explicit "Open" and "Save" (and "...
2
votes
1answer
111 views

Mac Touch Bar and Hidden Characters

I am reposting this question (Translate key events to nothing?) hoping to resolve an issue that is causing me no end of, bug chasing. Arggh, Help. On a Mac with a touchbar, if my finger slips and ...
7
votes
0answers
103 views

How to overwrite key shortcuts?

It is very handy to have shortcuts for frequently used glyphs, e.g. [[, ]], <|, ...
2
votes
1answer
53 views

Define Macros to automatically change keyboard input

When using Solve for example, I find myself having to use it in conjunction with other types of functions, like Flatten or ...
2
votes
0answers
40 views

Translate key events to nothing?

My Macbook Pro has a touch bar which is causing me to make a bunch of hard-to-find errors If my finger mistakenly hits the F3 through F12 positions on the touch bar, the front end inserts an ...
2
votes
1answer
102 views

What is the “phone” symbol that appears with the keyboard shortcut “ctrl-g” in Mathematica 11.1?

Using ubuntu, and mathematica 11.1, the keyboard shortcut ctrl+g creates a small emoji of an old landline phone (see image). It does not appear in mathematica 10. If I copy it from 11.1 end up with ...
0
votes
0answers
51 views

Pressing key to play sound

Is possible to bind keyboard keys so that they make a sound? I want to make a piano keyboard that I can play from my laptop keyboard. Example: Clicking "1" on keyboard makes Mathematica start ...
0
votes
0answers
54 views

Shift+home / shift+end not working on linux

Like I said in the title: shift+home (and shift+end) key combinations don't result in selecting line from current cursor position to beginning (or end) of the line. Cursor just jumps to the beginning (...
0
votes
1answer
70 views

Is there any keyboard shortcut to delete the output of a particular cell

Is there any keyboard shortcut key to delete the output of a particular cell in Mathematica.
0
votes
0answers
66 views

Keyboard Interacting problem using Free-form Wolfram Language input

I'm trying to perform a Free-form Wolfram Language input. I touch CTRL+= but it doesn't do anything It is strange because the key = works fine Is there another way of using that function? ...
0
votes
0answers
45 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
53 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
41 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 ...
7
votes
3answers
370 views

Programmatically create a keyboard shortcut to “Align Center” a Text Cell without losing cursor position

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
50 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, ...
2
votes
0answers
42 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 ...
3
votes
2answers
103 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
25 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
65 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
81 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
46 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
30 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
37 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?
2
votes
1answer
86 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
42 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?
9
votes
2answers
77 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
801 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
52 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
179 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
88 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
770 views

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

Is there shortcut for putting {...}, (...), or [...] around highlighted code (as opposed to ...
3
votes
1answer
99 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
141 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
76 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
72 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
52 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
64 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
32 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
107 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 <...
7
votes
3answers
344 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
59 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
96 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
69 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
177 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
3k 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
378 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
92 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: ...