Add "Wolfy" Functions to Mathematica!

If you are using Linux or Apple your mileage may very with this post.  If you want to figure it out for Apple or Linux it would be cool if you posted your method as a comment to this blog!

I am going to cover creating a Windows 10 keyboard macro for Mathematica in Windows 10, and show how it can save you time with Wolfram built in functions. I am going to use some Set theory functions as an example of how this can save you some carpal tunnel impact, Namely Union[], Intersection[], and Complement[].

In Windows 10 you should have the Windows Mouse and Keyboard app which you can download here if you don't have it.  Open the app and it will show your devices.  Mine opens to my Microsoft mouse so I scroll over to they Keyboard I want to create hot keys for and it looks like this.

Phil's Keyboard

First we will add a Macro that types the keys needed to get the Wolfram wolf icon. Which are [Esc Key]wolf[Esc Key].

Click app-specific settings and scroll to Mathematica (don't pick the Kernel!) and pick that as your App.  My screen looks like this now:

Now we are ready to add a macro.  Scroll to New and click it.  Now create a new Macro.  I named mine "Wolfy" of course.  Then use the special keys menu in the Macro editor to select the escape key.  Then type wolf in lower case and add the escape key again.  Your screen should look something like this.

We are not done, we need to assign our macro to a key or a key combination like Alt-w for example.  Just hit the back arrow the macro is save automagically and keep going back to the base menu.  Scroll till you see Assign a macro (Wolfy).  My screen looks like this.

Click the CBS eye looking icon to the top right of the Keyboard image to toggle the keys available for programming.  I picked the task view key.  Now scroll to the macro and pick Wolfy or whatever you called yours.  If you dig around a bit in the tool you can find out how to assign Macros to key combination like Windows-W but I'm lazy and that would make this post even longer!

Go into Mathematica and press you hot key or hot key-combination if you figured that out and you will see Wolfy magically appear.

OK.  Why is this useful?

Hopefully I can motivate with you with what motivated me.  I have been doing a bunch of set theory stuff lately.  I found the Wolfram builtin functions useful, but I wanted to add some additional logic and protection to my functions.  I also wanted hot keys for these functions with the benefit of icon in the function name, i.e. Wolfram's wolf.  Let's say I want to use the built in functions set Union, Intersection, and Complement.  We can use the Wolfy icon in our new function names which makes them short fast and look cute.  Here are the function definitions with some exception handling added to each function.

Lets test our new Keyboard Macro Wolfy functions.

If you found this post useful you can download the Wolfram Notebook from here.  If you have any ideas on how to improve this post, or learn how to add "Wolfy" functions to Linux or Mac leave a response to this post.  By the way the "Spikey" icon is just to the left of the Wolfy icon so adding Spikey functions would work the same way.

Have fun with Mathematica!

Phil