Associate
- Joined
- 3 Feb 2009
- Posts
- 1
Hi gang,
I just sussed this out today - im quite the tech savvy kid
If this is common knowledge, please feel free to delete it. I did several searches and nothing came up, so I thought I would post this as it may be of some interest to gamers...
For a while now I wanted a keyboard with Macro capability, but couldnt bring myself to spend the £30/40 in order to get it (tight student
). I found a little application called AutoHotKey that lets you map Macros to your keyboard
This may well be common knowledge, but heres how to do it:
1. Download AutoHotKey - http://www.autohotkey.com/download/
2. Decide which keys you wish to use as your Macro keys. I decided to use my number pad with NumLock OFF; this way I can still turn NumLock ON and still be able to use the keys for inputting numbers.
3. Open a notepad file
4. Insert the code for the button you wish to use – a list of the buttons can be found at the bottom of this post, or in the programs help file
5. After the code, type two colons - ::
6. Press enter and type “setkeydelay, x” where x is the delay in milliseconds between keystrokes. I tend to use 65; its fast enough, but not so fast as to cause programs trouble in reading the keystrokes. If you do not want any delay, then just delete this line.
7. Press enter, and type Send xxxxx, with x being the keystrokes you wish to use for your Macro
8. Press enter, and type return.
9. Repeat for as many Macros as you want to create
10. You should end up with something that looks like the following:
NumpadEnd::
Setkeydelay, 65
Send B42B62
Return
NumpadDown::
Setkeydelay 65
Send B63B63B64B65
Return
The example listed above is for a simple buy script in CounterStrike: Source.
Call the file whatever you want, but make sure that you save it as a .ahk file.
Once saved, double click on the file, and your macros should be in place!
Here is the list of the key codes; I just copied and pasted these out of the help file – you can find the codes for all the other keys in there. I have also included the common media shortcut key codes, as I know many people do not use these:
Numlock ON
Numpad0
Numpad1
Numpad2
Numpad3
Numpad4
Numpad5
Numpad6
Numpad7
Numpad8
Numpad9
NumpadDiv (/)
NumpadMult (*)
NumpadAdd (+)
NumpadSub (-)
Numlock OFF - These are in the same order as those listed above - i.e. NumpadDown is the Number 2 button on your Keypad
NumpadIns
NumpadEnd
NumpadDown
NumpadPgDn
NumpadLeft
NumpadClear
NumpadRight
NumpadHome
NumpadUp
NumpadPgUp
NumpadDel
NumpadDiv (/)
NumpadMult (*)
NumpadAdd (+)
NumpadSub (-)
NumpadEnter
Media shortcut codes:
Browser_Back
Browser_Forward
Browser_Refresh
Browser_Stop
Browser_Search
Browser_Favorites
Browser_Home
Volume_Mute
Volume_Down
Volume_Up
Media_Next
Media_Prev
Media_Stop
Media_Play_Pause
Launch_Mail
Launch_Media
Launch_App1
Launch_App2
So there you have it, Macros on any keyboard! Whatsmore is the program takes up hardly any space (10Mb of RAM), and is very responsive!
Cheers
Matthais_31
I just sussed this out today - im quite the tech savvy kid

For a while now I wanted a keyboard with Macro capability, but couldnt bring myself to spend the £30/40 in order to get it (tight student

This may well be common knowledge, but heres how to do it:
1. Download AutoHotKey - http://www.autohotkey.com/download/
2. Decide which keys you wish to use as your Macro keys. I decided to use my number pad with NumLock OFF; this way I can still turn NumLock ON and still be able to use the keys for inputting numbers.
3. Open a notepad file
4. Insert the code for the button you wish to use – a list of the buttons can be found at the bottom of this post, or in the programs help file
5. After the code, type two colons - ::
6. Press enter and type “setkeydelay, x” where x is the delay in milliseconds between keystrokes. I tend to use 65; its fast enough, but not so fast as to cause programs trouble in reading the keystrokes. If you do not want any delay, then just delete this line.
7. Press enter, and type Send xxxxx, with x being the keystrokes you wish to use for your Macro
8. Press enter, and type return.
9. Repeat for as many Macros as you want to create
10. You should end up with something that looks like the following:
NumpadEnd::
Setkeydelay, 65
Send B42B62
Return
NumpadDown::
Setkeydelay 65
Send B63B63B64B65
Return
The example listed above is for a simple buy script in CounterStrike: Source.
Call the file whatever you want, but make sure that you save it as a .ahk file.
Once saved, double click on the file, and your macros should be in place!
Here is the list of the key codes; I just copied and pasted these out of the help file – you can find the codes for all the other keys in there. I have also included the common media shortcut key codes, as I know many people do not use these:
Numlock ON
Numpad0
Numpad1
Numpad2
Numpad3
Numpad4
Numpad5
Numpad6
Numpad7
Numpad8
Numpad9
NumpadDiv (/)
NumpadMult (*)
NumpadAdd (+)
NumpadSub (-)
Numlock OFF - These are in the same order as those listed above - i.e. NumpadDown is the Number 2 button on your Keypad
NumpadIns
NumpadEnd
NumpadDown
NumpadPgDn
NumpadLeft
NumpadClear
NumpadRight
NumpadHome
NumpadUp
NumpadPgUp
NumpadDel
NumpadDiv (/)
NumpadMult (*)
NumpadAdd (+)
NumpadSub (-)
NumpadEnter
Media shortcut codes:
Browser_Back
Browser_Forward
Browser_Refresh
Browser_Stop
Browser_Search
Browser_Favorites
Browser_Home
Volume_Mute
Volume_Down
Volume_Up
Media_Next
Media_Prev
Media_Stop
Media_Play_Pause
Launch_Mail
Launch_Media
Launch_App1
Launch_App2
So there you have it, Macros on any keyboard! Whatsmore is the program takes up hardly any space (10Mb of RAM), and is very responsive!
Cheers
Matthais_31
Last edited: