Data Structures | |
| union | UL_KEYLIST |
| struct | UL_CONTROLLER |
Defines | |
| #define | ulSetKeyAutorepeat(keys, init, interval) ( ul_keys.autoRepeatMask = keys, ul_keys.autoRepeatInit = init, ul_keys.autoRepeatInterval = interval ) |
| #define | ulSetKeyAutorepeatMask(mask) (ul_keys.autoRepeatMask = mask) |
| #define | ulSetKeyAutorepeatInit(value) (ul_keys.autoRepeatInit = value) |
| #define | ulSetKeyAutorepeatInterval(value) (ul_keys.autoRepeatInterval = value) |
| #define | ulSetTouchpadDoubleClickDelay(value) (ul_keys.touch.doubleClickDelay = value) |
Enumerations | |
| enum | UL_KEYPAD_BITS { UL_KEY_A = 0x1, UL_KEY_B = 0x2, UL_KEY_SELECT = 0x4, UL_KEY_START = 0x8, UL_KEY_RIGHT = 0x10, UL_KEY_LEFT = 0x20, UL_KEY_UP = 0x40, UL_KEY_DOWN = 0x80, UL_KEY_R = 0x100, UL_KEY_L = 0x200, UL_KEY_X = 0x400, UL_KEY_Y = 0x800, UL_KEY_TOUCH = 0x1000, UL_KEY_LID = 0x2000 } |
Functions | |
| void | ulReadKeys (int flags) |
Variables | |
| UL_CONTROLLER | ul_keys |
| #define ulSetKeyAutorepeat | ( | keys, | |||
| init, | |||||
| interval | ) | ( ul_keys.autoRepeatMask = keys, ul_keys.autoRepeatInit = init, ul_keys.autoRepeatInterval = interval ) |
Sets the key autorepeat features (all in one).
| #define ulSetKeyAutorepeatMask | ( | mask | ) | (ul_keys.autoRepeatMask = mask) |
Sets the keymask for autorepeat: only keys present in this mask will be autorepeated.
| #define ulSetKeyAutorepeatInit | ( | value | ) | (ul_keys.autoRepeatInit = value) |
Sets the delay for the autorepeat feature to be initialized. Keys left in their state for the defined delay (number of ulReadKeys state, so 60 should be equal to a second) will be thrown again in the pressed member. So, you only have to check the pressed member if you want to use that keys for a menu, for example. A typical value would be 30 (1/2 second).
| #define ulSetKeyAutorepeatInterval | ( | value | ) | (ul_keys.autoRepeatInterval = value) |
Sets the rate at which keys will be repeated once the autorepeat has begun. A typical value could be 10 (6 times per second).
| #define ulSetTouchpadDoubleClickDelay | ( | value | ) | (ul_keys.touch.doubleClickDelay = value) |
Sets the maximum delay for a double click on the touchpad to be taken in account. The default value is 30 (1/2 second).
| enum UL_KEYPAD_BITS |
Bit values for the keypad buttons.
| void ulReadKeys | ( | int | flags | ) |
Reads the keypad and touchpad state.
| flags | Let it to 0 for now. |
The result is placed into the ul_keys system variable. You can then read from it. Examples:
ulReadKeys(0); if (ul_keys.held.down) //down key is held
Contains the default controller state read by ulReadKeys.
1.5.2