Background for Skyrim SE
Member of the Input script
intfunctionGetMappedKey(stringcontrol, intdeviceType=0xff)NativeGlobal

Description

Wiki Description

Returns the Input bound to a control for given device. (This function requires SKSE)

Documentation Comment

returns keycode bound to a control for given device

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"

Valid device types:
(default) auto detect
0 keyboard
1 mouse
2 gamepad


Caveats

CK Wiki - Notes

None


Parameters

  1. stringcontrol

    CK Wiki Description

    The name of the controls as a string. Valid controls listed below.

  2. intdeviceType=0xff

    CK Wiki Description

    The device type used. Valid devices listed below.


Examples

Int iForwardKey = Input.GetMappedKey("Forward")
Int[] Property iDxScanCode Auto ; 43 elements
String[] Property sControlName Auto ; Also 43 elements that indices will correspond. Elements must be filled in creation Kit.

Function RecordControlKeys()
    Int iIndex = sControlName.Length
    While iIndex > 0
        iIndex -= 1
        iDxScanCode[iIndex] = Input.GetMappedKey(sControlName[iIndex])
    EndWhile
EndFunction

Auto-Generated Example

string myString__control
int myInt__deviceType

int returnedValue = Input.GetMappedKey(myString__control, myInt__deviceType)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.