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

From Lavish Software Wiki
Jump to navigation Jump to search
m (ISKernel:keyboard (Data Type) moved to ISKernel:keyboard (Object Type))
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
== Description ==
 
== 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 ==
 
== Members ==
 
* [[DataType:string|string]] '''System''': Name of the currently active system for keyboard input (DirectInput, Win32I)
 
* [[DataType:string|string]] '''System''': Name of the currently active system for keyboard input (DirectInput, Win32I)
Line 20: Line 20:
 
===Press a key===
 
===Press a key===
 
*Keyboard:Press[w]
 
*Keyboard:Press[w]
:Will press and release w immediately
+
:This will '''Press''' and release w immediately
 
===Hold a key down===
 
===Hold a key down===
 
*Keyboard:Hold[w]
 
*Keyboard:Hold[w]
:Will hold down the w key until released
+
:This will '''Hold''' down the w key until released
 
===Release a key===
 
===Release a key===
 
*Keyboard:Release[w]
 
*Keyboard:Release[w]
:Will release the w key  
+
:This will '''Release''' the w key  
 
===Type some text===
 
===Type some text===
 
Keyboard:Type[french toast is yummy]
 
Keyboard:Type[french toast is yummy]
:Will send 'french toast is yummy' to the session (will NOT hit enter)
+
:This will '''Type''' "french toast is yummy" to the session (will NOT hit enter)
 
===Display the currently active system for keyboard input===
 
===Display the currently active system for keyboard input===
 
*echo ${Keyboard.System}
 
*echo ${Keyboard.System}
 
;Output
 
;Output
 
  Win32I  
 
  Win32I  
===Create a bind command===
+
===Create a Bind command===
 
*Keyboard:Bind[fullscreenkey,Shift+Alt+F,fullscreen]
 
*Keyboard:Bind[fullscreenkey,Shift+Alt+F,fullscreen]
 
== 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}}
 
{{DT-Stub}}
 
[[Category:Inner Space]]
 
[[Category:Inner Space]]
[[Category:Inner Space Session]]
+
[[Category:Inner Space Kernel]]
[[Category:Inner Space Session Data Types]]
+
[[Category:Inner Space Kernel Data Types]]

Latest revision as of 00:58, 15 May 2006

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