Remap your computer keyboard using AutoHotKey

Audio Plugin Hosts and other audio software applications discussion
Post Reply New Topic
RELATED
PRODUCTS

Post

I was kind of surprised when a search of the forum didn't bring this up so here goes.

If you've ever wanted to remap your computer keyboard in a DAW that doesn't support it or do more complicated macros, try AutoHotKey. It's free and does a ton more, but remapping for single-handed use was all I was interested in. https://www.autohotkey.com

Here's the script I use as an example. Just save it as a text file (*.ahk) and edit it for the keys you want to remap. You can find the window name for your DAW, and replace the one for Ableton, using the integrated Window Spy utility. There's a list of special key names on the site.

Keyboard Maestro is available for the Mac, and it's easier to configure, though it's not free as AutoHotKey is.

Code: Select all

#IfWinActive ahk_class Ableton Live Window Class

;! equals Alt, ^ equals Ctrl, + equals shift

l::^l

numpad1::^!b
numpad2::^!l
numpad3::^!g
numpad4::^!i
numpad5::^!m
numpad6::^!r
numpad7::^!o
numpad8::+tab
numpad9::?
numpaddot::^l
numpadenter::F9
F16::m
;m is mapped via ableton to the metronome.
F17::^+f

Post

damn, i can never get my head around scripting. i so want the ability to map keys. i tried making a script with your file but i don't see anything happening.
is there a simpler 'idiot-proof' alternative do you know?
on windows 10...
also, i don't have an F16 key ( or F17 for that matter).. :?

edit: as soon as i press send i figure it out - now it works...
can i use this for any app on my machine?
how do i do that?

Post

Change the window name after #IfWinActive to whatever app you want to remap. I use a Mac keyboard, hence the F16, etc. The first key name is the one received, the one after :: is what’s sent. Just change those to taste. I haven’t tried it, but I think you can concatenate different app scripts in the same file by just using another #IfWinActive.

BTW, that F16 sending m doesn’t seem to work. Not sure why yet. Probably with the way Ableton maps its own hot keys.

Post

Right click on the system tray AutoHotKey icon and select Window Spy to launch it. It will show you window names.

Post

AutoHotKey is great. I used it for remapping some controls in games some times (no, not to create macros ;)).

Post

Just make sure to turn this off before playing online games as it might get you banned!
Signatures are so early 2000s.

Post

Yep, and rightly so. I never play multiplayer games though.

Post

I really want this to work with FL Studio... But I can't get it to work at all.
I've tried matching window names with open app but it has no effect.

Post

inkwarp wrote: Fri Nov 22, 2019 9:48 pm I really want this to work with FL Studio... But I can't get it to work at all.
I've tried matching window names with open app but it has no effect.
Are you using Window Spy to get the window name? If so try the mapping without that #IsWinActive function. Put a semicolon in front to disable it. This will remap for all applications but at least you can see what you’re doing wrong. You can always turn off AutoHotkey.

Post

I don't use AHK for musical purposes (yet),* but I use it for other stuff, including my actual job, and I just want to say that it's totally amazing once you get the hang of it and realize what it can do.

* mainly because it would probably lead to me spending all my spare time coding instead of making music

Post

i give up
i've tried everything, but it's only the ableton version that works.
Which doesn't make much difference as you can map keys in it already.
maybe one day when i have some time to learn some basic scripting.

Post

Actually, it makes a huge difference for me because I can open and close things with one hand rather than two. I just wrote a one-remap script for Thunderbird and it worked perfectly. You just have to get the window name correct, or not limit the script to one app. Sorry you had issues. There's a lot of help at the web site and on youtube if you want to give it another shot sometime.

Post

i'll have another look shortly.
my head was a bit tired last time..
:)

EDIT:
You won't believe this ( well, you might), but I had Number Lock on.
So Ableton script working fine; now i just need to figure out some of this AutoHotKey business,
nevertheless, thanks for the info...

Post Reply

Return to “Hosts & Applications (Sequencers, DAWs, Audio Editors, etc.)”