Questions tagged [keyboard]

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

Filter by
Sorted by
Tagged with
50
votes
2answers
3k views

Automating Esc [[ Esc formatting?

Is it possible to program the Front End to automatically format double square brackets without having to type Esc[[Esc each time? It's awful to have to type Esc ...
38
votes
2answers
4k views

Cheat sheets or reference cards for Mathematica

In order to improve my workflow with Mathematica, I'm looking for cheat sheets. The purpose of such reference cards is to be printed and to stay on the desk during the learning of a new programming ...
29
votes
4answers
7k views

Keyboard shortcut to evaluate notebook

(If this is entirely trivial, although I couldn't find an answer as much as I searched the archives, I will delete the question.) How could I add a keyboard shortcut to evaluate the entire notebook ...
27
votes
2answers
18k views

Delete the current notebook cell using the keyboard

Is there another way than pressing Ctrl+. until the whole cell is selected and then pressing Del? If this is not built in, can I create some sort of a global macro to do this and bind it to a ...
27
votes
4answers
2k views

Detecting KeyUp events

Is there a way to detect when a key is released, similar to EventHandler[InputField[], {"KeyDown", "k"} :> Print["k pressed"]] It seems such detection isn't ...
26
votes
1answer
593 views

Is it possible to maintain user-defined shortcuts in a web-installable package?

There are various posts here on this site about how to add user defined extra keyboard shortcuts for the front end. The problem is how to put them into a better maintable and properly documented ...
26
votes
1answer
1k views

Customize keybindings without modifying files in the installation directory

I would like to know if I can modify key bindings without being able to modify the KeyEventTranslations.tr in the installation directory. So maybe putting another one in my home dir and linking ...
25
votes
1answer
2k views

How can I set a keyboard shortcut to run a command?

I want to use this to add a keyboard shortcut to an undo function I wrote. The basic problem is the following: I have a command, let's say x=1, and I want to run ...
25
votes
2answers
912 views

Template completion

In version 8, if one evaluates test::usage="test[x,y]"; then types test, then shift-cmd-k (or shift-ctrl-k), a template ...
24
votes
2answers
1k views

Best way to add KeyEvents and faster Quit

Many users have asked how to add KeyEvents to speed/improve keyboard input. This is just a random example. The technique is always the same. It requires that you ...
21
votes
5answers
1k views

How can I make an InputField with a proper newline/carriage return?

The return key does not work as expected in an InputField, how can I overcome this?
19
votes
3answers
536 views

Parenthesize what I have highlighted

I want to highlight a piece of equation, click a button and have that part taken into parentheses.
18
votes
2answers
2k views

How can I change the keyboard shortcut for switching the active window?

The default keyboard shortcut (on Windows at least) for switching focus to the next window is Ctrl+F6, and for switching to the previous windows it's Shift+Ctrl+F6. How can I change this to Ctrl+Tab ...
17
votes
5answers
3k views

Preventing Superscript from being interpreted as Power when using Ctrl+^ shortcut?

I have very strong desire to use superscript as the index of the variable. However, it looks like that the Mathematica automatically recognize the superscript as the power and I got message that my ...
17
votes
1answer
15k views

What is the comment shortcut?

I went to a Wolfram Technologies workshop a few weeks ago and the presenter showed us a keyboard shortcut that when a block of input is selected, the shortcut puts the block of selected input in ...
16
votes
3answers
878 views

Defining symbol shortcuts in the Front End

I was wondering (because I could not find any documentation on this) if it is possible to do shorthand abbreviations for domains or could one define them? E.g. In[1]:= Element[p,Complexes] Out[1]...
16
votes
2answers
998 views

Command Completion

Note: As of version 9, this functionality is available and works out of the box. I've a few questions about Command Completion in Mathematica. I recently discovered this feature, and it's really ...
16
votes
2answers
769 views

There is a button in the “basic math assistant” which wraps highlighted text in chosen brackets. Is there no keyboard command for this?

This counts as something of a basic question, but one for which I cannot find an answer. I checked the documentation, I checked google, I searched it here, I read a bunch of different things, but ...
16
votes
2answers
4k views

Rebinding keys to define new keyboard shortcuts

I've checked Mathematica → Preferences, and poked around the options on the toolbar. However, I don't see a way to define new keyboard shortcuts in Mathematica. I've used VIM for 10+ years, and I've ...
15
votes
2answers
1k views

How to write plain Greek in a text cell

If I create a text cell and type some greek text, most of the symbols are italics as if the cell had an Input style. It doesn't happen with latin characters. I recollect that it is impossible to fix ...
15
votes
3answers
2k views

Opening a context menu (with the Menu key)

Is it by any chance possible to make the Menu key work as one would expect in Mathematica: opening a context menu? The Menu key does nothing in version 7 or 8 on Windows.
15
votes
2answers
429 views

Auto-completion doesn't work as my expectation in version 9.0

When I input the following line in version 8, and press Ctrl+K after Re, I can get a drop-down auto-completion list including ...
14
votes
3answers
1k views

Get tab key to indent a block of code

Is there some way I can change Mathematica keyboard behavior so I could select a block of text/code, press tab, and the selection would be indented to right? Similarly, I would like shift+tab to ...
14
votes
1answer
872 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 "...
13
votes
3answers
694 views

How to make the suggestion box appear?

When you type a function in Matlab, quickly a suggestion box comes up showing functions similar to the one you're typing. I thought that Mathematica didn't have this but one day, I typed half of a ...
13
votes
4answers
1k views

How to automate a FrontEnd return?

I use some custom shortcut keys in KeyEventTranslations.tr. One is for the Delete All Output function: ...
13
votes
1answer
2k views

Emacs key bind on Mathematica Linux

This might not be Mathematica specific question but if there is anyone who can use Emacs keybind on Ubuntu Linux, would you share how you realize it? I'm using Mathematica student edition both on ...
13
votes
2answers
2k views

Front end typing lag

Under Windows 7 I frequently get serious keyboard lag. My home machine (Windows XP) NEVER lags. I was able to improve things somewhat by running Mathematica as Administrator, but this only went so far....
12
votes
2answers
542 views

How can I overload autocompletion to work with full contexts?

I would like for the autocomplete feature to search through contexts, for example if I have a symbol named A`B`C`MyFunction, when I type A` and press "cmd + shift + k" it will complete it. Edit To ...
11
votes
4answers
788 views

Switch actions of Shift+Enter and Enter in notebook interface?

How can I switch the functionality of the Enter and Shift+Enter key combinations in Windows? I find Matlab's interface more intuitive sometimes. By default in Mathematica's front-end, the Shift+Enter ...
11
votes
2answers
723 views

Move the cursor in a notebook using the keyboard

How can I move through a notebook using only the keyboard? If one tries to use the arrow keys, the cursor tends to get "trapped" in comments and error messages.
11
votes
4answers
1k views

Create shortcut in Mathematica for “Equal Symbol Aligned Math Cell”

How do I create a new shortcut for creating a "Equal Symbol Aligned Math Cell" in Mathematica 8? Update I meant a keyboard shortcut. An "Equal Symbol Aligned Math Cell" is exactly what @Heike ...
11
votes
1answer
1k views

Version 10.2, key shortcuts for matching brackets do not work?

Bug introduced in 10.2 System: Linux Once updated to 10.2, my Alt+} and Alt+) do not return a pair of brackets but a single right one, as if Alt is not pressed. Alt+] still works.
10
votes
4answers
651 views

Select Cells to End of Notebook

I'd like to create a keyboard shortcut that will allow me to select all of the cells from the current cell until the end of the notebook, similar to how ShiftCtrlEnd functions when editing text in ...
10
votes
1answer
306 views

Simple Choice-Dialog like the auto-completion popup

What I want is pretty simple, nevertheless, after half an hour I have only unsatisfying solutions here. Let me ask you who might work more often with Mathematica's GUI elements: Is there a way to ...
10
votes
1answer
507 views

How to copy hyperlink addresses using the keyboard

I would like to copy the address of a hyperlink in Mathematica using the keyboard. I found code for copying hyperlink addresses in ContextMenus.tr: ...
9
votes
3answers
888 views

Ctrl+= opens the alpha input instead of below-script

When trying to type "traditional style" inputs such as integrals or sums, I follow the tutorial and type Esc sum Esc   Ctrl+= n=1  Ctrl+% 10 whatever However, when I type Ctrl+= it opens ...
9
votes
3answers
632 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? ...
9
votes
1answer
431 views

Enhanced “Complete Selection” (dynamic autocomplete) for Text input?

The autocomplete ("Complete Selection") feature Ctrl-K (or F2 on Windows) works fine for functions and code input. Is there a way to enhance it for text input? Today’s standard (see e.g. OpenOffice ...
9
votes
2answers
80 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 ...
9
votes
0answers
580 views

Keyboard issues with Mathematica 9.0.1 for Linux [closed]

After working for a while with Manipulate function and increasing the number of variables to be manipulated, keyboard stops working properly in the Notebook. It ...
9
votes
0answers
160 views

Esc-esc for special characters and autocomplete in Mathematica 9 [duplicate]

I recently upgraded to Mathematica 9 and have noticed a slightly annoying behavior that I was looking to remedy. In the past I would type special characters, e.g. ...
8
votes
2answers
959 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 ...
8
votes
3answers
4k 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 ...
8
votes
3answers
3k views

Copy last/second last (etc.) input from history into current cell

I like to use terminals (e.g. gnome-terminal) where you can use the up key to copy the last command into the current input 'field'. For example, to repeat the last ...
8
votes
3answers
1k views

The shortcut for Subsuperscript doesn't work?

The document for Subsuperscript says that: To enter a subsuperscript in a notebook, use either Ctrl+_ to begin a regular subscript or Ctrl+^ to begin a regular superscript. After typing the ...
8
votes
1answer
253 views

How can I add arbitrary code into DefaultKeyTranslations.tr?

The solution to this question on how to get latex code for a text cell (which Mathematica doesn't do correctly) was formulated as a palette but I need it as a keyboard shortcut. How can I add an ...
8
votes
2answers
368 views

Evaluating selected expression using keyboard shortcut

Imagine that in this toy code I want to evaluate just the selected (blue) expression: To get as output result: {09/14,09/15,09/16,09/17,09/18,09/19,09/20} There is some shortcut to do this? I'm ...
8
votes
0answers
163 views

How to overwrite key shortcuts?

It is very handy to have shortcuts for frequently used glyphs, e.g. [[, ]], <|, ...
7
votes
3answers
428 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 ...