|
1.
|
|
|
Customizing the Keymap
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:7
|
|
2.
|
|
|
The variable :var:`config.keymap` contains a map from event names to lists of keysyms that cause those events to occur.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:9
|
|
3.
|
|
|
Many players have learned the default set of Ren'Py keybindings, and expect them to be the same from game to game.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:14
|
|
4.
|
|
|
In Ren'Py keysyms are strings representing mouse buttons, joystick buttons, or keyboard keys.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:17
|
|
5.
|
|
|
Mouse buttons use keysyms of the form 'mouseup_#' or 'mousedown_#', where # is a button number. Ren'Py assumes a five button mouse, where buttons 1, 2, and 3 are the left, middle, and right buttons, while buttons 4 and 5 are generated by scrolling the wheel up and down. For example, "mousedown_1" is generally a press of the left mouse button, "mouseup_1" is a release of that button, and "mousedown_4" is a turn of the scroll wheel to the top.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:20
|
|
6.
|
|
|
Joystick keysyms begin with joy\_. They are defined in :var:`config.joystick_keys`, and mapped to actual joystick events by the user.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:28
|
|
7.
|
|
|
There are two kinds of keyboard keysyms. The first is a string containing a character that is generated when a key is pressed. This is useful for binding alphabetic keys and numbers. Examples of these keysyms include "a", "A", and "7".
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:31
|
|
8.
|
|
|
Keyboard keysyms can also be the symbolic name for the key. This can be any of the K\_ constants taken from pygame.constants. This type of keysym looks like "K\_BACKSPACE", "K\_RETURN", and "K\_TAB"; a full list of this kind of keysyms may be found `here <http://www.pygame.org/docs/ref/key.html>`_.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:35
|
|
9.
|
|
|
Keyboard keysyms may be preceded by the prefixes "alt\_", "meta\_", "shift\_", or "noshift\_". The first three of these require the corresponding modifier key to be pressed. (Meta is present on Linux keyboards, and corresponds to the Command key on a Mac.) "noshift\_" requires that the shift key not be pressed.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:40
|
|
10.
|
|
|
To change a binding, update the appropriate list in :var:`config.keymap`. The following code adds the 't' key to the list of keys that dismiss a say statement, and removes the space key from that list. ::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/keymap.rst:45
|