Difference between revisions of "GetMappedKey - Input"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Qazaaq
(added f4se member)
 
imported>Jlundin
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:Incomplete Article}}
'''F4SE Member of:''' [[Input Script]]
'''F4SE Member of:''' [[Input Script]]
{{Template:Papyrus:RequiredF4SE|version=0.3.1}}
{{Template:Papyrus:RequiredF4SE|version=0.3.1}}
Returns the keycode bound to a control for given device.


Placeholder Description.


== Syntax ==
== Syntax ==
<source lang="papyrus">
<source lang="papyrus">
int Function GetMappedKey(string asControl, int aiDeviceType = 0xFF) Native Global
int Function GetMappedKey(string control, int deviceType = 0xFF) global native
</source>
</source>


== Parameters ==
== Parameters ==
*asControl: Placeholder Description.
*asControl: a string for the control you wish to get the mapped key for.
*aiDeviceType: Placeholder Description.
 
Valid controls:
 
"Forward", "Back", "Strafe Left", "Strafe Right", "Move", "Look", "Left Attack/Block", "Right Attack/Block"
"Activate", "Ready Weapon", "Tween Menu", "Toggle POV", "Zoom Out", "Zoom In", "Jump", "Sprint", "Shout",
"Sneak", "Run", "Toggle Always Run", "Auto-Move", "Favorites", "Hotkey1", "Hotkey2", "Hotkey3", "Hotkey4",
"Hotkey5", "Hotkey6", "Hotkey7", "Hotkey8", "Quicksave", "Quickload", "Wait", "Journal", "Pause", "Screenshot",
"Multi-Screenshot", "Console", "CameraPath", "Quick Inventory", "Quick Magic", "Quick Stats", "Quick Map"
 
*aiDeviceType: an integer corresponding to the device you request the mapped key tied to the specified control.
 
Valid device types:
(default)         auto detect
 
0 keyboard
 
1 mouse
 
2 gamepad


== Return Value ==
== Return Value ==
*Placeholder Description.
* Returns the scan code corresponding to the control's mapped key.


== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
; Placeholder Code.
Input.GetMappedKey("Jump", 2) ; my XBOX controller uses this key for "Jump"!
</source>
</source>


== See Also ==
== See Also ==
*[[Input Script]]
*[[Input Script]]
*[[GetMappedControl - Input]]
*[[DirectX Scan Codes]]





Latest revision as of 04:01, 27 February 2021

F4SE Member of: Input Script
Requires F4SE version 0.3.1 or higher. Returns the keycode bound to a control for given device.


Syntax[edit | edit source]

int Function GetMappedKey(string control, int deviceType = 0xFF) global native

Parameters[edit | edit source]

  • asControl: a string for the control you wish to get the mapped key for.

Valid controls:

"Forward", "Back", "Strafe Left", "Strafe Right", "Move", "Look", "Left Attack/Block", "Right Attack/Block" "Activate", "Ready Weapon", "Tween Menu", "Toggle POV", "Zoom Out", "Zoom In", "Jump", "Sprint", "Shout", "Sneak", "Run", "Toggle Always Run", "Auto-Move", "Favorites", "Hotkey1", "Hotkey2", "Hotkey3", "Hotkey4", "Hotkey5", "Hotkey6", "Hotkey7", "Hotkey8", "Quicksave", "Quickload", "Wait", "Journal", "Pause", "Screenshot", "Multi-Screenshot", "Console", "CameraPath", "Quick Inventory", "Quick Magic", "Quick Stats", "Quick Map"

  • aiDeviceType: an integer corresponding to the device you request the mapped key tied to the specified control.

Valid device types: (default) auto detect

0 keyboard

1 mouse

2 gamepad

Return Value[edit | edit source]

  • Returns the scan code corresponding to the control's mapped key.

Examples[edit | edit source]

Input.GetMappedKey("Jump", 2) ; my XBOX controller uses this key for "Jump"!

See Also[edit | edit source]