How To: Reprogram Your Surface Pen Buttons to Do Anything You Want

How To: Reprogram Your Surface Pen Buttons to Do Anything You Want
The digital pen on the Surface Pro 4 and Surface Book is an indispensable tool for serious note-takers and artists alike.Out of the box, the Surface Pen is pre-programmed to do some pretty wonderful things. For example, the eraser can be single-clicked to open Microsoft's OneNote, double-clicked for a screenshot, and you can press-and-hold to open up a Cortana search. Oh, and the eraser erases, too!But what if you wanted the eraser to do something else? If you install the Surface app on your device, you can disable the default actions, or replace the gestures to launch any store or desktop app instead. However, that's as good as it gets with Microsoft's built-in options.If you want to go beyond the basic customizations, you'll need a free program called AutoHotkey, which lets you reprogram the eraser to do pretty much anything. Time to start scripting!Don't Miss: Top 7 Surface Book Hacks for Artists
Step 1: Install AutoHotkeyFirst things first, you're going to need to download and install AutoHotkey.Download AutoHotkey (.exe)

Step 2: Create Your Script FileOnce AutoHotkey is installed on your Surface, you're going to need to create a new script file. To do this, right-click on your desktop, go to New, click AutoHotkey Script, and then name your new script file. Make sure the name of your script ends with the extension ".ahk" for the script to execute. This will create a new script for you to edit and place on your desktop. To edit your new script, you will need to right-click on the script you just made and then click Edit Script. The script will then open in Notepad.
Step 3: Write Your ScriptScripting may be scary to some of you, but AutoHotkey isn't really all that bad, and we're going to show you how to write some basic scripts. Here are the identifiers for our three functions:Single-click is #F20 Double-click is #F19 Click and hold is #F18 Warning: There is also a side button on the new Surface Pen, which, by default is set to right-click. The identifier for right-click is rbutton. This is a tricky function to reprogram as once you've changed right-click using a script, it affects right-click functionality across the entire system. Best to steer clear.Before we do anything, we will need to decide which function we wish to modify. So, for example, let's start with our single-click eraser function. For single-click, we start like this:#F20:: Everything to the left of the "::" defines the function we are using, so, in this case, a single-click of the eraser. We then start a command string. As an example, let's look how we would script an undo (Ctrl + Z) function.#F20 :: ^z return So, in this example, control is represented by the symbol "^", and, in conjunction with "z", it gives us the undo command. Return ends the command string. Pretty neat right?Let's look at another example, where we'll script single-click to copy and double-click to paste.#F20 :: ^c sleep 300 #F19 :: ^v return Following the same basic format, we first define our single-click as Control + C. Sleep is a command to add time (in milliseconds) before the next function can operate. We use 300 ms to give the system ample time to copy the selection to the system's clipboard.You can also program the eraser to launch applications as long as you know the name of the executable. However, this is already a feature that Microsoft gives in their Surface app, so you could easily use that as well. Just for learning purposes, let's see how it works in AutoHotkey.#F20 :: Run photoshop return This simple command line will allow Adobe Photoshop to open with a single click from your Surface Pen's eraser. Being able to launch a program in this fashion only works with certain applications. This means that with most applications you will need to run the entire path (e.g. Run, %A_ProgramFiles%\Some_Program\Program.exe).To open a website, the script would look like this:#F20 :: Run, https://www.wonderhowto.com/ This will program a single-click from your Surface Pen eraser to open the specific link in your default browser. Needless to say, these examples are rudimentary, and, really, the possibilities of how you can program your Surface Pen's eraser are endless; these examples are just to get you going. For more elaborate scripting, visit the AutoHotkey forums.

Step 4: Run Your ScriptTo run your new script, make sure you first save your script with the .ahk extension, then, right-click your script file and click Run Script. You can also compile the script to make a .exe if you wish.An AutoHotkey icon will appear down below on your Windows taskbar letting you know the script is running successfully, and, to stop the script, simply right-click the AutoHotkey icon down in the taskbar and click Disable. We hoped you enjoyed customizing your new Surface Pen's eraser and we encourage you to experiment with your own scripts. Let us know what you think or perhaps share a script idea of your own down below in the comments or on Facebook, Google+, or Twitter.



How To: Get Quick-Access Pandora Controls in the Notification Tray of Your Galaxy Note 3 How To: Save Battery Power on a Samsung Galaxy S4 with Moto X Style "Active Display" Notifications Samsung Android Pie Update: Galaxy Devices Are Getting All-New Home Screen Icons
Turn Your Phone's Notifications Tray into the Ultimate To-Do


I came across a vintage ITT telephone handset on a recent trip to Weird Stuff Warehouse in Sunnyvale, Calif. The instant I saw it, I knew exactly what to do: stick the guts of the Bluetooth headset inside and create a retro Bluetooth handset!
How to make Retro headset -Radiation free headset - YouTube


Keeping malicious apps off your child's phone, or in some cases, keeping them from using certain apps, can feel like an intimidating task. But with Android, you can use a mix of the phone's features and parental control apps to control screen time and keep kids away from certain apps.
Use a Firewall to Keep Data-Hungry Apps in Check - Android


How to Disable Notification Previews for All Apps on iPhone and iPad in iOS 11 Posted by Khamosh Pathak on Sep 18, 2017 in How To , iOS 11 , Notification Center , Top Stories It's a bit ironic that we'll do everything to make sure our phone is as secure as possible, but leave out our Lock screen notifications for everyone to see.
How to Disable Lock Screen Notifications and Previews in iOS

Easily Resize Images for the Web with This Drag & Drop


When Google finally gave us a dark theme for YouTube, it was a bit disappointing. They didn't use a pure black background, reducing some of the battery savings you'd get with an OLED panel. But with the help of another app, we can fix this, and not only get a real dark mode, but other colors as well
How to Get an Automatic Light & Dark Theme on Android


The best way to block ads on Chrome is to use a system-level ad blocker. Not only will it help you get rid of annoying pop-up ads, but it will also remove all other ad formats from your internet experience. Imagine browsing, using social media, and watching videos on YouTube without intrusive ads trying to catch your attention at any cost.
4 Ways to Block Ads on Google Chrome - wikiHow


The DROID 2 from Motorola came out last August, but it's just now exploding— literally. The 33 News reported yesterday that a Motorola DROID 2 smartphone exploded in the hands of Aron Embry from Cedar Hills, Texas. He was making a phone call outside his home when he heard a POP sound— blood
Android Phone Tips: Motorola Droid Shortcut to Web Browser


Here are the step-by-step instructions to easily back up the full system image of Windows 10 to a safe location on your PC's hard drive: Steps to perform a full image backup in Windows 10 .
How to Restore System Image Backups on Windows 7, 8, and 10


In the process, they've also included another handy feature — the ability to hide certain app notifications from appearing in that History list. Firstly, if you didn't catch that, what was called "Notifications View" since iOS 7 is now called "History" in iOS 11 (or "Recent Notifications" on the lock screen).
How to Disable Notification Previews for All Apps in iOS 11


How to Unroot Android. Rooting your device can give you a lot more control over it, but it also will usually void your warranty and make repairs a hassle. Rooting also makes installing OTA (over-the-air) updates more difficult.


How To: Get Dark Mode on Instagram for Less Stress on Your Eyes When Browsing Pics & Videos How To : Enable the Hidden System UI Tuner Menu in Android Marshmallow How To : There's a Hidden Feature in Nougat That Gives Your Android Phone or Tablet a Desktop-Like Experience
How to Enable Dark Mode in Google Calculator « Gadget Hacks

0 comments:

Post a Comment