|
1.
|
|
|
Customizing the Keymap
|
|
|
|
キーマップのカスタマイズ
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
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.
|
|
|
|
変数 :var:`config.keymap` にはイベント名とそのイベントを発生させるキーシンボルのリストからなる辞書が入ります。
|
|
Translated and reviewed by
akakyouryuu
|
|
|
|
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.
|
|
|
|
多くの人々は Ren'Py のキーバインディングのデフォルト設定を経験しているので、それらがゲーム間で一致することを期待します。
|
|
Translated and reviewed by
akakyouryuu
|
|
|
|
Located in
../../source/keymap.rst:14
|
|
4.
|
|
|
In Ren'Py keysyms are strings representing mouse buttons, joystick buttons, or keyboard keys.
|
|
|
|
Ren'Py ではキーシンボルはマウスボタン、ジョイスティック、キーボードキーを表す文字列です。
|
|
Translated and reviewed by
akakyouryuu
|
|
|
|
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.
|
|
|
|
マウスボタンは 「 mouseup_# 」や「 mousedown_# 」の形式でキーシンボルを使用します。ここでの # はボタン番号です。 Ren'Py は5 つのボタン 1, 2, 3 をそれぞれ左、中、右ボタン、 4, 5 はホイールアップ、ホイールダウンと解釈します。例えば「 mousedown_1 」は左ボタンを押したとき「 mousedown_4 」はホイールを上方に回した時です。
|
|
Translated and reviewed by
akakyouryuu
|
|
|
|
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.
|
|
|
|
ジョイスティックキーシンボルは joy\_ で始まります。 それらは :var:`config.joystick_keys` で定義され、ユーザーによる実際のジョイスティックイベントに割り当てられます。
|
|
Translated and reviewed by
akakyouryuu
|
|
|
|
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".
|
|
|
|
2 種類のキーシンボルが存在します。 1 つ目はキーが押されると生成される文字を含める文字列です。 これはアルファベットキーと数字に対するバインディングに便利です。これらのキーシンボルの例に 「 a 」、「 A」、「 7 」 があります。
|
|
Translated and reviewed by
akakyouryuu
|
|
|
|
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>`_.
|
|
|
|
キーボードのキーシンボルにはそのキーのシンボル名も可能です。これは pygame.constants から所得するどんな k\_ 定数も可能で、この形式のキーシンボルは「 K\_BACKSPACE 」,「 K\_RETURN 」, 「 K\_TAB 」のようになります。この種類のキーシンボルの完全なリストは `こちら <http://www.pygame.org/docs/ref/key.html>`_ で見つけられます。
|
|
Translated by
Koichi Akabe
|
|
|
|
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.
|
|
|
|
キーボードのキーシンボルには接頭辞「 alt\_ 」、「 meta\_ 」、「 shift\_ 」、または「 noshift\_ 」が付くかもしれません。それらのうち最初の 3 つは押される修飾キーです。 ( Meta キーは Linux キーボードで用意され、 Mac のコマンドキーに対応します。 ) 「noshift\_ 」はシフトキーが押されていないことを必要とします。
|
|
Translated and reviewed by
akakyouryuu
|
|
|
|
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. ::
|
|
|
|
バインディングを変更するには、 変数 :var:`config.keymap` の適切なリストを更新します。以下のコードは 't' キーを say ステートメントを進行させるキーのリストに加え、そのリストからスペースキーを取り除きます。 ::
|
|
Translated by
Koichi Akabe
|
|
|
|
Located in
../../source/keymap.rst:45
|