#include <nds/jtypes.h>
Enumerations | |
| enum | KEYPAD_BITS { KEY_A = BIT(0), KEY_B = BIT(1), KEY_SELECT = BIT(2), KEY_START = BIT(3), KEY_RIGHT = BIT(4), KEY_LEFT = BIT(5), KEY_UP = BIT(6), KEY_DOWN = BIT(7), KEY_R = BIT(8), KEY_L = BIT(9), KEY_X = BIT(10), KEY_Y = BIT(11), KEY_TOUCH = BIT(12), KEY_LID = BIT(13) } |
| Bit values for the keypad buttons. More... | |
Functions | |
| void | scanKeys () |
| Obtains the current keypad state. | |
| uint32 | keysHeld (void) |
| Obtains the current keypad held state. | |
| uint32 | keysDown (void) |
| Obtains the current keypad pressed state. | |
| uint32 | keysDownRepeat (void) |
| Obtains the current keypad pressed or repeating state. | |
| void | keysSetRepeat (u8 setDelay, u8 setRepeat) |
| Sets the key repeat parameters. | |
| uint32 | keysUp (void) |
| Obtains the current keypad released state. | |
| touchPosition | touchReadXY () |
| Obtains the current touchscreen co-ordinates. | |
| enum KEYPAD_BITS |
Bit values for the keypad buttons.
00104 { 00105 KEY_A = BIT(0), 00106 KEY_B = BIT(1), 00107 KEY_SELECT = BIT(2), 00108 KEY_START = BIT(3), 00109 KEY_RIGHT = BIT(4), 00110 KEY_LEFT = BIT(5), 00111 KEY_UP = BIT(6), 00112 KEY_DOWN = BIT(7), 00113 KEY_R = BIT(8), 00114 KEY_L = BIT(9), 00115 KEY_X = BIT(10), 00116 KEY_Y = BIT(11), 00117 KEY_TOUCH = BIT(12), 00118 KEY_LID = BIT(13) 00119 } KEYPAD_BITS;
| uint32 keysDown | ( | void | ) |
Obtains the current keypad pressed state.
| uint32 keysDownRepeat | ( | void | ) |
Obtains the current keypad pressed or repeating state.
| uint32 keysHeld | ( | void | ) |
Obtains the current keypad held state.
Sets the key repeat parameters.
| setDelay | Number of scanKeys calls before keys start to repeat. | |
| setRepeat | Number of scanKeys calls before keys repeat. |
| uint32 keysUp | ( | void | ) |
Obtains the current keypad released state.
| void scanKeys | ( | ) |
Obtains the current keypad state.
Call this function once per main loop in order to use the keypad functions.
| touchPosition touchReadXY | ( | ) |
Obtains the current touchscreen co-ordinates.
1.5.4