Difference between revisions of "ISInterface:AddHotkey"

From Lavish Software Wiki
Jump to navigation Jump to search
 
 
(One intermediate revision by the same user not shown)
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
  
  
 
== See Also ==
 
== See Also ==
 
* [[ISXDK:ISInterface|ISInterface]]
 
* [[ISXDK:ISInterface|ISInterface]]
 
+
* [[ISInterface:RemoveHotkey|RemoveHotkey]]
 
[[Category:ISXDK]]
 
[[Category:ISXDK]]
 
[[Category:ISInterface]]
 
[[Category:ISInterface]]

Latest revision as of 22:53, 2 September 2005

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


See Also