# 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 kernel package. Also the issue of installing and uninstalling the package should be dealt with.

So, the question is whether it is possible to construct such a package and has it been done already?

• Related: (16697), (68864) Jun 25, 2015 at 7:29

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.mertig.com/shortcuts.m"


Note that during installation some dialogs will pop up, which I think should be always confirmed, though if you are very afraid of evaluating Dynamic content in notebooks from others, you might not want to confirm them (though then the shortcuts often trigger an "Enable Dynamics" question in notebooks saved in "insecure" locations).

All code is available on Github here.

I found Windows the most friendly operating system to add user keyboard shortcuts to.

Screen shots of the shortcut listings are:

• Windows:
• MacOSX:
• Linux:

The package Shortcuts gets installed in $UserBaseDirectory/Applications and is loaded automatically when using a keyboard shortcut. The package is documented in the Wolfram Documentation center. If you want to get rid of the shortcuts just do: Needs["Shortcuts"]; UninstallShortcuts[];  which deletes the generated KeyEventTranslations.tr file$UserBaseDirectory.

• I get the autocomplete troubles without Shortcuts, so I don't think the issues with the bad paclet push are related. There is a fix, which should work after deleting the paclets directory. I just installed the Shortcuts package (very nice BTW) and it seems to works just fine in 11.2 without breaking autocomplete. Nov 28, 2017 at 15:00
• Very strange, <kbd>F4</kbd> does not work. Sep 3, 2020 at 5:32
• @ΑλέξανδροςΖεγγ Which operating system, which Mathematica version? Sep 3, 2020 at 8:07
• @RolfMertig Win10, 12.1.1. Actually, the symptom is not "Not work", F4 works sometimes but other times does not. So it seems not that stable as observed, so that I call it "strange". Sep 3, 2020 at 8:11
• For me it does work on Win10 12.1.1 Sep 3, 2020 at 8:19