I thought I'd include a brief explanation of controls here, to avoid confusion. Note that I'm going to use the words "button" and "key" to mean separate things.
Consider a
Sega Genesis controller. There are the directional buttons, and three more buttons called A, B and C. These are the buttons that the scripts in Essentials refer to. C is the "confirm/use" button, B is the "back/cancel/menu" button, and A is the "run/other" button. There are several other available buttons, such as the X, Y and Z buttons (currently unused), plus ones like F5, L and R (which are all used).
Now look at a keyboard. At the bottom left are the keys Z, X and C. These correspond to the controller's A, B and C buttons respectively. So if you press the Z key on your keyboard, the game translates this into Input::A.
Where is this translation done? In the script section
PokemonControls, in def
self.buttonToKey. This method lists all the available buttons, and then matches them to one (or more) keys on a keyboard. For example:
Code:
[COLOR=Blue]when[/COLOR] Input::A
[COLOR=Blue]return[/COLOR] [[COLOR=DarkRed]0x5A[/COLOR],[COLOR=DarkRed]0x10[/COLOR]] [COLOR=Green]# Z, Shift[/COLOR]
[COLOR=Blue]when[/COLOR] Input::B
[COLOR=Blue]return[/COLOR] [[COLOR=DarkRed]0x58[/COLOR],[COLOR=DarkRed]0x1B[/COLOR]] [COLOR=Green]# X, ESC [/COLOR]
[COLOR=Blue]when[/COLOR] Input::C
[COLOR=Blue]return[/COLOR] [[COLOR=DarkRed]0x43[/COLOR],[COLOR=DarkRed]0x0d[/COLOR],[COLOR=DarkRed]0x20[/COLOR]] [COLOR=Green]# C, ENTER, Space[/COLOR]
As FL mentioned, the X button (the A key on the keyboard) is currently unused. To make the A key on the keyboard toggle running, you would use
Input::X. It would be convenient, since it's the key directly above the one used for running.