Difference between revisions of "ISKernel:bind (Object Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
m (ISKernel:bind (Data Type) moved to ISKernel:bind (Object Type))
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
A <tt>bind<tt>, also known as a ''hotkey'', maps actions to keyboard input.
+
A <tt>bind</tt>, also known as a ''hotkey'', maps actions to keyboard input. This data type can only be accessed through the Keyboard [[LavishScript:Top-Level Objects|Top-Level Objects]] (TLO).
  
 
== Members ==
 
== Members ==
Line 9: Line 9:
  
 
== Methods ==
 
== Methods ==
''(these methods require Inner Space 0.74)''
 
 
*'''SetName['''name''']''': Renames the bind
 
*'''SetName['''name''']''': Renames the bind
 
*'''SetCombo['''combo''']''': Changes the key combination used by the bind
 
*'''SetCombo['''combo''']''': Changes the key combination used by the bind
Line 20: Line 19:
  
 
== Examples ==
 
== Examples ==
 +
===Change a name of a bind command===
 +
*Keyboard.Bind[console]:SetName[consoletoggle]
 +
:This would change the '''Name''' of the console bind to consoletoggle
 +
===Change a bind key combination===
 +
*Keyboard.Bind[normalkey].SetCombo[Shift+Ctrl+N]
 +
:This changes the standard 'normalkey' '''Combo''' from Shift+Alt+N to Shift+Ctrl+N
 +
===Set a release command===
 +
*Keyboard.Bind[fullscreenkey]:SetReleaseCommand[echo Main screen turn on;fullscreen]
 +
:This '''ReleaseCommand''' would execute the command to echo 'Main screen turn on' then execute the fullscreen command
 +
===Delete a bind===
 +
*Keyboard.Bind[fullscreenkey]:Delete
 +
:This would '''Delete''' the bind 'fullscreenkey'
  
 
== See Also ==
 
== See Also ==
* [[LavishScript:Data Types|LavishScript Data Types]]
+
*[[LavishScript:Data Types|Data Types]]
* [[IS:Session#Data_Types|Inner Space Session Data Types]]
+
*[[IS:Kernel#Data_Types|Kernel Data Types]]
 +
 
 +
 
 +
{{DT-Stub}}
 +
[[Category:Inner Space]]
 +
[[Category:Inner Space Kernel]]
 +
[[Category:Inner Space Kernel Data Types]]

Latest revision as of 00:57, 15 May 2006

Description

A bind, also known as a hotkey, maps actions to keyboard input. This data type can only be accessed through the Keyboard Top-Level Objects (TLO).

Members

  • string Name: The name of the bind
  • string Combo: The key combination used for the bind
  • string PressCommand: The command executed when this bind is pressed
  • string ReleaseCommand: The command executed when this bind is released

Methods

  • SetName[name]: Renames the bind
  • SetCombo[combo]: Changes the key combination used by the bind
  • SetPressCommand[command]: Sets the command executed when this bind is pressed
  • SetReleaseCommand[command]: Sets the command executed when this bind is released
  • Delete: Deletes the bind

Returns

TRUE if the bind exists

Examples

Change a name of a bind command

  • Keyboard.Bind[console]:SetName[consoletoggle]
This would change the Name of the console bind to consoletoggle

Change a bind key combination

  • Keyboard.Bind[normalkey].SetCombo[Shift+Ctrl+N]
This changes the standard 'normalkey' Combo from Shift+Alt+N to Shift+Ctrl+N

Set a release command

  • Keyboard.Bind[fullscreenkey]:SetReleaseCommand[echo Main screen turn on;fullscreen]
This ReleaseCommand would execute the command to echo 'Main screen turn on' then execute the fullscreen command

Delete a bind

  • Keyboard.Bind[fullscreenkey]:Delete
This would Delete the bind 'fullscreenkey'

See Also