ISKernel:bind (Object Type)

From Lavish Software Wiki
Jump to navigation Jump to search

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