Hotkeys allow you to activate special features at the press of buttons. You can select any key combination for hotkeys. The hotkey settings can be found by pressing Ctrl-K or by selecting the Tools/Hotkeys menu item.
Functionality
Hotkeys contain several useful built-in functions and a function that will call a script function written by the user. Most hotkeys are used to call script functions, as most script functions can only be called through hotkeys.
Built-in functions include showing of dialogs and performing quick sub searches. With hotkeys, you can quickly perform a Same as Before, Different from Before, Increased, Decreased, and Same as Originalsub search.
Polling Method
The largest mystery in the hotkeys is the polling method. Hotkeys can be registered in two ways because it is common for one method to be blocked by some games. The standard method for registering a hotkey (non-polling) is through Windows® directly. This method registers the key inside Windows® and allows Windows® to keep track of when the key is pressed, then relay the keypress back to MHS to call your hotkey function. However, this can be caught by other programs as well, and Windows® only allows a key combination to be registered once. The polling method uses a second thread that repeatedly polls the keyboard to manually determine if the hotkey combination is being pressed.
The following table explains the pros and cons of each method.
Method
Pros
Cons
Non-Polling
More responsive. Registered keys are never missed.
Blocked by many games.
Only one function can be assigned to a key combination.
Key combinations used here override the hotkeys used by MHS, so sometimes shortcuts no longer work.
Polling Method
Multiple functions can be assigned to a single key combination.
Not blocked by many games.
Sometimes offers slower response time.
Sometimes keys are missed because of the iterative polling.
Options
The following table explains each option.
Option
Description
New
Creates a new hotkey ready to be edited.
Delete
Deletes the selected hotkey from the list.
Up
Moves the selected hotkey up in the list. This only has effect on hotkeys that use the polling method. Polled hotkeys will be triggered in the order shown in the list if multiple hotkeys are activated at once (by assigning multiple functions to a single key combination).
Down
Same as above, but moves the selected hotkey down.
Key
The primary key used to activate the hotkey.
Mod
The optional modifier that must also be held to activate the hotkey.
Function
The function that will be called when the hotkey is activated. For information on making a hotkey call a user-defined script function, see Script Events.
Each function has different parameters (up to 3) whose descriptions appear when the function is selected.
Parm 1
The first function-specific parameter. If the function uses this, the value you enter will be passed to the function when it is activated.
Parm 2
The second function-specific parameter. If the function uses this, the value you enter will be passed to the function when it is activated.
Parm 3
The third function-specific parameter. If the function uses this, the value you enter will be passed to the function when it is activated.
Poll Method
Determines if the hotkey will using polling rather than the normal Windows® hotkey system.
Functions
Hotkeys support many different functions, and each behave differently and accept different parameters (up to 3).
Each time a function is selected it will show the descriptions for the parameters it uses. The following table explains each function and its parameters.
Function
Description
Parm 1
Parm 2
Parm 2
NoAction
Does nothing.
Poke
Writes values to RAM.
The address where the write will take place.
The value to write.
The number of bytes to write (up to 4).
Beep
Makes a beeping sound incidating the hotkey has been pressed.
The length of the beep.
LoadConverter
Loads the Converter.
LoadHexEditor
Loads the Hex Editor.
LoadDisassembler
Loads the Disassembler.
LoadScriptEditor
Loads the Script Editor.
ScriptFunction
Calls a user-written script function.
The number of the hotkey script to call. See Script Events.
The first parameter to pass to the script function.
The second parameter to pass to the script function.
SubSearchSameAsBefore
Performs a Same as Before Sub Search.
If this is 0, the results dialog is not shown. Otherwise it is shown after the search completes.
SubSearchDifFromBefore
Performs a Different from Before Sub Search.
If this is 0, the results dialog is not shown. Otherwise it is shown after the search completes.
SubSearchIncreased
Performs an Increased Sub Search.
If this is 0, the results dialog is not shown. Otherwise it is shown after the search completes.
SubSearchDecreased
Performs a Decreased Sub Search.
If this is 0, the results dialog is not shown. Otherwise it is shown after the search completes.
SubSearchSameAsOriginal
Performs a Same as Original Sub Search.
If this is 0, the results dialog is not shown. Otherwise it is shown after the search completes.
LockStoredAddresses
Locks all stored addresses whose Hotkey Keys match Parm 1.
The Hotkey Key to match when locking stored addresses. If this is 0, all stored addresses are locked. Otherwise, only the stored addresses whose Hotkey Keys match this value are locked.
UnlockStoredAddresses
Unlocks all stored addresses whose Hotkey Keys match Parm 1.
The Hotkey Key to match when unlocking stored addresses. If this is 0, all stored addresses are unlocked. Otherwise, only the stored addresses whose Hotkey Keys match this value are unlocked.