Editing
GetMappedKey - Input
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Scripting]] [[Category:Papyrus]] [[Category:SKSE]] '''SKSE Member of:''' [[Input Script]] {{SKSEFunction|1.06.00}} Returns the [[Input_Script#DXScanCodes|DXScanCodes]] bound to a control for given device. (This function requires SKSE) == Syntax == <syntaxhighlight lang="papyrus">Int Function GetMappedKey(String Control, Int DeviceType = 0xFF) Global Native</syntaxhighlight> == Parameters == *Control: The name of the controls as a string. Valid controls listed below. :*Activate :*Auto-Move :*Back :*CameraPath :*Console :*Favorites :*Forward :*Hotkey1 :*Hotkey2 :*Hotkey3 :*Hotkey4 :*Hotkey5 :*Hotkey6 :*Hotkey7 :*Hotkey8 :*Journal :*Jump :*Left Attack/Block :*Look :*Move :*Multi-Screenshot :*Pause :*Quick Inventory :*Quick Magic :*Quick Map :*Quick Stats :*Quickload :*Quicksave :*Ready Weapon :*Right Attack/Block :*Run :*Screenshot :*Shout :*Sneak :*Sprint :*Strafe Left :*Strafe Right :*Toggle Always Run :*Toggle POV :*Tween Menu :*Wait :*Zoom In :*Zoom Out *DeviceType: The device type used. Valid devices listed below. :*0xFF = 255 = Auto detect (Default) :*0x00 = 0 = Keyboard :*0x01 = 1 = Mouse :*0x02 = 2 = Gamepad == Return Value == Returns [[Input_Script#DXScanCodes|DXScanCode]] bound to a control for given device as an integer. If the key is not mapped (common for things like "Quick Inventory" when using a controller) returns -1. == Examples == *Standard use: <syntaxhighlight lang="papyrus">Int iForwardKey = Input.GetMappedKey("Forward")</syntaxhighlight> *Record all DxScanCodes currently used by Skyrim: <syntaxhighlight lang="papyrus">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</syntaxhighlight> == Notes == None == See Also == *[[Form Script]] *[[Input Script]] *[[IsKeyPressed - Input]] *[[GetNumKeysPressed - Input]] *[[RegisterForKey - Form]] *[[UnregisterForKey - Form]] *[[UnregisterForAllKeys - Form]] *[[OnKeyDown - Form]] *[[OnKeyUp - Form]]
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:SKSEFunction
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values