SAMP key binds and how to change them

Customizable key binds are important in any game, but they're particularly important in SAMP. There are actions you may need to perform or type quickly that do not have default keys, and manually typing out commands is slow and tedious, taking you out of the roleplay experience. All of this means that rebinding your keys in SAMP should be a top priority.

How to change SAMP key binds

There are two main ways to change your SAMP key binds: the SAMP KeyBinder program and AutoHotkey. Both have advantages, with KeyBinder being simpler and AutoHotkey being more customizable. We'll show you how to modify your key binds using both.

Using SAMP KeyBinder

SAMP KeyBinder couldn't be much easier to use. Download it from GTA Garage and unzip it. Open the folder and run 'Keybinder v2.0.exe' to start the program.

In the "Keys" column, type the key or command you want to be activated. Click on the HotKey column and press the key you want it to be assigned to once. If you'd like to delete a Hotkey, make sure you press the "Disable binds button". Otherwise, the key bind will just be replaced by your backspace key.

In our testing, we needed to go to "Settings > Send Keys to > Any window" to get the key binds to work in SAMP.

Using AutoHotkey

AutoHotkey is a hugely popular macro creation and hotkey program that can also be used for SAMP. It uses the .ahk scripting format to determine which keys should be assigned to which actions, when they should and shouldn't run, etc. This makes it more complicated to set up, but with the help of some examples, it shouldn't be too difficult to get your head around.

After installing AutoHotkey, you can create a script by right-clicking in any folder and selecting "New > AutoHotkey Script".


Enter a name for the script, for example, "SAMP keybinds", and press "Create".

Right-click the script again and choose the "Edit" option, and then open it with Notepad. At this point, you'll have a blank notepad file with nothing in it. We can add our hotkeys to this document. You can find a list of keys to use with AutoHotkey here.

Adding a hotkey that types a command

You can use SendInput to have AutoHotkey type a command in the SAMP chat and send it. The syntax for this is:

Key:: 
{
Send "t/command{Enter}"
}
 

For example, we could bind the /help command to numpad 0 using:

Numpad0:: 
{
SendInput "t/help{Enter}"
}

You can also create a script that does not automatically press enter after you type your command. This is useful if you're trying to talk in RP using the /me command, for example:

Ctrl & M:: 
{
SendInput "t/me"
}

Making text input faster

If you find that AutoHotkey types your text too slowly, particularly for longer strings of text, you can use the clipboard to paste the text instead:

Numpad0::
{
clipboard =
clipboard = t/command
clipwait, 2
send ^v {Enter}
return
}

So, what's going on here? First, we're clearing the clipboard with clipboard =. Then we add t/command to the clipboard, wait for it to update, and send Ctrl + V  (paste), followed by the enter key. The script then returns to the beginning.

Adding a hotkey that presses another key

What if we instead want to create a script that assigns one key or a combination of keys to another? As it turns out, that's even easier:

OriginalKey::NewKey

For example, for whatever reason we want to make Numpad 0 press the Numpad 1 key:

Numpad0::Numpad1

Or if we want Ctrl + P to enter the F key:

Ctrl & P::F

Closing words

There are several other ways to rebind keys in SAMP that might be worth investigating. Microsoft's PowerToys, for example, lets you remap keys to other keys or shortcuts. The Ultimate SAMP KeyBinder is another option, but as our VirusTotal scan came back with 7/71 detections, we are hesitant to recommend it even if these are likely false positives.

The bottom line is that if you need a simple key rebinder and macro program, SAMP KeyBinder does an excellent job with minimal fuss. However, investing the time to learn AutoHotkey will likely pay off, as in the future you can tap into its more advanced functionality and use custom scripts to bind keys directly to in-game functions.