Custom Controls ExtensionThis extension should work on every platform. I have only tested it on Flash, if you any issues with it let me know.
This extension provides blocks to change the game controls at runtime.
For example, to switch between arrow keys and WASD for movement.
Download this Extension. (For instructions see
How to Install and Update an Extension.)
You can change the keys of existing controls:

Or you can add additional keys:

To keep the key configuration between sessions, you can store the current configuration within a game attribute before saving the game.

Then the configuration can be restored after loading the game.
To get/apply the control config, you need Stencyl 3.1 or build >= b7140.Usage Notesset control [ ] to key with name: [ ]Sets the key for the selected control (no other keys will be assigned to that control afterwards). The names of the keys are the same as the fields in the
Keyboard class (i.e. all upper case).
add to control [ ] key with name: [ ]Adds a key to the selected control (any keys that have been assigned to that control will still work afterwards).
The parameters are the same as for the previous block.
set control [ ] to key code: [ ]Sets the key for the selected control (no other keys will be assigned to that control afterwards). Expects the key code instead of the key name. Use for example with the "key code" block from the "Any Key".
add to control [ ] key code: [ ]Adds a key to the selected control (any keys that have been assigned to that control will still work afterwards).
The parameters are the same as for the previous block.
get control configReturns a list containing all assignments of keys to controls. (It is an array of strings, where each string is in the form "control;key1,[key2,]...", but you don't need to care about that. ) Store this in a game attribute before saving the game if you want to keep the current controls.
apply control config [ ]Use this to restore the controls to what they have been at the last save. Pass the list that you stored in a game attribute as the only parameter. (Don't pass anything else to this block, unless it has the same format.)
Version History1.0 Initial version
1.1 Make the blocks green again (extension block now honor the color attribute

)
1.2 Fix: some keys where not accepted; Add key code blocks.