{{newin|[[0.9.2]]|092|type=function}}
Gets the key corresponding to the given hardware scancode.

Unlike [[KeyConstant|key constants]], [[Scancode]]s are keyboard layout-independent. For example the scancode "w" will be generated if the key in the same place as the "w" key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are.

Scancodes are useful for creating default controls that have the same physical locations on on all systems.
== Function ==
=== Synopsis ===
<source lang="lua">
key = love.keyboard.getKeyFromScancode( scancode )
</source>
=== Arguments ===
{{param|Scancode|scancode|The scancode to get the key from.}}
=== Returns ===
{{param|KeyConstant|key|The key corresponding to the given scancode, or "unknown" if the scancode doesn't map to a [[KeyConstant]] on the current system.}}
== See Also ==
* [[parent::love.keyboard]]
* [[love.keyboard.getScancodeFromKey]]
* [[love.keyboard.isScancodeDown]]
* [[love.keypressed]]
* [[love.keyreleased]]
[[Category:Functions]]
{{#set:Description=Gets the key corresponding to the given hardware scancode.}}
== Other Languages ==
{{i18n|love.keyboard.getKeyFromScancode}}