ISKernel:keyboard (Object Type)

From Lavish Software Wiki
Jump to navigation Jump to search

Description

The data type for keyboard control. The methods for this data type sends the emulation directly to the game bypassing all IS UI elements(e.g. console, user made UIs).

Members

  • string System: Name of the currently active system for keyboard input (DirectInput, Win32I)
  • bind Bind[name]: Retrieves the bind with the given name

Methods

  • Press[key]: Presses and immediately releases a key
  • Hold[key]: Presses and holds a key
  • Release[key]: Releases a held key
  • Type[text]: Types some text
  • Bind[name,key combination,command]: Binds a command to a key combination, with a given name (see Bind command)
  • Bind[-press|-release,name,key combination,command]: Binds a command to a key combination, with a given name (see Bind command)
Note: -press or -release is an optional first argument, default will be release if not given

Returns

Same as System

Examples

Press a key

  • Keyboard:Press[w]
This will Press and release w immediately

Hold a key down

  • Keyboard:Hold[w]
This will Hold down the w key until released

Release a key

  • Keyboard:Release[w]
This will Release the w key

Type some text

Keyboard:Type[french toast is yummy]

This will Type "french toast is yummy" to the session (will NOT hit enter)

Display the currently active system for keyboard input

  • echo ${Keyboard.System}
Output
Win32I 

Create a Bind command

  • Keyboard:Bind[fullscreenkey,Shift+Alt+F,fullscreen]

See Also