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


24

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", "...


22

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+...


21

Here are four approaches to setting up keyboard shortcuts. The last is the best! AddMenuCommands First examples using notebook manipulation, (as you tried): This example adds a command to the Insert menu, with a key combination Control+U (normally the underline command). This addition just lasts for the session, but could be added to an init file. ...


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

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


15

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, ...


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.


12

To clarify the situation: In Version 9 on Windows and OS X, there is a new Make Template system which supports multiple templates for built-in functions. As part of the new system, unfortunately a bug was introduced which makes it ignore the usage statement for user-defined functions. This bug has been confirmed and we hope to fix it in a future release, ...


11

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


11

Actually, Mathematica does know these words, but requires a bit of prodding to suggest them. You can add additional word suggestions via the Options Inspector, but I don't think there is a general way to customize the ordering of the words that appear in the suggestions popup menu.


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[{ ...


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

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] :...


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

It is the same F1 key. If the cursor is anywhere in the name of the function adjacent to any function-name letter, then pressing F1 will bring the corresponding function documentation page. Mathematica 9 Context-Sensitive Input Assistant (or see this video) provide a set of useful options. For example this will appear as you type and clicking red-circled ...


9

You may also use Ctrl+Shift+K, or ⌘+Shift+K to insert a template with the basic syntax already filled in with named placeholders.


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

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


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


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