# Tag Info

28

Original answer Yes, with a bit of effort it is possible to construct such a package. My package Shortcuts, inspired by various questions and answers on this site over the years, can be installed in less than a minute from within a fresh notebook in Mathematica 9 or 10, on Windows, MacOSX or Linux by this Get@"http://goo.gl/aAxplX" or Get@"http://www....

27

Superscript is not interpreted as Power: Presumably you are referring to what happens when you enter a power in superscript notation using the key combination Ctrl+6. Mathematica is capable of representing both this power notation and a formatted plain Superscript. In my opinion it is a failing that the power notation appears in the Typesetting menu while ...

25

You can see what can be done by running (maybe inspecting it in a browser first) Get["http://www.mertig.com/shortcuts.m"] This code will generate a modified copy of the default KeyEventTranslations.tr in : FileNameJoin[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "TextResources", Switch[$OperatingSystem, "MacOSX", "Macintosh", "...

23

The short-cut keys for various actions can usually be found directly in the menu. Here on OS X you see the ⌘+/ at the right side under Un/Comment Selection: As pointed out in the comments for various systems the short-cuts to comment a selection are Mac OS X ⌘+/ Windows Alt+/ Right click + u which uses the context menu short-cut Linux Alt+/ Alt+Shift+...

20

I have this palette open all the time: CreatePalette@Row@ { Button["(\[SelectionPlaceholder])", FrontEndExecute[ FrontEndToken[SelectedNotebook[], "SelectionParenthesize"]]], Button["[\[SelectionPlaceholder]]", FrontEndExecute[ FrontEndToken[SelectedNotebook[], "SelectionBracket"]]], Button["{\[...

19

Personally I would use what bill_s suggested, Ctrl+A followed by Shift+Enter. But if you want to have one shortcut you can use what Timothy linked. Just add this line to the KeyEventTranslations.tr file: Item[KeyEvent["h", Modifiers -> {Control}], FrontEndExecute[FrontEndToken[SelectedNotebook[ ], "EvaluateNotebook"]]] it works for me. Your ...

16

Here is the answer given by Rolf Mertig that includes many additional shortcuts. One of them Ctrl+t, evaluates whatever is stored in joker.m file (invoked by Ctrl+Shift+J). There are already two examples, coincidentally the second one is exactly what you need: NotebookApply[SelectedNotebook[], RowBox[{"\"", "\[SelectionPlaceholder]", "\""}], Before] Ok, ...

16

Perhaps something like this?: DynamicModule[{key = ""}, EventHandler[ Dynamic[key], {"KeyDown" :> (key = CurrentValue["EventKey"])} ]]

14

Here are two I have found: Mathematica Quick Reference Mississippi State University Mathematica Guide I'm not sure these are great but they are the best I've found. (I take it these are along the lines of what you want, correct?)

14

Following detects backspace on Mac: SetOptions[EvaluationNotebook[],NotebookEventActions-> {{"KeyDown","\.08"}:>Print["triggered"]}] This code can be helpful for finding out different codes for non-standard keys. SetOptions[EvaluationNotebook[],NotebookEventActions-> {"KeyDown":>Print[FullForm@CurrentValue["EventKey"]]}]

13

Thanks to everyone for the helpful comments. Here's the exact procedure I used to fix this (specific to Mac OS X, version 10.8 if that matters, and Mathematica 8, but it should be analogously applicable to other versions and operating systems): Close Mathematica Delete the keymap cache. For me this was in ~/Library/Mathematica/FrontEnd/8.0 Caches/MacOSX-...

13

For OSX you can do the following. Select Mathematica. Click on "Mathematica" menu then "Services -> Services Preferences..." Select "Shortcuts" tab. In the left side select "App Shortcuts". Click the + button. Fill out the following. Click add after you have set your short cut key and you are good to go.

13

I think you're looking for the menu item Edit | Check Balance or the equivalent keyboard short-cut Shift + Cmd + B.

11

Perhaps something like this? text = ""; EventHandler[ InputField[Dynamic@text, String, ContinuousAction -> True], {"ReturnKeyDown" :> Paste["\n"]} ]

11

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 Theoretical Physics, Stellenbosch, South Africa: Mathematica commands summary The sheet has been last updated in May 2016 (Mathematica 8), but does need some updating ...

11

If you want a nicer layout for Range you could try the Notation package: Notation is a bit picky about the definition code of your notation. It has to go manually via its templates. That's why I used a picture above. The following code should work when copied: << Notation CellPrint@Cell[BoxData[ RowBox[{"InfixNotation", "[", RowBox[{ ...

11

There isn't a built-in keybinding, but you can define one yourself: ClearAll[myAbs] appearanceAbs[x_] := TemplateBox[{x}, "myAbs", DisplayFunction :> (RowBox[{"\[LeftBracketingBar]", "\[NoBreak]", #1, "\[NoBreak]", "\[RightBracketingBar]"}] &), InterpretationFunction :> (RowBox[{"myAbs", "[", #1, "]"}] &)] myAbs[x_?NumericQ] :...

11

If one does not mind occupying BracketingBar this can be done quite cleanly. MakeBoxes[Abs[x_], StandardForm] := MakeBoxes @ BracketingBar[x] BracketingBar = Abs; This provides bidirectoinal translation, i.e. Abs[x] is formatted with bars, and also it may be entered with the special characters \[LeftBracketingBar] and \[RightBracketingBar], entered with ...

10

For internal representation, I prefer avoiding subscripts and superscripts, so I'll give a way for using superscripts for input and output formatting, while the internal expression is of the form x[i]. For output formatting, something like this: Format[x[i_]] := Superscript[x, i] Example Table[x[i], {i, 3}] For input, this works, but I would wonder ...

10

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 should be...

9

The following solution seems to work reasonably well, at least on a few examples I have tested. It will be in the spirit of the one I gave to a rather similar earlier question you asked. I wasn't able to make the Tab key work, instead I bound the indenting to the CTRL+  combination - but in practice this is almost as easy as pressing Tab key. Also, the ...

9

Using Autohotkey the following works pretty well. #IfWinActive ahk_class NotebookFrame Enter::Send {blind}{shift down}{enter}{shift up} Shift & Enter::Send {enter} #IfWinActive In case the internals are ever changed you can use the following to get the internal class. Return:: WinGetClass, class, A MsgBox, The active window's class is "%class%...

9

It seem to me that for a task like writing homework, it would be complete overkill to try anything fancy or low-level. So I would suggest instead to go with something like this, which just applies in the current notebook and also just for the particular vector you use most commonly: SetOptions[EvaluationNotebook[], InputAutoReplacements -> {"aa" -> ...

9

If you cannot resolve the keyboard behavior try an alternate input form; I propose: EscdinttEsc To input: Then use Tab to move between the Placeholder fields.

9

There is too much burden attached to working with KeyEvenTranslations.tr so I rarely use it. You can try an alternative: DevTools:NotebookActions: ResourceFunction["GitHubInstall"]["kubapod", "devtools"] Needs @ "DevTools"; NotebookActionsEnable[]; EditNotebookActions[]; add a cell with: <| "Label" -> "ClearCell" , "ShortKey" -> "c" , "...

9

In Mathematica 12.2 the way to enter underscripts is Ctrl+Shift+, (comma). At least on macOS.

8

I use Alt+v+o, or Alt, then v, then o (they don't have to be entered at the same time, just in succession). That's the same as Evaluation > Evaluate Notebook

8

Try turning off the "terminal input" system, based on GNU Readline, that was added to math.exe in version 9. Windows has its own terminal input system that works just fine. You can disable the new "terminal input" by running math.exe with the option -rawterm. You can also disable the new "terminal input" permanently by going to the subdirectories Program ...

8

If you want to do purely typesetting, you could use the similar symbol for Function: EscfnEsc $\mapsto$ The caveat is that this symbol has a pre-defined meaning, as you can see by entering TraditionalForm[Function[x,f[x]]] $x \mapsto f(x)$ If you enter the symbol only in equation cells that aren't meant to be evaluated, it doesn't matter that this ...

8

It is easy enough to add your own InputAliases. For example evaluating: CurrentValue[EvaluationNotebook[], {InputAliases, "rta"}] = "↦"; Then entering EscrtaEsc will create a \[RightTeeArrow] character. To make the change global and persistent you can add this to the existing list using the Option Inspector with the Global Preferences level selected. (...

Only top voted, non community-wiki answers of a minimum length are eligible