15
votes
How can I get 'KeyDown' without writing 26 commands?
Perhaps something like this?:
DynamicModule[{key = ""},
EventHandler[
Dynamic[key],
{"KeyDown" :> (key = CurrentValue["EventKey"])}
]]
15
votes
Accepted
Is there a keyboard shortcut to navigate to a matching parenthesis/bracket?
I think you're looking for the menu item Edit | Check Balance or the equivalent keyboard short-cut Shift + Cmd + B.
15
votes
How can I create a shortcut to convert "normal Symbol" to Formal Symbol?
Here's an attempt:
...
14
votes
Accepted
How to Detect Special Key Presses in a Notebook?
Following detects backspace on Mac:
SetOptions[EvaluationNotebook[],NotebookEventActions->
{{"KeyDown","\.08"}:>Print["triggered"]}]
This code can be ...
13
votes
Accepted
Turn off keyboard shortcut
Surprisingly, this behavior is not actually a keyboard shortcut as such. It's a style property for Input cells. To disable it, go to the menu ...
12
votes
Accepted
Cheat sheets or reference cards for Mathematica
Best Cheat Sheet so far...
Pretty much the best Cheat Sheet I have come across so far, is the following one by Hugo Touchette, a theoretical Physicist teaching at the National Institute for ...
12
votes
Accepted
How to open a Python interpreter input cell?
Type > at the start of a cell (or when between cells). This is documented in an example on ref/ExternalEvaluate (last Basic Example). I'm a bit suprised it's not in the details section. It probably ...
11
votes
Is there a keybinding for absolute value?
If one does not mind occupying BracketingBar this can be done quite cleanly.
...
11
votes
Accepted
Is there a keybinding for absolute value?
There isn't a built-in keybinding, but you can define one yourself:
...
10
votes
Accepted
How to enter underscripts in 12.2?
In Mathematica 12.2 the way to enter underscripts is Ctrl+Shift+, (comma). At least on macOS.
10
votes
Accepted
Can I stop the python interpreter appearing?
The short-cut > at the beginning of a line to start an external code cell is set as part of style definitions for Input cells:
...
9
votes
Accepted
Is there any keyboard shortcut to delete the output of a particular cell
There is too much burden attached to working with KeyEvenTranslations.tr so I rarely use it.
You can try an alternative: ...
Kuba♦
- 137k
9
votes
Accepted
How can I self-define a keyboard entry for 3-dot "Because"?
You can use InputAliases to define an alias, like ...
8
votes
Accepted
Get tab key to indent a block of code
Later is better then never. 8 years after my original question, now in version 13.1 we have tab and shift + tab indentation in a native way, with no gambiarra needed. Cool!
8
votes
Accepted
How can I create a shortcut to convert "normal Symbol" to Formal Symbol?
An alternative is to create a notebook containing all the automatic replacements using InputAutoReplacements:
Test:
7
votes
Simple Choice-Dialog like the auto-completion popup
Edit
Once again b3m2a1 provided more detailed information about a FE's feature so I have to retract my claim that it is not worth an effort to create a popup on cursor position as opposed to e.g. in ...
Kuba♦
- 137k
7
votes
Switch actions of Shift+Enter and Enter in notebook interface?
This piece of code should do the trick. It takes effect immediately.
...
7
votes
How to Detect Special Key Presses in a Notebook?
@BlacKow's answer works well on Mac, but Mathematica cannot handle special keys (s.a. F2 or PAUSE) on Windows. Thus,
Here is a Windows workaround:
The idea is to create a dynamic link library that ...
7
votes
Accepted
Remap escape key for entering special characters?
Quit Mathematica. Look up the file KeyEventTranslations.tr in your installation directory. Open it in any editor (but better not in the Mathematica editor). Find ...
7
votes
Accepted
All the group formatting available in Mathematica
The option StyleKeyMapping controls "Tab" and "Backspace" does to the style (AFAIK, it is ...
7
votes
Strange behaviour of "Ctrl+." (ExpandSelection)
Solved it. In case someone runs into the same issue in the future, I'll describe here what I've done.
By typing Ctrl+. in Gedit, I found out this shortcut launches ...
7
votes
Can't exit full view
Google "Mathematica full screen shortcut"
Go to the first link
On Windows and Unix/Linux, use F12 to toggle Full Screen.
On Mac OS X, the keyboard shortcut is cmd-opt-f.
7
votes
Turn off keyboard shortcut
Some extra tips to anyone in my position (including future me):
I was unable to make any edits to Default.nb (or any style file at all) using Mathematica's own "Edit Stylesheet" functions. ...
6
votes
Get tab key to indent a block of code
I do much the same as Leonid, except I generally first convert the \[IndentingNewLine] structure into the appropriate tabified block:
...
6
votes
Best way to add KeyEvents and faster Quit
Here is a way that avoids the sometimes buggy FrontEnd`AddMenuCommands and gives us better flexibility. It's based on what I did here and here to do effectively ...
6
votes
Accepted
keyboard shortcut to invoke Insert new matrix
In the MenuSetup.tr (for linux located in the $InstallationDirectory/SystemFiles/FrontEnd/TextResources/X/ directory), I changed the line
MenuItem["&New......
6
votes
hotkey to mark the current cell and make it a text cell
Wolfram Research has "sort of" fixed this annoyance in Mathematica 10.3:
If you start typing a Machine Learning algorithm running in the front end detects that you are writing text and offers you ...
6
votes
Accepted
Switch actions of Shift+Enter and Enter in notebook interface?
First move KeyEventTranslations.tr file to your $UserBaseDirectory in order to not damage installation files. (Rebinding keys to ...
Kuba♦
- 137k
6
votes
How to use user defined keys for navigating in Slideshows?
Evaluate one line once inside the notebook (or creating a button) will do:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
keyboard × 269front-end × 98
customization × 43
notebooks × 26
linux × 16
cells × 12
formatting × 11
input × 11
autocomplete × 11
evaluation × 10
eventhandler × 9
mac-os-x × 8
dynamic × 6
windows × 6
bugs × 5
interface × 5
syntax × 4
style × 4
documentation × 4
stylesheet × 4
symbols × 4
menu × 4
text × 3
kernel × 3
wolfram-cloud × 3