Difference between revisions of "Input Script"

86 bytes added ,  21:10, 17 November 2015
imported>CraftySentinel
(→‎SKSE Global Functions: Added Get Mapped Control, Should contain all SKSE Functions upto 1.06.16)
imported>Neoh4x0r
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
[[Category:SKSE]]
[[Category:SKSE Script Objects]]
Input related functions. (These global functions require SKSE)
Input related functions. (These global functions require SKSE)
== Definition ==
== Definition ==
Line 11: Line 5:
== Properties ==
== Properties ==
None
None


== SKSE Global Functions ==
== SKSE Global Functions ==


{|class="wikitable" width =100%
:'''Bool [[IsKeyPressed - Input|IsKeyPressed]](Int ''dxKeycode'')'''
!style="text-align:left;"|Function
:*Returns whether a key is pressed
!style="text-align:left;"|Description
|-
|[[IsKeyPressed - Input|Bool '''IsKeyPressed'''(Int ''dxKeycode'')]]
|Returns whether a key is pressed
|-


|[[TapKey - Input|'''TapKey'''(Int ''dxKeycode'')]]
:'''[[TapKey - Input|TapKey]](Int ''dxKeycode'')'''
|Taps the specified key
:*Taps the specified key
|-


|[[HoldKey - Input|'''HoldKey'''(Int ''dxKeycode'')]]
:'''[[HoldKey - Input|HoldKey]](Int ''dxKeycode'')'''
|Holds down the specified key until released
:*Holds down the specified key until released
|-


|[[ReleaseKey - Input|'''ReleaseKey'''(Int ''dxKeycode'')]]
:'''[[ReleaseKey - Input|ReleaseKey]](Int ''dxKeycode'')'''
|Releases the specified key
:*Releases the specified key
|-


|[[GetNumKeysPressed - Input|Int '''GetNumKeysPressed'''()]]
:'''Int [[GetNumKeysPressed - Input|GetNumKeysPressed]]()'''
|How many keys are pressed
:*How many keys are pressed
|-


|[[GetNthKeyPressed - Input|Int '''GetNthKeyPressed'''(Int ''n'')]]
:'''Int [[GetNthKeyPressed - Input|GetNthKeyPressed]](Int ''n'')'''
|For walking over the pressed keys
:*For walking over the pressed keys
|-


|[[GetMappedKey - Input|Int '''GetMappedKey'''(String ''Control'', Int ''deviceType'')]]
:'''Int [[GetMappedKey - Input|GetMappedKey]](String ''Control'', Int ''deviceType'')'''
|Returns dxKeycode bound to a control for given device
:*Returns dxKeycode bound to a control for given device
|-
 
:'''String [[GetMappedControl - Input|GetMappedControl]](Int ''keycode'')'''
:*Returns the name of the control bound to the given keycode ("" if unbound)


|[[GetMappedControl - Input|String '''GetMappedControl'''(Int ''keycode'')]]
|Returns the name of the control bound to the given keycode ("" if unbound)
|-
|}


== Member Functions ==
== Member Functions ==
None
None
== Events ==
== Events ==
None
None
== DXScanCodes ==
== DXScanCodes ==
<source lang="html4strict"> Hex  Dec  Button
<source lang="html4strict"> Hex  Dec  Button
Line 145: Line 132:
0x9D  157  Right Control
0x9D  157  Right Control
0xB5  181  NUM/
0xB5  181  NUM/
0xB7  183  SysRq / PtrScr
0xB8  184  Right Alt
0xB8  184  Right Alt
0xC5  197  Pause
0xC7  199  Home
0xC7  199  Home
0xC8  200  Up Arrow
0xC8  200  Up Arrow
Line 185: Line 174:
0x118  280  LT
0x118  280  LT
0x119  281  RT</source>
0x119  281  RT</source>
== Notes ==
== Notes ==
*The above are for a US keyboard. Others, such as AZERTY, might not match up depending upon the key(s) in question.
*The key codes are ordered as they appear on US QWERTY keyboards from left to right and top to bottom.
*Other keyboards such as AZERTY, might not match up depending upon the key(s) in question.
 
== See Also ==
[[RegisterForKey - Form]]
[[OnKeyDown - Form]]
[[OnKeyUp - Form]]
 
 
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
[[Category:SKSE]]
[[Category:SKSE Script Objects]]
Anonymous user