Difference between revisions of "ISInterface:AddHotkey"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
===Syntax=== | ===Syntax=== | ||
− | + | *bool AddHotkey(char *Name, char *Combo, char *Command, bool Press=false) | |
== Purpose == | == Purpose == | ||
− | + | To add a hotkey | |
== Usage == | == Usage == | ||
=== Parameters === | === Parameters === | ||
− | + | *char *Name | |
+ | :'''[in]''' Name of the hotkey | ||
+ | *char *Combo | ||
+ | :'''[in]''' Keys to trigger the command | ||
+ | *char *Command | ||
+ | :'''[in]''' Command to be executed | ||
+ | *bool Press | ||
+ | :'''[in]''' Optional [defaults to False] if TRUE the hotkey will be activated on keys being pressed, if false the hotkey will be activated on release | ||
=== Return Value === | === Return Value === | ||
− | + | *bool | |
+ | :Returns true on success, false on failure | ||
== Examples == | == Examples == | ||
+ | ===Add a Hotkey=== | ||
+ | *pISInterface->AddHotkey("Wireframe on","f8","wireframe on",TRUE) | ||
+ | *pISInterface->AddHotkey("Wireframe off","f8","wireframe off",FALSE) | ||
+ | :Creates two hotkeys, will turn wireframe on when f8 is held down, and turn it off when it is released | ||
Revision as of 22:28, 2 September 2005
Contents
Syntax
- bool AddHotkey(char *Name, char *Combo, char *Command, bool Press=false)
Purpose
To add a hotkey
Usage
Parameters
- char *Name
- [in] Name of the hotkey
- char *Combo
- [in] Keys to trigger the command
- char *Command
- [in] Command to be executed
- bool Press
- [in] Optional [defaults to False] if TRUE the hotkey will be activated on keys being pressed, if false the hotkey will be activated on release
Return Value
- bool
- Returns true on success, false on failure
Examples
Add a Hotkey
- pISInterface->AddHotkey("Wireframe on","f8","wireframe on",TRUE)
- pISInterface->AddHotkey("Wireframe off","f8","wireframe off",FALSE)
- Creates two hotkeys, will turn wireframe on when f8 is held down, and turn it off when it is released