Categories
Interior

How to Create App and Site-Specific Shortcuts with AutoHotkey

How to Create App and Site-Specific Shortcuts with AutoHotkey

Shortcuts allow us to be much more productive with our computers. At a press of a key combination, we have instant access to functions we’d otherwise have to hunt down on toolbars, menus, and submenus. However, not all apps come with shortcut keys, and even if they do, they may not do the things you want them to.

In this tutorial, we make use of AutoHotkey to write a simple script to enable different shortcuts depending on the active window’s name. This way, you can easily create keyboard shortcuts for almost every app.

Creating a basic script

If you haven’t installed AutoHotkey, download the installer and install it on your Windows computer.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Open your favorite file manager and create a folder to keep your autohotkey scripts. While inside the folder, right click and choose “New -> AutoHotkey Script,” then name your script.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Right-click on your script and choose “Edit.”

How to Create App and Site-Specific Shortcuts with AutoHotkey

Your AHK script will already be pre-populated with some recommended entries. Leave them as they are. Press Enter two or three times to leave some space between them and your script.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Enter the following if statement that will create our basic rule.

The second “#if” marks the end of our if statement. The “TYPE FILENAME” is a placeholder for values we’ll see next.

Get Window IDs with Window Spy

Let’s see how to add a custom function to our script that will only be active on Make Tech Easier’s page.

1. Add the following to your script:

How to Create App and Site-Specific Shortcuts with AutoHotkey

2. Save the changes and run your script by double-clicking on it. You’ll see a small message box appear. That’s how you create basic dialogs in AHK.

However, we’re using it because we need an AHK script active for easy access to AutoHotkey’s Window Spy. So, leave this messagebox active for now and turn your attention to AHK’s icon in the Windows tray.

How to Create App and Site-Specific Shortcuts with AutoHotkey

3. Right-click on AHK’s little green icon and choose Window Spy from its menu.

How to Create App and Site-Specific Shortcuts with AutoHotkey

4. Fire up your favorite browser and visit Make Tech Easier. Notice the top part of the information in Window Spy will show details about the active window. You need the “ahk_class,” “ahk_exe,” or “ahk_pid” to target a particular app. Let’s go with “ahk_exe” for our script. Since we’re using Firefox, Window Spy reports “ahk_exe firefox.exe.”

How to Create App and Site-Specific Shortcuts with AutoHotkey

5. Copy both ahk_exe and the executable’s name in one sweep, then return to your script. Change it so that it reads:

Replace “NAME” with part of the active page’s title – in our case, we use “make” from Make Tech Easier. Replace “TYPE FILENAME” with what you copied before from Window Spy – in our case, “ahk_exe firefox.exe.”

Add Shortcuts

Add m:: before “Msgbox, Done?” Your script should look like this:

How to Create App and Site-Specific Shortcuts with AutoHotkey

Nothing will happen if you rerun your script and press m on your keyboard. However, visit Make Tech Easier with Firefox, press m again, and a familiar message box will pop up. You just created a window-specific shortcut!

How to Create App and Site-Specific Shortcuts with AutoHotkey

Let’s turn the message box into something useful. Replace everything between the “ifs” to:

Rerun your script. Then, try to leave a comment under a post at Make Tech Easier. If you press Ctrl + B , you’ll see “I just copied X” appear in the reply box, where “X” will be the last thing you copied to the clipboard. You just remapped Ctrl + B to send the string “I just copied,” followed by the contents of the clipboard. Feel free to change it to anything you wish.

How to Create App and Site-Specific Shortcuts with AutoHotkey

AutoHotkey uses the following symbols to create shortcuts with their equivalent keys:

  • # for Windows
  • ^ for Control
  • ! for Alt
  • + for Shift

You can also use these symbols with the Send command, which sends a text string to the active window. You can use that to remap existing shortcuts to different keys. For example, to remap Windows + B to work as “Ctrl + C,” you could change your script to:

It’s also possible to define multiple shortcuts. However, you can’t add two functions to the same key combination unless they’re in individual if statements that target different windows.

To create shortcuts for different apps and windows:

  • Copy your script and rename it accordingly.
  • Replace the “NAME” and “TYPE FILENAME” with ones that match another app or window.
  • Enter your shortcuts, text expansion rules, and functions as we saw for the first script.

Now that you know how to create app shortcuts with AutoHotkey, find out how you can use AutoHotkey to automate almost anything in Windows.

Our latest tutorials delivered straight to your inbox

Hello everyone! I’m new here. I have downloaded AutoHotkey 1.1 for customizing my keyboard. I already have Microsoft Keyboard Layout Creator, but it’s a bit buggy and ignores some of my dead keys, so I’m trying to use AutoHotkey to patch the things that don’t work.

I have been reading the manual, but I just can’t get anything beyond the most simple two-key combinations to work. Can someone please help me. Here are some of the types of things I can’t figure out how to program:

1. If I turn on caps lock, then press shift and i simultaneously, and then press o I should get ơ. If I press space instead of o I should get ◌̛ (i.e. just a combining horn), or some other incompatible key, e.g. d, I should get ◌̛d.

2. I have already ¨ plus u producing ü, but if I press ´, then ¨ and then u, it should produce ǘ (U+01D8).

3. If I turn on caps lock, then press shift and

Re: Trying to create a custom keyboard layout

  • Report this post
  • @
  • Quote

AHK is very convenient and powerful to make hotkeys.
But, it has its own weakness(es).
It is a kind of temporary aspects.

For you, I’d like to recommend to use a more permanent way.
Make a “new” modifier key for yourself and use it, just like regular modifier key(s).
Such as, Ctlr/Alt/Win..

Try KeyTweak or SharpKeys etc..
(If you want, manipulate registry directly or use AHK ^^)

Now, you have your own “modifier” key.
So, making hotkeys is sooo convenient and powerful with AHK.
“MyModifier” + a : Your special character1
“MyModifier” + b : Your special character2
“MyModifier” + c : Your special character3
.
..
.
Be happy.

(For your reference, I do not have any Win keys nor Context key. These are sucks.)

Re: Trying to create a custom keyboard layout

  • Report this post
  • @
  • Quote

Re: Trying to create a custom keyboard layout

  • Report this post
  • @
  • Quote

Re: Trying to create a custom keyboard layout

  • Report this post
  • @
  • Quote

Re: Trying to create a custom keyboard layout

  • Report this post
  • @
  • Quote

Re: Trying to create a custom keyboard layout

  • Report this post
  • @
  • Quote

I’m afraid two modifier keys are not enough, even when combined with shift, etc. I need hotkeys for at least the following diacritics: double acute accent, double grave accent, middle tilde, horn, umlaut below, circumflex below, stroke, ogonek, dot below. And then the other groups I mentioned before: reversed letters, capital IPA, superscript characters, subscript characters, implosive consonants.
Theoretically they would probably all fit, but I want to group things logically so I can remember how to type which character. For example, if I use left win+a for ȁ, shift+left win+a for Ȁ, right win+a for ą, shift+right win+a for Ą, then how do I type ạ? I would have to use something illogical like left win+q.

I have been trying out my other idea with hotstrings, but I have found out there are some limits to it. First, it doesn’t differentiate between upper and lower case letters. I tried the code:
:*:¤Ldoublebar::Ⱡ
:*:¤ldoublebar::ⱡ
But both “¤Ldoublebar” and “¤ldoublebar” produces Ⱡ. Secondly, it doesn’t handle combining diacritics well. U+0335 (combining short stroke overlay) comes out as an _ instead, and with other diacritics, it places a space before the diacritic. Now I tried using the Unicode number like you did (thanks!) like this:
:*:¤shortbar::
Send,
Return
And it sends the correct thing. However, this doesn’t work if the text cursor is immediately to right of some characters. For example, if I want j̵ then I’ll type “j¤shortbar”, but “¤shortbar” doesn’t get converted to anything because of the preceding j. If I place a space after the j, then the diacritic comes out, but I’ll have a space between it and the letter. >_

May we present: the keys to productivity.

By David Nield | Published Nov 12, 2020 3:42 PM

How to Create App and Site-Specific Shortcuts with AutoHotkey

Knowing the right keyboard shortcuts can make a big difference in how quickly you can get stuff done—and if the hotkeys you need aren’t available, it’s not difficult to create your own.

Whether you need to launch a specific application regularly, have a folder you need quick access to, or want to enable a particular tool, you can set up a keyboard combination to help.

But before you start experimenting with new Windows shortcuts, it’s a good idea to learn the ones that already exist. You might find that what you’re looking for is already available, but you’ll also ensure your new combos don’t duplicate those that are already set up.

We’ve previously covered some of our favorite picks, from Win+D to show or hide the desktop to Ctrl+W to close windows and tabs, but Microsoft also has a comprehensive list of shortcuts for you to refer to.

Feel like an expert now? Good. It’s time to make your own.

Create keyboard shortcuts with Windows

Building a new keyboard shortcut to a program, file, or folder in Windows is easy. In File Explorer, right-click on whatever you want to open with your keyboard combination, and choose Create shortcut.

A new icon will appear, which is the shortcut to the program, file, or folder—it’s not a keyboard shortcut yet. It’s the sort of shortcut you’d find on your desktop, linked to an application or a folder deeper within the operating system. Double-clicking this new icon will open up whatever you’ve linked to.

The trick is that this newly created shortcut can be assigned a shortcut key as well. Right-click on it and choose Properties, then Shortcut. Click in the box marked Shortcut key, then press your choice of keys to assign them (they should appear in the box). Click OK to confirm your choice.

Pressing your new combination of keys will launch whatever file, folder, or program you selected, saving you a trip to the Start menu or the taskbar.

You need to be careful not to duplicate other key combinations from Windows, or the apps you use, as you won’t get a warning if there’s a duplicate—it’ll just do what it was originally assigned to do. You’ll also need to use a couple of modifier keys (Shift, Ctrl, or Alt) in your combination to tell Windows that you want to activate a shortcut—you can’t just hit “s” and have Spotify launch itself, for example.

Create keyboard shortcuts with third-party programs

A handful of third-party programs will help you create custom keyboard shortcuts for Windows. WinHotKey is an older one, but it’s easy to use, still works fine on Windows 10, and won’t cost you anything.

With the program loaded on screen, click New Hotkey to configure your new shortcut. The next screen will let you specify a key combination—which must include Shift, Alt, Ctrl, or the Windows key—and then associate an action with it. Each shortcut can open a file or a folder, or launch a program.

AutoHotKey is a newer, more advanced shortcut creator, and it’s also free to use. It requires a bit more investment in terms of time and thought, but it lets you create more complex shortcuts for typing out fragments of text (like typing “tks” to tell someone “thanks a lot,”) and putting messages on screen (like a dialog box with the date), as well as launching specific apps, files, and folders.

You’ll need to create scripts by right-clicking on the desktop and choosing New, then AutoHotKey Script. These contain the code necessary for your shortcuts to work on Windows in response to your key presses, like making sure the “run” command launches programs and the “send” command types text.

Don’t worry if this sounds overwhelming—when you use AutoHotKey for the first time, you’ll be met with a brief tutorial that will guide you through some basic scripts. All the documentation you’ll need is also available online.

It doesn’t take long to grasp the basics, and once you do, you’ll be able to conduct a whole host of actions with just your fingers and keys.

Create keyboard shortcuts from inside your applications

You can add even more personalized keyboard shortcuts within many of the applications you use regularly. This option won’t be available in every program, but quite a few apps offer it, so it’s worth checking.

Microsoft Word, for example, includes the feature. With a document open in Word, choose File, Options, Customize Ribbon, and then Customize (next to “Keyboard shortcuts”) to start adding new ones. Use the Save changes in box to keep new shortcuts specific to a document or template, or just leave the default Normal.dotm value there to apply your changes to all future documents based on the default template.

You’ll see a list of commands available in Word, and creating keyboard shortcuts for them is as simple as selecting them from the list and hitting your preferred combination of keys. If the shortcut is already linked to a command, Word will tell you with a popup dialog box that also lets you disable existing shortcuts and add new ones.

Adobe Photoshop is another program that lets you customize keyboard shortcuts. Open the Edit menu and choose Keyboard Shortcuts to get started, or make use of the keyboard shortcut for the Keyboard Shortcuts dialog—it’s Alt+Shift+Ctrl+K.

You can set shortcuts for menu items, opening panels in the interface, and switching to specific tools—just select one of these entries in the list on screen, then click Add Shortcut, and press your chosen key combination. If you pick a shortcut that already exists, Photoshop will warn you (and switch the shortcut, if you want it to).

How to Create App and Site-Specific Shortcuts with AutoHotkey

David Nield is a freelance contributor at Popular Science, producing how to guides and explainers for the DIY section on everything from improving your smartphone photos to boosting the security of your laptop. He doesn’t get much spare time, but when he does he spends it watching obscure movies and taking long walks in the countryside.

Speed up your workflow and get rid of repetitive tasks

Want to know how to create keyboard shortcuts to do anything on Windows 10? This guide will help. Surprisingly, it’s quite easy to create a quick keybind that can open programs, perform repeatable tasks, and speed up your workflow.

I’ll suggest a number of different options you can use to make keyboard shortcuts and provide some examples of how you can use them to their max potential.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Open Programs Quickly

I can see this shortcut option being useful for a large number of Windows 10 users. It’s quick and easy to set it up so that a quick shortcut can open any executable file. Here’s how to do it.

First, download the WinHotKey program from Directedge. It’s free to use. It’s a bit old, but it works and it’s clean. Once downloaded, go through the installer wizard, then launch WinHotKey. In WinHotKey, click New HotKey in the top left.

How to Create App and Site-Specific Shortcuts with AutoHotkey

In the new window that appears, give the hotkey a name. After, choose what combination you’d like to trigger the shortcut. For example, I chose to do Windows+F2. After, you can click the Browse option to find the location of the executable you’d like to open.

Alternatively, you can just copy and paste the location. WinHotKey will automatically grab the application icon so that you are given visual context about it. You can now open your program with the hotkey you’ve specified.

You must make sure that your keyboard shortcut doesn’t conflict with any existing shortcuts, either Windows defaults or from within the WinHotKey interface. For example, Alt+F4 couldn’t be used. It’s best to stick to Windows + ’X’ combinations to avoid conflicts.

Automatically Type Text

How to Create App and Site-Specific Shortcuts with AutoHotkey

If you consistently type the same sentences or words, you can automate it with WinHotKey too. To do this, click New Hotkey in WinHotKey, then click the drop down box under I want WinHotKey to: and select Type some text.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Now, type or paste the text into the box at the bottom of the new hotkey window. Finally, make sure to choose a new keyboard shortcut you haven’t used before.

There isn’t a limit on how many characters you use with this shortcut, but if there is a line break in anything you paste, it will end there. So, it’s best for copying single paragraphs, things like hashtags for Instagram or social links for YouTube descriptions.

Open Folders and Documents in Windows 10

How to Create App and Site-Specific Shortcuts with AutoHotkey

WinHotKey can also be used to quickly open specific folders and documents within Windows 10. You can simply select the Open a Document or Open a Folder options under the I want WinHotKey to: dropdown box and then follow the same steps as above.

This time though, you’ll need to browse to a specific file or application. If you choose the open document option, most documents will work, so long as you have a supporting application defaulted to open those kinds of files. From my testing, I could get Photoshop, office apps like Excel, PDF files, and text files.

If a file didn’t work, Windows 10 will ask you to choose a default application for that file type, and then future hotkeys with that file type would then also work.

Use Autohotkey for Emojis

AutoHotkey is another application for Windows 10 that can help you to create more complex keyboard shortcuts. This software can be used to automate a large number of different tasks. You can download Autohotkey from their website for free.

Once you’ve downloaded it, extract the file to a memorable location. Then, in the directory, double click an .ahk file, then when asked, choose to browse what application should be used to open such files. Next, browse and navigate to AutoHotkeyU64. This will allow you to run AutoHotkey scripts by double clicking them.

How to Create App and Site-Specific Shortcuts with AutoHotkey

It’s very easy to use emojis on a smartphone, but there isn’t any easy way to do this on a computer by default. With Autohotkey, you can set up a number of emoji shortcuts. Here’s how to do it.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Creating a hotkey extension can be quite complex, but thankfully there are dozens of great autohotkey scripts on the internet. For creating emojis, we’d suggest this one.

On the page shared above, click the Raw button to be taken to a raw text file. Next, press Ctrl+A to select the entire code. Then press Ctrl+C to copy it all. After, open a Notepad file and paste the code there.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Now, click File in Notepad, then click Save as. Navigate to the directory you extracted Autohotkey. Next, click the Save as type drop down box and select All files. Now, name it Emoji.ahk and click Save.

To use this hotkey script, you’ll need to double click it each time you start your PC. After, you can type emoji codes like :smiley: to automatically use emojis. At any time, you can refer back to the Github link above to see which codes are used for each emoji.

More Advanced Autohotkey Scripts

The potential for more advanced Autohotkey scripts is quite impressive. You can read up on some of the best scripts here. Some examples include the following:

  • Magnify the screen with keybinds
  • Use mouse gestures
  • Drag windows easily
  • Quickly access your favorite folders
  • View upload/download speed via a small on-screen overlay

Summary

I hope that this guide on using Windows keyboard shortcuts has been useful. Did you learn anything? I hope so. Did you struggle with any of the suggestions in this guide? If so, send me a Tweet and I’ll be happy to help out as soon as possible.

Ollie stumbled upon writing online whilst participating in a mobile network forum back in 2011. Since then, he has developed an incredible passion for writing about all sorts of tech from smartphones, PC hardware, software, and everything in between. Read Ollie’s Full Bio

I use a Dvorak keyboard. Shortcuts like ctrl+x , ctrl+c , and ctrl+v are hard to use, so is there any way to remap them to ctrl+q , ctrl+j , and ctrl+k respectively, using AutoHotKey? Thanks!

  • keyboard-shortcuts
  • shortcut
  • autohotkey
  • dvorak

How to Create App and Site-Specific Shortcuts with AutoHotkey

2 Answers 2

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

It is straightforward indeed, only to achieve the effect you want, you need to code it the opposite way:

It translates to :: . Just be aware you may create a conflict, if some application happens to have these shortcuts defined.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Yes, this is pretty straight forward.

Note, this does not alter the behavior of the original shortcuts. To do that you would have to remap those as well. For more information, look at “remap keys or mouse buttons” in the help file. It also describes a method for remapping keys somewhat more directly from the registry.

    The Overflow Blog

Related

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

  • Blog
  • Facebook
  • Twitter
  • LinkedIn
  • Instagram

Site design / logo © 2022 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2022.9.16.42980

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Customize keyboard shortcuts – excel 2016 Microsoft, Customize the keyboard shortcuts in Microsoft Office without changing the existing ones. Here’s how to set your own hotkeys for any MS Office In Microsoft Word 2016, you can change the keyboard shortcuts. A keyboard shortcut is a combination of keys that you press to give a command. For example, pressing Ctrl+P opens the Print window; pressing Ctrl+S gives the Save command. If you don’t like a keyboard shortcut in Word, you can change it and invent a keyboard shortcut of your own. Change keyboard shortcuts in Microsoft Excel 2016 in Windows , Hi Guys, Tearing my hair out – how can i customize my keyboard shortcuts in Excel 2016 – microsoft version, so i can quick print by using the Better yet, it’s built right in to Excel, and it’s called the Quick Access Toolbar! Learn how to customize it with your favorite shortcuts and turn them in to easy hotkeys .

Change keyboard shortcuts in Microsoft Excel 2016 in Windows , In Microsoft Word 2016, you can change the keyboard shortcuts. A keyboard shortcut is a combination of keys that you press to give a command. For example, pressing Ctrl+P opens the Print window; pressing Ctrl+S gives the Save command. If you don’t like a keyboard shortcut in Word, you can change it and invent a keyboard shortcut of your own. Hi Guys, Tearing my hair out – how can i customize my keyboard shortcuts in Excel 2016 – microsoft version, so i can quick print by using the How to Customize Keyboard Shortcuts in Word 2016, Better yet, it’s built right in to Excel, and it’s called the Quick Access Toolbar! Learn how to customize it with your favorite shortcuts and turn them in to easy hotkeys How do you customize Excel 2010 keyboard shortcuts? (5 answers). Closed 2 years ago. In Excel 2016, I would like to change the keyboard .

How to Customize Keyboard Shortcuts in Word 2016, Hi Guys, Tearing my hair out – how can i customize my keyboard shortcuts in Excel 2016 – microsoft version, so i can quick print by using the Better yet, it’s built right in to Excel, and it’s called the Quick Access Toolbar! Learn how to customize it with your favorite shortcuts and turn them in to easy hotkeys Create Keyboard Shortcuts for your Favorite Excel Commands , How do you customize Excel 2010 keyboard shortcuts? (5 answers). Closed 2 years ago. In Excel 2016, I would like to change the keyboard Re: Customize keyboard shortcuts – excel 2016 Microsoft wow – this is definitely beyond my capabilities but thanks for the effort. Maybe it can work for others. .

Create Keyboard Shortcuts for your Favorite Excel Commands , Better yet, it’s built right in to Excel, and it’s called the Quick Access Toolbar! Learn how to customize it with your favorite shortcuts and turn them in to easy hotkeys How do you customize Excel 2010 keyboard shortcuts? (5 answers). Closed 2 years ago. In Excel 2016, I would like to change the keyboard Customize keyboard shortcuts – Word, Re: Customize keyboard shortcuts – excel 2016 Microsoft wow – this is definitely beyond my capabilities but thanks for the effort. Maybe it can work for others. Here are the best ways to create custom keyboard shortcuts. By Ben Stegner Feb 25, 2016 While Microsoft Word lets you customize your own keyboard shortcuts, Excel doesn’t offer the functionality to override standard .

Customize keyboard shortcuts – Word, How do you customize Excel 2010 keyboard shortcuts? (5 answers). Closed 2 years ago. In Excel 2016, I would like to change the keyboard Re: Customize keyboard shortcuts – excel 2016 Microsoft wow – this is definitely beyond my capabilities but thanks for the effort. Maybe it can work for others. Make Custom Excel Keyboard Shortcuts with Quick Access Toolbar ,

Matthew Guay is a veteran app reviewer and technology tip writer. His work has appeared on Zapier’s blog, AppStorm, Envato Tuts+, and his own blog, Techinch. Read more.

The Problem

Special characters can often be annoying to use. There are many different ways to insert special characters, and many programs have specific ways to insert them. For example, in Microsoft Word you can insert a special character from the Symbol button on the Insert tab in the ribbon.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Word also has specialized keyboard shortcuts for many of the common special characters. For example, you can insert the Registered Trademark symbol ® by pressing Alt+Ctrl+R.

How to Create App and Site-Specific Shortcuts with AutoHotkey

That’s a rather unwieldy shortcut, but it’s better than the default Windows shortcut for that symbol. If you open the Character Map and select the Registered Trademark symbol, you’ll see that you could enter the ® symbol by pressing Alt+0174. Now that’s a difficult shortcut to remember.

How to Create App and Site-Specific Shortcuts with AutoHotkey

The Solution

Thanks to AutoHotkey, we can solve this problem and make our own keyboard shortcuts for our favorite symbols. AutoHotkey is a great tool that we frequently mention here, but if you don’t already have it installed, download it at the link below and setup as normal.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Once AutoHotkey is running, you can right-click it’s icon in the tray and select Edit This Script to add your special character shortcut to your script.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Adding a Special Character Hotkey

Here’s what you need to enter in your AutoHotkey script to create a shortcut for your special character. This will let you press Alt+ the character of your choice to enter a special character. Substitute your_hotkey with the character you want to use as your shortcut, and your_special_character with the special character you want to input.:

To find the special character you need to enter, open the Character Map in Windows, find the character, and then select Copy. Now paste this instead of Your_special_character.

How to Create App and Site-Specific Shortcuts with AutoHotkey

For Example, we want to enter the degrees symbol by pressing Alt+o. So, we entered the following in AutoHotkey:

Press Save in Notepad, and then reload the AutoHotkey script from the taskbar.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Now, we can simply press Alt+o to enter °. Entering the temperature just got easier!

You can substitute ! for ^ if you’d like to use Ctrl instead of Alt for your shortcuts. Note also that many programs have keyboard shortcuts using Ctrl and Alt, and even many default Windows shortcuts such as Cut and Paste use Ctrl, so make sure to not make a shortcut that overrides these.

Here’s some scripts for common special characters we wanted to use this with. Note that you can have as many of these in one script file as you like.

Cent:

Euro:

Registered Trademark:

ñ:

Conclusion

This is a super simple thing I am trying to get my head around

I want to use something like WINKEY + ALT + C to paste ** – words** so that I can sign-off my posts or whatever using the three-key combo

How to Create App and Site-Specific Shortcuts with AutoHotkey

2 Answers 2

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

Not sure what exactly you want, maybe something like this?

Press WINKEY + ALT + C to paste the clipboard contents:

Press WINKEY + ALT + C to paste “Some random text”

Instead of Sendinput which will type each characters you can use a clipboard paste approach. See for example https://github.com/tdalon/ahk/blob/59a8ab2a8fd497b4a5b5a85e73e32ff95d5d4425/Lib/Clip.ahk

How to Create App and Site-Specific Shortcuts with AutoHotkey

    The Overflow Blog

Related

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

  • Blog
  • Facebook
  • Twitter
  • LinkedIn
  • Instagram

Site design / logo © 2022 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2022.9.16.42980

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

You can customize keyboard shortcuts (or shortcut keys) by assigning them to a command, macro, font, style, or frequently used symbol. You can also remove keyboard shortcuts. You can assign or remove keyboard shortcuts by using a mouse or just the keyboard.

Use a mouse to assign or remove a keyboard shortcut

Go to File > Options > Customize Ribbon.

At the bottom of the Customize the Ribbon and keyboard shortcuts pane, select Customize.

In the Save changes in box, select the current document name or template that you want to save the keyboard shortcut changes in.

In the Categories box, select the category that contains the command or other item that you want to assign a keyboard shortcut to or remove a keyboard shortcut from.

In the Commands box, select the name of the command or other item that you want to assign a keyboard shortcut to or remove a keyboard shortcut from.

Any keyboard shortcuts that are currently assigned to that command or other item appear in the Current keys box, or below the box with the label Currently assigned to.

To assign a keyboard shortcut do the following:

Begin keyboard shortcuts with CTRL or a function key.

In the Press new shortcut key box, press the combination of keys that you want to assign. For example, press CTRL plus the key that you want to use.

Look at Current keys (or Currently assigned to) to see whether the combination of keys is already assigned to a command or other item. If the combination is already assigned, type a different combination.

Important: Reassigning a combination of keys means that you can no longer use the combination for its original purpose. For example, pressing CTRL+B changes selected text to bold. If you reassign CTRL+B to a new command or other item, you will not be able to make text bold by pressing CTRL+B unless you restore the keyboard shortcut assignments to their original settings by selecting Reset All at the bottom of the Customize Keyboard dialog box.

Note: If you use a programmable keyboard, the key combination CTRL+ALT+F8 might already be reserved for initiating keyboard programming.

Remove a keyboard shortcut

In the Current keys box, select the keyboard shortcut that you want to remove.

Use just the keyboard to assign or remove a keyboard shortcut

Press ALT+F, T to open the Word Options dialog box.

Press DOWN ARROW to select Customize Ribbon.

Press the TAB key repeatedly until Customize is selected at the bottom of the dialog box, and then press ENTER.

In the Categories box, press DOWN ARROW or UP ARROW to select the category that contains the command or other item that you want to assign a keyboard shortcut to or remove a keyboard shortcut from.

Press the TAB key to move to the Commands box.

Press DOWN ARROW or UP ARROW to select the name of the command or other item that you want to assign a keyboard shortcut to or remove a keyboard shortcut from.

Any keyboard shortcuts that are currently assigned to that command or item appear in the Current keys box, or below the box with the label Currently assigned to.

To assign a keyboard shortcut do the following:

Begin keyboard shortcuts with CTRL or a function key.

Press the TAB key repeatedly until the cursor is in the Press new shortcut key box.

Press the combination of keys that you want to assign. For example, press CTRL plus the key that you want to use.

Look at Current keys (or Currently assigned to) to see whether the combination of keys is already assigned to a command or other item. If the combination is already assigned, type a different combination.

Important: Reassigning a combination of keys means that you can no longer use the combination for its original purpose. For example, pressing CTRL+B changes selected text to bold. If you reassign CTRL+B to a new command or other item, you will not be able to make text bold by pressing CTRL+B unless you restore the keyboard shortcut assignments to their original settings by selecting Reset All at the bottom of the Customize Keyboard dialog box.

Press the TAB key repeatedly until the Save changes in box is selected.

Press DOWN ARROW or UP ARROW to highlight the current document name or template in which you want to save the keyboard shortcut changes, and then press ENTER.

Press the TAB key repeatedly until Assign is selected, and then press ENTER.

Note: If you use a programmable keyboard, the key combination CTRL+ALT+F8 might already be reserved for initiating keyboard programming.

To remove a keyboard shortcut

Press the TAB key repeatedly until the Save changes in box is selected.

Press DOWN ARROW or UP ARROW to highlight the current document name or template in which you want to save the keyboard shortcut changes, and then press ENTER.

Press the SHIFT+TAB key repeatedly until the cursor is in the Current keys box.

Press DOWN ARROW or UP ARROW to select the keyboard shortcut that you want to remove.

Press the TAB key repeatedly until Remove is selected, and then press ENTER.

August 22, 2020 6 minute read

I decided to try out the new Windows Terminal to see how it compared to ConEmu, which is my usual console. The recommended way to get the Windows Terminal is to download it from the Microsoft Store so that it can automatically update itself as new versions are released.

While the Windows Terminal is not as mature and feature rich as ConEmu, I did enjoy it, and it’s being actively worked on with plenty of features coming down the road. I’d also recommend following Scott Hanselman’s post about how to make it look nicer.

One feature I missed right away was ConEmu allows you to set a keyboard shortcut to put it in focus. As a software developer, I’m constantly in and out of the terminal, and being able to get to it in a keystroke is very convenient.

Method 1: Pin Windows Terminal to the taskbar

The easiest way to get to the Windows Terminal using a keyboard shortcut is to pin it to the taskbar. Not only does it make it easy to click on with the mouse, but you can also use the Windows Key + [number] keyboard shortcut to launch it or put it in focus.

For example, if on your taskbar from left to right you have: Edge, Chrome, Windows Terminal, then you could use Windows Key + 3 to launch the Windows Terminal, or put it in focus if it’s already open. Similarly, Windows Key + 1 would launch Edge, and Windows Key + 2 would launch Chrome.

This is a simple solution and it works, but the reason I’m not a fan of it is:

  1. If I reorder the windows on the taskbar then the keyboard shortcut changes.
  2. This method only works for the first 10 items on the taskbar. i.e. you can’t do Windows Key + 11 .
  3. I find it awkward to use the Windows Key with any numbers greater than 4.

So let’s continue exploring other options.

Method 2: Launch Windows Terminal from the command line

The Windows Terminal is installed as a Microsoft Store app, so the location of the executable isn’t very obvious, and it is likely to change every time the app is updated. This can make launching it via other applications or scripts tough. Luckily, I found this wonderful post describing how to launch Microsoft Store apps from the command line.

From there, I was able to track down that you can launch the Windows Terminal store app using:

Update: It turns out you can also simply run wt from the command line to launch the Windows Terminal, as wt.exe gets added to the Windows PATH when the Windows Terminal is installed.

Now that we know how to launch it from the command line, you can use this from any custom scripts or application launchers you might use. This is in fact what I show how to do from AutoHotkey further below.

While this command allows us to launch Windows Terminal, it doesn’t allow us to put it in focus if it’s already open, so let’s continue.

Method 3: Launch Windows Terminal via a custom keyboard shortcut

The above post mentions that you can simply navigate to shell:AppsFolder , find the Windows Terminal app, right-click on it, and choose Create shortcut . This will put a shortcut to the application on your desktop, and like any shortcut file in Windows, you can right-click on it, go to Properties , and assign it a Shortcut key that can be used to launch the application.

While this will allow you to launch the Windows Terminal with a custom keyboard shortcut, like the previous method, it opens a new instance of the Windows Terminal every time, which isn’t what I want, so let’s continue.

Method 4: Switch to Windows Terminal via keyboard shortcut and AutoHotkey

To use a custom keyboard shortcut to both launch the Windows Terminal, as well as simply switch to the Windows Terminal window if it’s already open, I use AutoHotkey. I’ve blogged about AutoHotkey in the past, and if you’ve never used it you really should check it out.

In a new or existing AutoHotkey script, you can define this function and hotkey:

The last line in the script defines the keyboard shortcut and has it call the function.

Here I’m using Ctrl + Shift + C (^+c) for my keyboard shortcut, but you could use something else like Windows Key + C (#c) or Ctrl + Alt + C (^!c). Check out the AutoHotkey key list for other non-obvious key symbols.

You may have also noticed in the code that if the window is already in focus, we minimize it. This allows me to easily switch to and away from the Windows Terminal using the same shortcut keys. Using Alt + Tab would also work to switch back to your previous application.

Finally, the line that actually launches the Windows Terminal is:

If you want the Windows Terminal launched as an elevated command prompt (i.e. as Admin), then you need to add *RunAs , like this:

Also, if you haven’t already, you’ll want to follow these steps to digitally sign your AutoHotkey executable to allow AutoHotkey scripts to be able to interact with applications running as Admin. Without this, the AutoHotkey script will not be able to minimize the Windows Terminal.

Getting the AutoHotkey script running

If you’ve never used AutoHotkey before and want to get this working, all you need to do is:

  1. Install AutoHotkey
  2. Create a new text file with a .ahk extension
  3. Copy-paste the above script into the file
  4. Double click the file to run it.

Once that’s done, you should be able to use your keyboard shortcut to switch to Windows Terminal.

You’ll also likely want to have your script startup automatically with Windows so that you don’t have to manually run it all the time. This is as easy as dropping the .ahk file (or a shortcut to it) in your shell:Startup directory. Windows will automatically run all files in this directory every time you log in.

For more detailed instructions and information, see this post

Conclusion

As a software developer, I’m constantly in and out of the terminal for running Git and PowerShell commands. If you’re ok simply pinning Windows Terminal to the taskbar in a dedicated position and don’t mind the preset keyboard shortcut, then roll with that. For myself, using AutoHotkey I can now use Ctrl + Shift + C to switch to and away from the Windows Terminal at anytime, no matter what other application currently has focus, and not having to reach for the mouse.

Shameless Plug: You can also checkout my open source project AHK Command Picker that allows you to use a GUI picker instead of having to remember a ton of keyboard shortcuts.

I hope you’ve found this information helpful.

Thanks Mike! Super interesting; I googled it and it seems there’s no landing page for it (was looking for documentation / manual). I’m wondering if it has the ability to keyboard map to the following commands:
– View Entire Movie
– Remove Timeline Markers (Add Timeline Marker already exists as a keyboard shortcut)
– Add Clip Marker (Remove Clip Markers already exists as a keyboard shortcut)

There’s nothing to Google. Simply download the ZIP archive in the OP of that thread and you’ll get the small executable program and a PDF of the included commands.

From what I can see, it’s just keystroke macros with no ability to add mouse macros. At least everything seems to work in PD18 except for the ctrl+space command which is supposed to roll back 5 seconds and resume playing

DS365 | Win10 Pro | Ryzen 9 3950X | RTX 2070 | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°

Thanks Mike! Super interesting; I googled it and it seems there’s no landing page for it (was looking for documentation / manual). I’m wondering if it has the ability to keyboard map to the following commands:
– View Entire Movie
– Remove Timeline Markers (Add Timeline Marker already exists as a keyboard shortcut)
– Add Clip Marker (Remove Clip Markers already exists as a keyboard shortcut)

If you’ve Googled it you probably know it uses AutoHotkey. I actually downloaded it and used it to modify the PDspeed executable to take account of some command changes between PD9 and PD13. However I’m sure Optodata is right that it can’t be used to mimic mouse actions [edit] although on further reading the description of its features in the Wiki article does include ’emulate . . . . . mouse clicks and movements'[/edit]. It’s power comes from the ability to string a number of commands together under one keystroke. I haven’t looked into the operations you’ve listed so I don’t know if they could be actioned by combining a string of commands.

This message was edited 1 time. Last update was at Jun 14. 2020 16:51

Home-build system:
Intel Core i5 Quad Core 3.3GHz, 2 x 4GB DDR3 1333MHz,
Asus Nvidia GT440 1GB, 2 x Western Digital WD10EARS 1TB, 1 x Seagate ST1000DM010 1TB,
Windows 7 Prof 64-bit, PD 9 Ultra 64, PD 13 Ultimate 64

To be clear I was commenting on what the PDSpeed app seemed to do, not on whether or not the AutoHotKey app could record mouse activities. If it can capture those, then it may allow some of the desired functionality to be added.

One problem with that approach is that it will assume that the needed controls will always be in a predictable absolute position on the screen (or in the same relative position if the cursor is used for the reference point), and I’m not sure that PD will play along.

For example, I often don’t see the View Entire Movie button displayed at all, regardless of my timeline content or zoom level. If a macro is expecting the button to always be visible (and clickable) and it’s not there, the macro can’t work correctly.

DS365 | Win10 Pro | Ryzen 9 3950X | RTX 2070 | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°

There are a number of more or less sophisticated macro builders out there that can capture or build mouse movements, keyboard presses and releases, delays etc. Some also allow .exe files to be compiled.

I just used a trial version to manually build up (as opposed to capturing) a simple macro to rt click the mouse, press the Down key 3 times and the Enter key once.

That mimics the steps to Remove all timeline markers. Assigned to hotkey Alt-M. It works very effectively.

However, as Optodata has pointed out, the starting point must be the cursor at the correct location on the timeline marker rule for the rt click to call the drop down menu. If it is at a different location the macro will do nothing, or something,, but not remove the timeline markers!

Mouse position can be set in a number of ways, absolute screen co-ordinates, relative to last position, within a window etc. but since the screen layout of PDR can vary according to user needs, then in practice the macro is of limited use.

That problem will be a difficult one to solve with standard macro builders, I think.

We’ve all been there—trying to do something else while we’re supposed to be working for the man. Sure, they are paying us, but can’t we get a little break every now and then?

There are dozens of “Boss Key” applications out there that hide windows with a simple keystroke whenever the boss walks by, but most of them aren’t tailored very well to your own situation—or just aren’t customizable enough for my tastes—so I set about to create the perfect boss key with AutoHotkey. By the end of this guide, you should be able to make your own custom boss key that does exactly the kind of hiding you want.

We’re not actually advocating that you slack off at work, trick your boss, or do anything that goes against your employer’s policies to the extent that you get you sent home with a pink slip. Whether a little relaxation break is okay or not, sometimes you still want to keep your relaxation to yourself.

Getting Started

How to Create App and Site-Specific Shortcuts with AutoHotkey

Step in style
Included in this sale are some very on-trend marble and tie-dye varieties, from black and white to sorbet pastels. Text your mom: she’s gonna want a pair.

Before you can get started creating your own awesome boss key, you’ll need to make sure that you’ve got AutoHotkey installed somewhere, and you might want to check out our beginner’s guide for a little background on how it all works. If your workplace doesn’t allow you to install software, you can create your script on another computer and turn it into a portable EXE file you can carry on your thumb drive.

Turn Any Action Into a Keyboard Shortcut: A Beginner’s Guide to AutoHotkey

We waste a ton of time every day clicking through menus and typing repetitive text. AutoHotkey is…

Once you have your environment up and running, create a new AutoHotkey script by clicking File –> New or right-clicking your desktop or inside an Explorer window and selecting New -> AutoHotkey Script, and then paste in the following starter script:

#InstallKeybdHook
#Persistent
#HotkeyInterval,100
#NoEnv
SetKeyDelay, –1
SetTitleMatchMode, 2 ; Makes matching the titles easier
SendMode Input
SetWorkingDir %A_ScriptDir%

All of that may look daunting, but it’s just boilerplate code that sets everything up, so you don’t really need to worry about it. Then you’ll want to add the following two blocks to the file, which give you one hotkey to hide everything, and another to restore it all. For the purposes of this article, we’ll use F6 to hide everything, and F7 to show the windows again. I’d recommend making the hide key something easier to hit, and keep the show key further away.

F7::
<
; put the functions to show everything again here
Return
>

In AHK, the semi-colon (;) indicates commented code, so, as you can see above, we’re just explaining what will happen when the user hits F6 or F7. Below, we’ll fill in that functionality. Now that we’ve got the template script together, let’s customize our script and hide some windows.

Hide Windows or Just Minimize Them

Most of the point of using a boss key is to hide whatever you are looking at, but that doesn’t always mean you need to completely hide the window; if nobody looks that closely at your open windows, or you keep your taskbar hidden, minimizing might be fine. You can either use the WinHide or WinMinimize AHK functions depending on which action you want to take.

To simply minimize a window, you can use the WinMinimize function followed by a part of the window title. For example, let’s say you may have VLC open to catch a few minutes of the video podcast you downloaded last night. To minimize your VLC window, you can add the following line into your function:

The line is fairly self-explanatory: You are simply telling AutoHotkey to minimize the window whose title matches that string of text. If you wanted to hide the window instead, you’d use:

The problem with hiding windows is that they are really completely hidden, so you will be forced to create another hotkey to show the window again, or you’ll have to kill the process from task manager if you want to close it.

To show the window again, paste the following to the show window block:

DetectHiddenWindows, On
WinShow, VLC media player

The first line tells AHK to also check for windows that are hidden, and the second line tells Windows to unhide the window.

Pause Your Media Player

Depending on your media playing application, you might have a number of ways to pause it. If you can assign a global hotkey—like your keyboard’s media pause key—you can simply add that shortcut to your boss key using the Send function , which can send keystrokes to the active window, like so:

There’s a whole list of special keys that you can use instead, but if your favorite media application has command line arguments, you can also use the Run function to launch the application with pause switches instead.

Switch to “Work Application”

To complete the boss key hiding effect, you can’t just hide the windows you shouldn’t have sitting open—a good boss key works best when you also switch over to whatever work application you are supposed to be using. If you are a programmer, like yours truly, nobody can argue with you having your favorite text editor or IDE open on the screen.

Inside our “Show” function, we’ll need to add a line that switches back to the window we want to have on the screen. To accomplish this, we’ll use AutoHotkey’s WinActivate function, which makes another window the topmost one.

This function works just like the other ones, matching part of the title string, so you can customize it for whatever your work-safe application is.

Wrapping Up: Prepare Your Script

Once your script is finished up, you can package the script up into a single executable file that you can drop on a flash drive—especially helpful if your workplace doesn’t allow you to install AutoHotkey on the target machine. The first thing you’ll probably want to do is tell AutoHotkey not to show a tray icon, and run completely in the background. You’ll want to add the following near the beginning of the script—note that if you do want to kill the script after adding this line, you’ll have to do so from task manager.

Now you can right-click on the script, and choose to Compile it into an executable file, which you can then save on a flash drive, or use anywhere you want.

Here’s the full listing of the example script, which hides VLC when you press the F6 key, and shows it again when you press F7.

#InstallKeybdHook
#Persistent
#HotkeyInterval,100
#NoEnv
SetKeyDelay, –1
SetTitleMatchMode, 2 ; Makes matching the titles easier
SendMode Input
SetWorkingDir %A_ScriptDir%

F6::
<
; put the hiding windows stuff here
WinHide, VLC media player
Return
>

F7::
<
; put the functions to show everything again here
DetectHiddenWindows, On
WinShow, VLC media player
Return
>

Now that you’ve put together your own customized boss key, do you have any tips for the rest of the class? Tell us in the comments.

The How-To Geek uses his boss key to prevent nosy people from reading over his shoulder. His geeky articles can be found daily here on Lifehacker, How-To Geek , and Twitter .

How to Create App and Site-Specific Shortcuts with AutoHotkeySAS power users (and actually, power users of any application) like to customize their environment for maximum productivity. Long-time SAS users remember the KEYS window in SAS display manager, which allows you to assign SAS commands to “hot keys” in your SAS session. These users will invest many hours to come up with the perfect keyboard mappings to suit the type of work that they do.

When using SAS Enterprise Guide, these power users often lament the lack of a similar KEYS window. But these people needn’t suffer with the default keys — a popular tool named AutoHotkey can fill the gap for this and for any other Windows application. I’ve recommended it to many SAS users over the years, and I’ve heard positive feedback from those who have adopted it. AutoHotkey is free, and it’s lightweight and portable; even users with “locked-down” systems can usually make use of it.

AutoHotkey provides its own powerful scripting language, which allows you define new behaviors for any key combination that you want to repurpose. When you activate these scripts, AutoHotkey gets first crack at processing your keypress, so you can redirect the built-in key mappings for any Windows application. I’ll share two examples of different types of scripts that users have found helpful.

“Unmap” a key that you don’t like

In SAS Enterprise Guide, F3 and F8 are both mapped to “Run program”. A newer user found the F8 mapping confusing because she had a habit of using that key for something else, and so became quite annoyed when she kept accidentally running her process before she was ready.

The following AutoHotkey script “eats” the F8 keypress. The logic first checks to see if the running process is SAS Enterprise Guide (seguide.exe), and if so, it simply stops processing the action, effectively vetoing the F8 action.

Map a single key to an action that requires multiple keys or clicks

I recently shared a tip to close all open data sets in SAS Enterprise Guide. It’s a feature on the Tools menu that launches a special window, and some readers wished for a single key mapping to get the job done. Using AutoHotkey, you can map a series of clicks/keystrokes to a single key.

The following script will select the menu item, activate the “View Open Data Sets” window, and then select Close All.

You’ll see that one of the script commands activates the “View Open Data Sets” window. The window “class” is referenced, and the class name is hardly intuitive. AutoHotkey includes a “Window spy” utility called “Active Window Info” that can help you to find the exact name of the window you need to activate.

How to Create App and Site-Specific Shortcuts with AutoHotkey

AutoHotkey can direct mouse movements and clicks, but those directives might not be reliable in different Windows configurations. In my scripts, I rely on simulated keyboard commands. This script activates the top-level menu with Alt+”t” (for Tools), then “v” (for the “View Open Data Sets” window), then TAB to the “Close All” button, space bar to press the button, then Escape to close the window. Each action takes some time to take effect, so “Sleep” commands are inserted (with times in milliseconds) to allow the actions to complete.

Every action in SAS Enterprise Guide is accessible by the keyboard (even if several keystrokes are required). If you want to see all of the already-defined keyboard mappings, search the SAS Enterprise Guide help for “keyboard shortcuts.”

How to Create App and Site-Specific Shortcuts with AutoHotkey

Automate more with AutoHotkey

In this article, I’ve only just scratched the surface of how you can customize keys and automate actions in SAS Enterprise Guide. Some of our users have asked us to build in the ability to customize key actions within the application. While that might be a good enhancement within the boundaries of your SAS applications, a tool like AutoHotkey can help you to automate your common tasks within SAS and across other applications that you use. The scripting language presents a bit of a learning curve, but the online help is excellent. And there is a large community of AutoHotkey users who have published hundreds of useful examples.

Have you used AutoHotkey to automate any SAS tasks? If so, please share your tips here in the comments or within the SAS Enterprise Guide community.

About Author

How to Create App and Site-Specific Shortcuts with AutoHotkey

+Chris Hemedinger is the Director of SAS User Engagement, which includes our SAS Communities and SAS User Groups. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies.

6 Comments

Just want to confirm whether this software will be block by anti-virus software

How to Create App and Site-Specific Shortcuts with AutoHotkey

I’ve used this tool on several machines with no problems — antivirus software has never been an issue.

AHK is a very useful tool. So useful that I wrote a paper about it for SESUG last year!
http://analytics.ncsu.edu/sesug/2016/BB-150_Final_PDF.pdf
There’s also a repository on GitHub with sample AHK scripts (in the ‘sas’ folder).
https://github.com/srosanba/sas-autohotkey

How to Create App and Site-Specific Shortcuts with AutoHotkey

Excellent – thanks for sharing!

I am experiedned in PC/Linux SAS and recently switched to EG at my job.I can definitely say that SAS has made it worst for programmers and I am definitely getting Carpel tunnel syndrome.
PC SAS had so much customizations available to suit the requirements. in EG I cant even change the shortut to submit code. Cant even move windows around .
My company wont allow installing autohotkey. So, I am stuck with this now.
SAS needs to do serious development work to make EG more programmer friendly. Very Disaapointed with EG.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Many of your concerns are addressed in the most recent version, v8.2. You have complete control over the window positions (dock/undock, multiple displays, etc.). And you can map your keyboard shortcuts for many of the common functions. You can also simply Just Code — no need for a project or flow if you don’t want it.

If you’re looking to change key functions on your computer’s keyboard in Windows, these three methods can help.

How to Create App and Site-Specific Shortcuts with AutoHotkey

The standard Windows keyboard layout hasn’t changed much in the past few decades, but there’s a chance you don’t use every key on your keyboard. If you think the Caps Lock key would work better as something else, or wish you could open up Windows’ Task Manager with one keystroke, there are a few ways to remap those unused keys.

Remap Keys With SharpKeys

If you merely want to remap one key to another, SharpKeys (Opens in a new window) is a simple, open-source program that uses the Windows registry. As an example, I use SharpKeys to make my Alt key act as the Ctrl key, and my Caps Lock act as the Windows key.

Since SharpKeys writes this information directly to the Windows registry, it’s the best option for these kinds of one-to-one key remappings. You don’t have to rely on some other software as a middleman, and you’ll run into the fewest compatibility issues, since Windows itself is interpreting the keystrokes. Download the program (I recommend the portable zip version, which doesn’t require installation) and start it up.

To remap a key, click the Add button and choose your keys from the two columns. The left column denotes the key you’ll press (for example, the Caps Lock key) and the right column denotes the action that key will take (for example, acting as the Windows key). You can also press the Type Key button and press a key on your keyboard if you have trouble hunting it down in the list.

When you’re done, click OK. Repeat this process for any other remappings, then click the Write to Registry button. Close the program, restart your computer, and you should find your keys have taken on their new roles. You can even delete SharpKeys when you’re done; the program is merely a user-friendly interface for the Windows registry, so once the changes are made, you don’t need it anymore.

Customize Hotkeys With Your Keyboard’s Software

If your keyboard comes with advanced software, like Logitech’s Gaming Software (Opens in a new window) , Corsair’s iCUE (Opens in a new window) , or Razer’s Synapse (Opens in a new window) , you may have some key-remapping features already present on your system.

Not only can you remap keys, but many of these programs let you create multi-key shortcuts, insert blocks of text, or create different profiles for each of your games. Some will even let you “record” macros, allowing you to create complex shortcuts just by recording your actions and assigning them to a hotkey.

Each of these programs are a bit different, so we can’t go into all of them here, but the gist should be the same across manufacturers: download the software, select your keyboard, and look for the option to create new hotkeys, macros, or actions. When in doubt, check the support page for your specific keyboard, and you’ll find tutorials on how to get it done.

Your mileage may vary with these, as I’ve found certain programs to be jankier than others in the past. But if you already have it on your system, it may be able to do exactly what you want without installing any other software, so give it a shot.

Create Complex Scripts With AutoHotkey

If neither of the above options suit your needs, you can create powerful hotkeys with AutoHotkey (Opens in a new window) , a free program that comes with its own little scripting language for you to describe the actions you want your hotkeys to take. It’s a bit more difficult to use than the software you get with gaming keyboards, but if your keyboard doesn’t come with its own remapping program, it’s your next best bet.

After installing AutoHotkey, create your hotkeys by right-clicking anywhere in File Explorer and choosing New > AutoHotkey Script. Right-click on the resulting file and open it in Notepad.

Create basic hotkeys by adding a line like this:

This remaps Caps Lock to the right Windows key. You can add a comment above it using a semicolon (;) to remind you of what that hotkey does or why.

Again, SharpKeys is a better choice for a simple remapping like this, but let’s say you wanted to do something slightly more complicated, like remap Caps Lock to Ctrl + Shift + Esc, so you can see the Windows Task Manager with one keypress. You would create a line in your script like this:

Where ^ corresponds to Ctrl and + to Shift, as described here (Opens in a new window) .

This is where AutoHotkey becomes more powerful. You can create hotkeys to type certain lines of text (Opens in a new window) , run a program or batch file (Opens in a new window) , or create shortcuts for specific programs (Opens in a new window) . You can even have one hotkey perform multiple actions in a series, giving you robust control over your shortcuts.

Once you’ve finished adding your hotkeys to the script, save the file and double-click on it. This will launch AutoHotkey in the system tray, and it will run in the background interpreting your hotkeys for you. You can quit the program at any time to set your keys back to their default actions.

(I recommend adding your .ahk script to Windows’ startup folder, located at %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup, so it will automatically run every time you turn on your computer.)

There’s more to AutoHotkey than we could ever fit into one small article, so check out the AutoHotkey documentation (Opens in a new window) and forums (Opens in a new window) for more advanced instructions and ideas. If you can imagine it, there’s almost certainly a way to make AutoHotkey do it.

Like What You’re Reading?

Sign up for Tips & Tricks newsletter for expert advice to get the most out of your technology.

This newsletter may contain advertising, deals, or affiliate links. Subscribing to a newsletter indicates your consent to our Terms of Use and Privacy Policy. You may unsubscribe from the newsletters at any time.

Your subscription has been confirmed. Keep an eye on your inbox!

Is it possible to create custom keyboard shortcuts for text?

I was just asked by a user if his email address can be made into a keyboard shortcut since he’s a slow typer and has to type it in many places.

Preferably in Windows so it can be applied into any app.

Popular Topics in General Windows

This isn’t a keyboard shortcut, but I created a .bat file that copies the text into the Clipboard. All I then have to do is select where I want the text to go and paste it. It is useful for me when I have it insert large blocks of text.

All you have to do is create a .txt file that contains the text (in this case, the email address), and use the following in a .bat file:

7 Replies

ICT Solutions is an IT service provider.

In theory yes. However, keyboard shortcuts usually call up some sort of app or interface. So you might have to store the email address in something like that. Then have a script run that paste it wherever his cursor is.

There are custom macro programs you can run that will do what’s requested.

One solution for Windows machines is http://www.autohotkey.net/ (opensource).

* No warranties expressed or implied in the use of this 3rd party product 🙂

+1 GLOCVI on *No warranties. 🙂

This isn’t a keyboard shortcut, but I created a .bat file that copies the text into the Clipboard. All I then have to do is select where I want the text to go and paste it. It is useful for me when I have it insert large blocks of text.

All you have to do is create a .txt file that contains the text (in this case, the email address), and use the following in a .bat file:

I use ShortKeys

I’m going to have to look at AutoHotkey now. I’m using such an old version of Shortkeys (1.7).

This isn’t a keyboard shortcut, but I created a .bat file that copies the text into the Clipboard. All I then have to do is select where I want the text to go and paste it. It is useful for me when I have it insert large blocks of text.

All you have to do is create a .txt file that contains the text (in this case, the email address), and use the following in a .bat file:

This isn’t a keyboard shortcut, but I created a .bat file that copies the text into the Clipboard. All I then have to do is select where I want the text to go and paste it. It is useful for me when I have it insert large blocks of text.

All you have to do is create a .txt file that contains the text (in this case, the email address), and use the following in a .bat file:

This topic has been locked by an administrator and is no longer open for commenting.

To continue this discussion, please ask a new question.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

Snap! Edge News Feed scams, EU’s largest DDoS attack to date, SSDs vs HDDs, etc

Your daily dose of tech news, in brief. We’ve made it to Friday, everyone! I hope everyone has a great, fun, and relaxing weekend! But before you start checking out, let’s jump into today’s Snap! You need to hear this. Microsoft Edge’s News F.

How to Create App and Site-Specific Shortcuts with AutoHotkey

In depth story of industrial espionage, complete with social engineering

The bit about getting the “horse” planted reminded me of how vulnerable we all are to that kind of attack vector. Thank goodness my company doesn’t design jet engines!https://www.bloomberg.com/news/features/2022-09-15/china-wanted-ge-s-secrets-but-then-th.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Spark! Pro Series – September 16th, 2022

Summer has faded more and the march towards fall is nearly over. The days are shorter, the nights cooler, of course depending on where you live. The day is September 16th, the year is 1908 and, on this day, “Ge.

How to Create App and Site-Specific Shortcuts with AutoHotkey

2 factor authentication suggestions?

Hello, I work for a small business, and in order to become NIST compliant we are looking to implement 2 factor authentication. Have any of you gone through this process before? What resources or companies did you.

Windows 10 comes with the Xbox Game Bar feature that gives users easy access to useful features while gaming. The feature is enabled by default. Therefore, you can bring up the Xbox game bar by the following shortcut — Win + G. However, there are a few other keyboard shortcuts that you can use. Additionally, you can set custom keyboard shortcuts for the Xbox Game Bar. Thus you will not have to remember the default keyboard shortcuts for the Game Bar on Windows 10.

Of course, the custom keyboard shortcuts for Xbox Game Bar will work alongside the default Windows shortcuts. Hence you can use either of the two shortcuts to trigger the activity. In this tutorial, we’ll show you how to create and set a custom keyboard shortcut for Xbox Game Bar in Windows 10. Keep in mind that setting up custom keyboard shortcuts might interfere with other shortcuts you may have set up for other applications. Hence double-check that the shortcut isn’t similar to an existing keyboard shortcut on your Windows 10 machine. Nevertheless, without any further ado, let’s check out how to set custom keyboard shortcuts for Xbox Game Bar on Windows 10.

Set custom keyboard shortcuts for Xbox Game Bar

Follow the steps below to set your own shortcuts. Keep in mind that you cannot set a custom keyboard shortcut with the Win key. Therefore, you will have to use any of these three keys — Control, Shift, or Alt along with any other key.

How to Create App and Site-Specific Shortcuts with AutoHotkey

  1. Launch the Settings menu on your device
  2. running Windows 10.
  3. You should see an option labeled Gaming. Select Gaming and then make sure the feature is turned on. If not, simply turn it on by clicking on the Toggle switch.
  4. The custom keyboard shortcuts for Xbox Game Bar can be set under the Keyboard shortcuts option.
  5. Simply click on the empty field beside the action you want to set a custom keyboard for.
  6. You can use a single shortcut such as Alt + G or you can even combine Control + Alt + Shift along with any other key.
  7. After you have set up your custom keyboard shortcuts for Xbox Game Bar, scroll to the bottom of the list and click on Save.
  • Also read: 10 Google Chrome Keyboard Shortcuts Every User Should Know

After you click on Save as mentioned in step 6, you’ll be able to trigger the action using the custom keyboard shortcut. And as we mentioned above, you’ll still be able to use the default keyboard shortcut to trigger any action.

Keyboard shortcuts make it a lot easier to toggle on and off options or trigger an action. Therefore, try setting up a custom shortcut that’s easy to remember. With that being said, the tutorial ends here, it’s fairly simple and we hope you were able to successfully set up custom keyboard shortcuts in the Xbox Game Bar on Windows 10.

In Windows, you can assign cut, copy, and paste shortcuts to functions keys for ease of use. Here are the exact steps on how to do it.

To copy something from one place to another, we generally use the built-in Cut, Copy, and Paste functionality. For example, to copy a file, folder, or text, you can copy it and paste it into the destination. Almost every operating system has some sort of cut, copy, and paste functionality so that the user can move or copy data between places and applications. The default keyboard shortcuts for Cut, Copy, and Paste actions in Windows are “Ctrl + X,” “Ctrl + C,” and “Ctrl + V.”

For the most part, the default Cut, Copy, and Paste shortcuts are pretty easy to use, and the placement is not that hard on your fingers either. However, you can make it a bit easier by assigning Cut, Copy, and Paste shortcuts to the function keys. That way, you don’t have to press the shortcut to get the job done awkwardly. After all, the functions keys sit ideally, save but a few like F2, F5, and F11.

Assigning Cut, Copy, and Paste shortcuts to Function keys is very helpful if you are constantly moving or copying data. For example, if you are working on an Excel sheet, the ability to cut, copy, or paste with a single keypress will increase your productivity and experience significantly. The same is true for other use cases too.

In this quick and straightforward Windows guide, I will show you how to assign cut, copy, and paste shortcuts to function keys.

Assign Cut, Copy, and Paste Shortcuts to Function Keys

To assign cut, copy, and paste shortcuts to functions keys, we will use a free and open-source application called AutoHotKey. Using AutoHotKey, you can remap keys and create macros with ease. One of the best things about AutoHotKey is that it is lightweight but a pretty powerful application. Here is how to use AutoHotKey to assign Cut, Copy, and Paste shortcuts to function keys.

First, download and install AutoHotKey if you haven’t already.

After installing the AutoHotKey software, go to the desktop. Next, right-click on the desktop and select “New” and then “Text Document.” This action will create a new text file on your desktop.

Name the text file anything you want. Make sure you change the file extension from “.txt” to “.ahk.” For example, I named the file “CutCopyPaste.ahk.” If you cannot change the file extension, you might have to enable file extensions in Windows first. How to Create App and Site-Specific Shortcuts with AutoHotkey

Next, right-click on the newly created file and select the “Edit script” option. As soon as you choose the Edit Script option, the AHK file is opened in the Notepad. This is where we will add the script. How to Create App and Site-Specific Shortcuts with AutoHotkey

In the Notepad file, paste the below script. The script remaps the copy, paste, and cut shortcuts to F6, F7, and F8, respectively. If needed, you can change the function keys to the ones you want. For example, to use F8, F9, and F10 as the shortcuts, replace F6, F7, and F8 with them. How to Create App and Site-Specific Shortcuts with AutoHotkey

Next, click on “File” and then select “Save” to save the file. You can also press the “Ctrl + S” shortcut to save the script. After saving, close the Notepad.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Finally, double-click on the AHK file you just created. It will launch the script, and you can see it on the taskbar.

As long as the script is running, the Cut, Copy, and Paste shortcuts are mapped to the functions keys. That means you can press the appropriate function keys to perform Cut, Copy, and Paste actions.

To ensure the script is always running, I recommend you configure AutoHotKey to start with the system. That way, you don’t have to launch the script manually.

That is all. It is that simple to assign cut, copy, and paste shortcuts to function keys in Windows.

I hope that helps.

If you are stuck or need some help, comment below, and I will try to help as much as possible.

If the built-in keyboard shortcuts aren’t enough for you, you can make some of your own.

Keyboard shortcuts are your not-so-secret weapon for maximizing your productivity and blazing through tasks at top speed. From dropping GIFs into chats to searching Wikipedia in an instant and everything in between, keyboard shortcuts can come in really handy. You don’t just have to settle for the standard list of shortcuts you get with Windows or macOS, though—you can easily create your own too. Here’s how.

Custom Windows Shortcuts

Windows 10 enables you to make your own custom keyboard shortcuts, but only up to a point—to launch specific shortcuts to files, folders and apps. The easiest way to create a shortcut is to right-click inside a File Explorer window or on the desktop, then choose New and Shortcut. Follow the instructions to tell Windows what you want to create a shortcut to.

Once the shortcut to the program, file or folder is created, right-click on it and choose Properties. On the Shortcut tab, click in the Shortcut key box, enter your chosen keystroke combination, and click OK to confirm. Note that your custom combination has to start with Ctrl+Alt, after which you can add a letter, number, or function key. That customization is helpful, but it doesn’t really let you go to town on your own custom shortcuts. To do that, you need the help of a third-party program.

How to Create App and Site-Specific Shortcuts with AutoHotkey

Govee TV LED Backlights

Elevate your home theater space
A sensor is placed at the top of your TV to analyze the color output across the edges while replicating those colors around the perimeter of your TV in real-time. They can also be controlled via Alexa. This set is designed for TVs between 55″ and 65″.

WinHotKey is an older freeware program but still works in Windows 10. It runs from the notification area (system tray). Right-click its icon, click Configure, then choose New Hotkey from the dialog box that appears to create your shortcut. As the Windows OS has bagged most of the Win+whatever shortcuts for itself, you’ll probably need to add in a Ctrl or a Shift to make yours unique. You can launch applications, open files, open folders, or perform a number of actions on the current window (like minimizing it).

AutoHotkey is also worth a look—and is also free. This is more complex and is built around scripts. You need to create these scripts as small text files which can then be assigned shortcut keys of your choice. The benefit of this extra complexity is you can do just about anything with the program, from launching apps to inputting lines of text. For more detailed instructions for creating scripts, and some example ones you can modify, see the online documentation .

Comfort Keys Pro is another option, though you will have to pay $40 for it once the free trial has ended. You do get a lot for your money, though: an intuitive, clean interface for building up your custom keyboard shortcuts, which can link to apps, or files, or snippets of text, or anything you like. If you don’t want to start entirely from scratch, you can use the text macro templates provided, and there’s even a clipboard history manager you can use, too.

Finally, you can create your own custom keyboard shortcuts in a few applications, including Microsoft Word . Open Options from the main program menu, then choose Customize Ribbon and click Customize. next to the Keyboard shortcuts heading. You can do the same trick in Photoshop, too, via Edit and Keyboard Shortcuts—just select a tool or menu option to assign a shortcut to it.

Custom macOS Shortcuts

On the Mac, Apple offers a native option for attaching keyboard shortcuts to menus and actions. Open the Apple menu, then pick System Preferences, Keyboard, and Shortcuts. You can disable or enable any shortcut using the tick boxes to the left, or set a different keystroke combination by clicking on the shortcut you want to change and then hitting the replacement combination on your keyboard.

To set up a new shortcut for an app menu item, click App Shortcuts then the + (plus) button. You need to type out the exact menu label you want the shortcut to apply to (like “Delete” for example), and specify whether the shortcut should work in every app or one desktop program in particular, as well as enter the keyboard combination itself. Once you’ve clicked Add you’re up and running with your new macOS keyboard shortcut.

Under Services you can find options like capturing the screen and setting the desktop wallpaper, and all these options can have their own shortcuts too. If you want to add a new service to this list—importing tracks into the Music application maybe, creating new calendars, or many other actions—you can do this through the built-in Automator utility and then assign a keyboard shortcut afterwards.

You can do more with the help of a third-party program, like Alfred . Using customizable “hotkeys,” you can launch an application, take more control over Alfred itself, or launch a specific script or AppleScript to carry out an action. The option to create hotkeys needs the Powerpack purchase, which is £29 (about $40 at the time of writing).

From the Alfred Preferences pane, click Workflow, then click the + (plus) button in the bottom left—if you choose the Templates option you can see how hotkeys can be assigned to files, apps, web searches, system commands and more besides. You just choose your hotkey, your action, and your parameters (if necessary). Once you’re more confident, you can create these workflows from scratch following the full instructions here .

Then there’s Keyboard Maestro, which will set you back $36 (after a free trial) but which also offers you a lot of flexibility in terms of keyboard shortcut customization. You can assign a keyboard shortcut to just about anything by creating a macro (a series of commands) then assigning a hotkey to it. Open up Help and Tutorial for a more thorough guide, but to get up and running as quickly as possible, click the + (plus button) down at the bottom of the interface to create a new macro. You have to set a hotkey as the macro trigger, and you can then assign your action accordingly.

As on Windows, some individual programs have their own individual options for managing keyboard shortcuts as well, which means you can really tailor certain applications for speedy access and operation. In Word or Excel , for example, click Tools and Customize Keyboard to make changes. In Adobe Photoshop, meanwhile, you can set up your own shortcuts by selecting Edit and then Keyboard Shortcuts.

A hotkey is a key on the computer keyboard that will activate a certain action or command on your screen. For example, you can use F1 to open up an internet browser, or F2 to open Word. The most commonly used keys are the function keys (F1-F12), but there are many others as well. You can usually program what they do!

One way to improve your productivity is by using keyboard shortcuts. A hotkey is a key that can be assigned an action, such as opening programs or performing tasks in software applications like word processors and spreadsheets. Most operating systems have libraries of built-in keys with these standardized across various platforms; however, some proprietary products offer specialized ones too!

Table of Contents

Examples of Hotkeys

Benefits of Using Hotkeys

One benefit of using hotkeys is they can be programmed to do just about anything you want them to do! For example, if you wanted F5-F8 on a PC keyboard to open up your browser, calculator and email respectively. You could then use the function keys as hotkeys for the programs that you use most often.

The benefits of these shortcuts definitely outweigh their time-saving worthiness. For one, you save a considerable amount of time that would have been spent using the mouse to access those programs by typing out a command/shortcut instead.

This way is faster because it takes less effort–you only need to use your fingers as opposed to moving your entire arm from its position! In addition, keyboard shortcuts enable you to perform many commands without even looking at your computer screen which means you can multi-task!

How to Create Custom Hotkeys

There are several computer software programs that have the ability to customize hotkeys, but one of the most commonly used is AutoHotkey. You can create custom scripts with it so you don’t need any other program if you’re just looking to create a shortcut.

You can assign special tasks or open up your favorite programs using your computer keyboard without delay. And if you have more than one monitor, then these shortcuts are an absolute lifesaver! You’d be surprised at how much time you’d save once you start using these shortcuts! The possibilities are endless when it comes to customization options.

The best part about this is there’s nothing stopping you from getting creative and coming up with your own ideas for useful shortcuts! Just make sure not to limit yourself when it comes to how you use these, so try writing down what you usually do on your computer and see if there’s anything you could automate or speed up. That way, when the time comes for you to code shortcuts, you’ll know exactly which ones work best!

After Thoughts

Having a computer is essential in today’s society. Almost all jobs require software that can be created using certain programs. If people are unable to operate computers efficiently they cannot get their jobs done! It’s important that people learn about hotkeys because it will help them be more productive! Hotkey examples are F1-F12 keys that will open different programs on your computer screen. You can create custom scripts with AutoHotKey to make special tasks easier to complete.

When you’re writing content such as technical content, news articles, etc., you may sometimes want to insert the current date or timestamp in a program or editor you’re using. In Notepad, you can add the timestamp by pressing the F5 key.

Microsoft Office Word, OneNote allows the Alt + Shift + D and Alt + Shift + T hotkey combinations to insert the current date and current time respectively.

Similarly, WordPad has the Date and time toolbar button that lets you insert the date or timestamp in your preferred format from the list of 13 choices.

But, if you’re using a program which doesn’t have a built-in feature to insert current date and time, you may need a third-party macro or automation tool for that purpose. With automation tools, you also have the advantage of using a single hotkey combination to insert the date or timestamp in any program.

Insert date or time in any program using keyboard hotkey

AutoHotkey is a free, open-source scripting language for Windows that allows users to easily create small to complex scripts for all kinds of tasks such as form fillers, auto-clicking, macros, etc.

  1. Download AutoHotkey and install it.
  2. Right-click on the desktop, click New and select AutoHotkey Script.
  3. Rename the script file New AutoHotkey Script.ahk to insert_date.ahk
  4. Right-click the file and choose Edit Script
  5. Remove all lines in the script and replace it with the following code:

  • Save the file insert_date.ahk and close the editor.
  • Double-click to run the script. It will show up in the notification area.
  • Now, switch to the program where you want to insert the date or timestamp.
  • Press Ctrl + Alt + D to insert the timestamp at the current cursor position.
  • Script Customization

    You can change the keyboard hotkey in the (1st line of the) script if you need. Here are the modifiers.

    • !
    • +
    • ^
    • #

    For example, for Ctrl + Alt + Shift + D , you’d use ^!+d .

    For the full list of keys you can send or intercept, see AutoHotkey SendInput documentation

    Without using hotkeys

    If you want to insert the timestamp by typing a specific word — e.g., td , then edit the .ahk script and replace its contents with the following:

    Now, type td (and followed by a space) in any program. The words td will be replaced by the current date/timestamp. See this animation:

    Similarly, you can customize the Date or timestamp format.

    See FormatTime Syntax AutoHotkey documentation for more information.

    The above AutoHotkey script uses merely 1.5 MB of memory.

    And you can even compile the .ahk script to a .exe file so that you don’t need to have the AutoHotkey program installed. This is especially helpful if you manage a lot of computers as part of your home or work network.

    How to create custom keyboard shortcuts in Windows to open different programs using only your keyboard.

    Yesterday, I was helping my friend set up their new computer and they asked me how to create custom keyboard shortcuts in Windows. They were telling me that with their low vision, it can be difficult to locate icons, and they wanted to be able to use their computer without a mouse whenever possible. I was happy to help, and within a few minutes we had created shortcuts for all of their favorite programs. Today, I will be sharing how and why to create custom keyboard shortcuts in Windows and how they can help people with low vision and blindness with opening their most-used programs. This post was developed using Windows 10.

    Related links

    • Low Vision Accessibility Settings For Windows 10
    • Computer Lab Accommodations For Low Vision Students

    Why create custom keyboard shortcuts in Windows?

    There are many benefits to creating your own custom keyboard shortcuts in Windows. Some of these benefits include:

    • Making the computer easier to use
    • More efficient- no need to search for icons
    • Encourages independence and allows users to find programs easily
    • Great practice for using the keyboard
    • Having a back-up option in case someone can’t find an icon

    In my friend’s case, we decided to create keyboard shortcuts because they rely on a magnification program to access their computer and many icons look similar to each other. Personally, I decided to create custom keyboard shortcuts for myself because I have fluctuating eyesight and want to make sure I can use my computer no matter how poor my vision is.

    Related links

    • How To Make Keyboards Easier To See
    • Choosing A Computer Mouse With Low Vision

    How to create custom keyboard shortcuts

    Most Windows programs will support the creation of custom keyboard shortcuts, as long as the program is first pinned to the taskbar at the bottom of the screen. Here is how to create custom keyboard shortcuts in Windows:

    If the desired program is not on the task bar on the bottom of the screen:

    1. Go to the start menu
    2. Right click the name/icon for the desired program
    3. Click the menu option that says “more” followed by “add to taskbar”
    4. The icon should show up on the taskbar immediately after clicking “add to taskbar”

    Once the program is on the taskbar:

    1. Right-click the desired icon
    2. At the bottom of the drop-down menu, above “unpin”, right-click the name of the program. This might take a moment to pop up
    3. Left-click “properties”
    4. Click on the text box that says “shortcut key”
    5. Type in your desired keyboard combination by pressing the keys
    6. Once completed, click “ok”
    7. If desired, remove the app from the taskbar by clicking “unpin”

    Keyboard shortcut limitations

    • All keyboard shortcuts must start with the “ctrl” key
    • The second key must be “alt” or “shift”
    • The third key can be any letter, number, or punctuation mark
    • There can be no more than three keystrokes for a shortcut

    Considerations for creating custom keyboard shortcuts

    Here are my tips for creating custom keyboard shortcuts that are meaningful and easy to remember:

    • For easy-to-remember shortcuts, have the first letter of the program correspond to the shortcut. For example, if I was creating a shortcut for Microsoft Visio, I would use “V” as my shortcut
    • If you would rather use numbers, have your most used program have “1” as a shortcut
    • If needed, adding tactile labels to the keyboard can help users remember which shortcut is which
    • Whenever possible, involve the user in creating the shortcuts, if you are creating them for someone else. That way, you can ensure the shortcuts make sense to them.
    • Keyboard shortcuts can be used even when another app is open. Make sure that the shortcuts do not override the functions of other apps.

    Related links

    • Choosing Technology: Laptop
    • My High School Laptop

    My personal keyboard shortcuts

    Here are some examples of my personal keyboard shortcuts for opening programs in Windows. Feel free to use these on your own computer:

    • Microsoft Word= ctrl+shift+w
    • Microsoft PowerPoint= ctrl+shift+s
    • Snipping Tool= ctrl+alt+c
    • Anaconda= ctrl+alt+m
    • Google Chrome= ctrl+shift+g

    Related links

    • Designing Accessible Documents With Microsoft Word
    • How To Create Accessible PowerPoints

    Documenting keyboard shortcuts

    One of the most important things to do when creating custom keyboard shortcuts for Windows is to document what the shortcuts are. While the user can still open a program by clicking on an icon or searching for it, it’s still helpful to know how to access the different programs with the keyboard. I recommend writing the shortcuts down in a document and storing it in an easy-to-find location, or printing it and hanging it near the computer. This information isn’t sensitive like a password, so don’t worry if other people see it.

    Related links

    • How To Create Secure And Easy To Remember Passwords
    • Ten Tech Skills Every College Student Needs

    Final thoughts

    Knowing how to create custom keyboard shortcuts in Windows has been incredibly helpful for me, as it allows me to be able to use my computer efficiently, no matter how poor my eyesight is. I highly recommend using custom keyboard shortcuts to open programs in Windows for people that have trouble locating programs on their screen, or who simply want to be more efficient.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Autokey is a desktop automation utility for Linux. You can use it as a text expander to create your own shortcuts for the functions you use the most in your favorite software. You’ll also have the choice to map longer pieces of text – or even whole templates – to short string abbreviations.

    As you get more familiar with Autokey, you’ll find that you can do much more with it. You can automate desktop applications to perform the same tedious tasks without your input or even create your own mini-apps. Let’s see how you can use Autokey to automate your daily life with your computer.

    Also read: Text Expansion: The Quick Way to Give Your Productivity a Big Boost

    Installation

    In this tutorial we are installing and using the application in Ubuntu. The process should be similar in most distributions for which you can find a prepackaged file of the application.

    You can seek Autokey in the Software Center if you prefer the visual way of bringing software on-board. You will find two versions: Autokey-GTK for Gnome, MATE, and other GTK-based desktop environments and Autokey-QT for KDE Plasma and anything else relying on the QT toolkit.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Similarly, if you’re a fan of the terminal, you can install it using apt, but you should choose the appropriate version using only one of the following:

    Text Snippets

    Locate AutoKey among your installed applications and run it.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    AutoKey works with two different types of entries. You can use simple plaintext, which Autokey characterizes as phrases, to create shortcuts and text snippets that will be expanded to larger phrases (hence the name). You can also use it to automate complicated tasks by writing relatively simple Python scripts instead. Let’s start with the easy stuff, though, by creating a text expansion snippet.

    The program comes with some sample content that will help you get familiar with how it works. Expand the “My Phrases” folder on the left list, then the Addresses subfolder inside it, and choose the Home Address entry.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Notice how there are four lines of text in the program’s main window and how under that, next to Abbreviations, there is the string adr . If you open a text editor with Autokey active, type “adr,” press Enter, and it will get replaced by the contents in Autokey’s main window. That’s how you can set up your own text snippets. Let’s create one together.

    Click on New on the program’s toolbar and choose Phrase from the pop-up menu that appears.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Enter a name for your snippet – we used MTE.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Choose your new entry from the list on the left, if it isn’t already selected, and erase the placeholder text in the central part of the window. Replace it with the text you want to appear when you type an abbreviation – we entered our site’s name, Make Tech Easier.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Click on the “Set button” next to Abbreviations, then click on Add on the left of the window that will pop up. Type the abbreviation that you want to be expanded to the text snippet you defined in the previous step.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Run your favorite text editor and type the abbreviation you defined. If everything went according to plan, the snippet will replace your abbreviation.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Instead of using abbreviations, you can also assign keyboard shortcuts to text snippets – just choose to set a Hotkey instead of an Abbreviation. Both options are at the same spot. You can also map hotkeys to folders that contain multiple snippets. If you press the hotkey afterward, a pop-up menu with the folder’s contents will appear. You can choose an entry from there to have its contents pasted in the program you are using.

    Automation Using Autokey

    The simple way to automate stuff is by replicating the keypresses that achieve the result you wish in your favorite application. For example, we want to have our text editor save the file we are working with using the name “MTE.txt.” By typing Ctrl + s in the main window, we tell Autokey to send the combination CTRL + S to the application. Then, we can follow by entering the file’s name in the next line.

    With this approach, you can create sequences of keypresses to automate any application that can be controlled with the keyboard. You can use other special keys in your scripts, always in brackets: alt , enter , escape , tab , shift , and super for the Windows key.

    Advanced Scripting

    Theoretically, Autokey allows you to create some relatively advanced automation solutions without creating Python scripts from scratch. Practically, though, its latest version failed us in that regard. You can do it by choosing the option “Record keyboard/mouse” from the Tools menu, but whenever we tried that, the application crashed.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Autokey can be an excellent introduction to Python, though, since the examples it comes with, which you can find inside the folder Sample Scripts, are relatively easy to understand. You can use them as a base for your own scripts, creating even more complex automation solutions.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    Are you already using a text expander or some other automation solution? If you are looking for a clipboard manager instead, try CopyQ.

    Our latest tutorials delivered straight to your inbox

    If you’re looking to change key functions on your computer’s keyboard in Windows, these three methods can help.

    How to Create App and Site-Specific Shortcuts with AutoHotkey

    The standard Windows keyboard layout hasn’t changed much in the past few decades, but there’s a chance you don’t use every key on your keyboard. If you think the Caps Lock key would work better as something else, or wish you could open up Windows’ Task Manager with one keystroke, there are a few ways to remap those unused keys.

    Remap Keys With SharpKeys

    If you merely want to remap one key to another, SharpKeys is a simple, open-source program that uses the Windows registry. As an example, I use SharpKeys to make my Alt key act as the Ctrl key, and my Caps Lock act as the Windows key.

    Since SharpKeys writes this information directly to the Windows registry, it’s the best option for these kinds of one-to-one key remappings. You don’t have to rely on some other software as a middleman, and you’ll run into the fewest compatibility issues, since Windows itself is interpreting the keystrokes. Download the program (I recommend the portable zip version, which doesn’t require installation) and start it up.

    To remap a key, click the Add button and choose your keys from the two columns. The left column denotes the key you’ll press (for example, the Caps Lock key) and the right column denotes the action that key will take (for example, acting as the Windows key). You can also press the Type Key button and press a key on your keyboard if you have trouble hunting it down in the list.

    When you’re done, click OK. Repeat this process for any other remappings, then click the Write to Registry button. Close the program, restart your computer, and you should find your keys have taken on their new roles. You can even delete SharpKeys when you’re done; the program is merely a user-friendly interface for the Windows registry, so once the changes are made, you don’t need it anymore.

    Customize Hotkeys With Your Keyboard’s Software

    If your keyboard comes with advanced software, like Logitech’s Gaming Software, Corsair’s iCUE, or Razer’s Synapse, you may have some key-remapping features already present on your system.

    Not only can you remap keys, but many of these programs let you create multi-key shortcuts, insert blocks of text, or create different profiles for each of your games. Some will even let you “record” macros, allowing you to create complex shortcuts just by recording your actions and assigning them to a hotkey.

    Each of these programs are a bit different, so we can’t go into all of them here, but the gist should be the same across manufacturers: download the software, select your keyboard, and look for the option to create new hotkeys, macros, or actions. When in doubt, check the support page for your specific keyboard, and you’ll find tutorials on how to get it done.

    Your mileage may vary with these, as I’ve found certain programs to be jankier than others in the past. But if you already have it on your system, it may be able to do exactly what you want without installing any other software, so give it a shot.

    Create Complex Scripts With AutoHotkey

    If neither of the above options suit your needs, you can create powerful hotkeys with AutoHotkey, a free program that comes with its own little scripting language for you to describe the actions you want your hotkeys to take. It’s a bit more difficult to use than the software you get with gaming keyboards, but if your keyboard doesn’t come with its own remapping program, it’s your next best bet.

    After installing AutoHotkey, create your hotkeys by right-clicking anywhere in File Explorer and choosing New > AutoHotkey Script. Right-click on the resulting file and open it in Notepad.

    Create basic hotkeys by adding a line like this:

    This remaps Caps Lock to the right Windows key. You can add a comment above it using a semicolon (;) to remind you of what that hotkey does or why.

    Again, SharpKeys is a better choice for a simple remapping like this, but let’s say you wanted to do something slightly more complicated, like remap Caps Lock to Ctrl + Shift + Esc, so you can see the Windows Task Manager with one keypress. You would create a line in your script like this:

    Where ^ corresponds to Ctrl and + to Shift, as described here.

    This is where AutoHotkey becomes more powerful. You can create hotkeys to type certain lines of text, run a program or batch file, or create shortcuts for specific programs. You can even have one hotkey perform multiple actions in a series, giving you robust control over your shortcuts.

    Once you’ve finished adding your hotkeys to the script, save the file and double-click on it. This will launch AutoHotkey in the system tray, and it will run in the background interpreting your hotkeys for you. You can quit the program at any time to set your keys back to their default actions.

    (I recommend adding your .ahk script to Windows’ startup folder, located at %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup, so it will automatically run every time you turn on your computer.)

    There’s more to AutoHotkey than we could ever fit into one small article, so check out the AutoHotkey documentation and forums for more advanced instructions and ideas. If you can imagine it, there’s almost certainly a way to make AutoHotkey do it.