Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How to assign a sequence of keystrokes to a Mac keyboard shortcut which can be used on the Mac or Windows side

Posted on 2015-02-14
Medium Priority
Last Modified: 2015-03-09
Mac OSX ver 10.7.5
Parallels Desktop 9 for Mac
Windows 7 Ultimate SP1

Is there some way I can assign a series of keystrokes to a keyboard shortcut, for example:


and have this keyboard shortcut available whether I'm interacting with the Apple side of my Mac or with the Windows side of my Mac (under Parallels).
Question by:qeng
  • 4
  • 2
  • 2
  • +1
LVL 63

Expert Comment

by:☠ MASQ ☠
ID: 40610723

Unless you are using a keyboard that allows storage of keyboard sequences it its own flash memory (these are generally high end gaming keyboards) you will need to use separate applications for each operating system.  

Keyboard macros are normally stored in data files on the computer.

Author Comment

ID: 40610739

We used to have such a keyboard (Logitech G15 if I recall) years ago which I'd bought for my kids when they were into gaming.  In my case here, it's the built-in MacBook Pro keyboard.

It's easy enough for me to code the sequence on both sides.  Which apps would you recommend for the OS and Win sides (I worry about introducing a virus/logger with some of the free apps or about resource utilization with it running constantly in the bkgd)?
LVL 53

Assisted Solution

strung earned 800 total points
ID: 40610768
You could try TextExpander:  http://smilesoftware.com/TextExpander/index.html There is a free downloadable demo so you can find out if it will do what you want before you buy it.

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 63

Accepted Solution

☠ MASQ ☠ earned 1000 total points
ID: 40610770
Automator - built into OSX will do this kind of thing but it does seem a particularly bad idea to both trust your credentials to a third party program and to store them in plain text on a device in a macro.  In fact as I'm writing this I think Apple have set Automator not to write to anything that looks like a password field because of this (although it's possible to switch off that protection).

In Windows I use AutoHotKey which needs some very basic programming but will do what you need. Same reservations apply!

In both OS' by necessity you'll have to run a background service to be ready for when you want to enable the function so there are resource implications.

The Logitech board BTW actually stores the keystrokes in a Windows file, I was thinking more of something like the top-of-the-line Razer's and Roccats that have their own flash ROM so you can unplug the board and take it to another machine and it will still "remember" the keystroke sequences (and believe it or not some people actually do that!).
LVL 30

Assisted Solution

by:Thomas Zucker-Scharff
Thomas Zucker-Scharff earned 200 total points
ID: 40616886
I saw this question and my immediate response was AutoHotkey (there is a MAC version, albeit not as robust, IMHO).  So I second MASQ's suggestion for AHK.

Author Comment

ID: 40620744
Thanks all.

I'm familiar with AutoHotkey, having used it in the past.  For whatever reason (can't recall the specifics since I'd run into a few issues on and off), I became uncomfortable with using it (developed paranoia about background logging) and stopped using it.

For reasons MASQ suggests, I wanted to avoid trusting my credentials to a free 3rd party program (not that a paid one  is a guarantee of security), hence the reason I was hoping to develop my own simple script (with your help of course!).

The basic idea would be to have a script which targets the active browser page and enters the necessary login info (I realize I'd need to define the right html elements on the target page) and to execute that script with a keyboard shortcut which calls a background service to execute the said script.  Presumably the background service would consume minimal resources given that all it would do would be to call my script.

From the above, it seems as though I'd need to duplicate this approach on both the Mac as well as Windows sides of my MBP but that shouldn't be a big deal.

Is this do-able? Or is my paranoia around AHK misplaced, and I should simply trust that it's not acting as a logger of some sort and use it on both the Mac and Windows side to solve my problem (I realize MASQ touched on this)?

Strung:  I tried taking a look at TextExpander (I'll most likely dig into it further as it seems quite powerful) but I'm running into some silly issues trying to view some of their instructional videos.  When I browse to their website and try to play one of their videos (to learn more about their app features) my Mac > Chrome (64bit) browser throws 'You must install the Quicktime browser plug-in to view this content'.  This led me into a whole series of other issues worthy of a separate question which I'll post later (tons of posts on Chrome 64 and QuickTime plug in issues).  I ended up using Safari to view some of the TextExpander tutorials.  Looks very promising just as a productivity app.  It appears to be a Mac-only app (I may still want to get it).  Do you have experience with a similar product for Windows which could use the same snippets used by TextExpander.  I get a bunch of hits looking for 'Text Expander for Windows' ... hard to tell they hype from what actually works well.

LVL 53

Assisted Solution

strung earned 800 total points
ID: 40621019
Sorry, I have never used anything similar on the Windows side. I don't know if Textexpander will work when running Windows under Parallels. It might if it runs on a system wide basis and treats Parallels as just another application. You could download the free demo and try it.

Author Comment

ID: 40653499
Thx Strung, I'll work with that.

I haven't been able to get back to this so I'll close this question off now.

Author Closing Comment

ID: 40653509
The experts provided well targeted help.  I will need to do more research and experimentation before I can properly implement (e.g. I don't know how to setup a background service to run the keystroke macros on the Mac as well as on the Windows side)

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Each password manager has its own problems in dealing with certain websites and their login methods. In Part 1, I review the Top 5 Password Managers that I've found to be the best. In Part 2 we'll look at which ones co-exist together and why it'…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question