Message Boards Message Boards

4
|
17288 Views
|
4 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Adding keyboard shortcuts without modifying the installation directory

Posted 11 years ago
I have a keyboard shotrcut set up to enter \[LeftDoubleBracket] and \[RightDoubleBracket] (I use Command-[).  It's the only custom shortcut I use but I came to depend on it so much that it bothers me to no end when it's missing.

I add this shortcut by modifying the KeyEventTranslations.tr in the installation directory.  This means that whenever Mathematica is re-installed or updated, I need to redo the modification.

Is there a way to add these shortcuts without modifying anything in the installation directory?  It's been suggested to me to just copy the modified KeyEventTranslations.tr file to $UserBaseDirectory, but I'd rather not have the complete file there: I'm worried that if a newer Mathematica changes things in this file, the older KeyEventTranslations.tr in $UserBaseDirectory would override these changes.  I'm also worried because I have several versions of Mathematica installed and there might be differences between their KeyEventTranslations.tr files.

To sum up, Im looking for a way to add these shortcuts by putting something in $UserBaseDirecory only (not the installation directory), without the risk of overriding other shortcuts.
POSTED BY: Szabolcs Horvát
4 Replies

Vitaly, sure, when I find the time to write details of the usage. In about a $WolframWeek.

POSTED BY: Rolf Mertig

There exists now a freely available package "Shortcuts`", which does not touch the installation directory.

See also this post.

POSTED BY: Rolf Mertig

Rolf, great package! Would you like to introduce it here on Wolfram Community as a separate post and give some details on its usage? You could just simply copy the Stack Exchange post you linked - the editor is the same.

We will then would file it into Mathematica Add-Ons group where we collect info about new packages. In this way user can find it easily.

POSTED BY: Vitaliy Kaurov
Posted 11 years ago
I can't answer your specific question. However, if you're on a Windows platform, I can offer an alternative way to have shortcuts assigned to custom keys. I use a programmable gaming keyboard. If you are already familiar with these devices, then this won't be anything new to you and you can ignore the following.

Again, this may or may not apply to Apple OSx or Linux platforms. I know it applies to Windows platforms. I won't go into a lot of detail. You can get that by visiting the vendor websites. These keyboards allow you to assign virtually any key sequence to any key. They have a limited set of "extra" keys that can be programmed. Most of these keyboards can also be configured to automatically detect the current active application (eg, Mathematica) and configure your custom key sequences for that application. This means that you don't have to change any of the application's default key sequences. I have several different applications that I've configured with custom keys. The downside is you will have to purchase a new keyboard. But, you can get a fairly nice keyboard for $50-$100. IMO, they are well worth the cost. There are also programmable mice that can do the same thing (in fact, I have a programmable gaming mouse that I use for Mathematica and other apps, too). I personally use a Steelseries Merc Stealth keyboard and a Razer Naga Hex mouse. Razer also offers very good programmable keyboards. I have used a Logitech mouse, but I found their software seems a little unstable from version to version.
POSTED BY: David G
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract