# hid.h Self-explanatory lol ## BASE ### `Result hidInit(void);` Inilialize HID. ### `void hidExit(void);` Exit HID. ### `void hidScanInput(void);` Check the status of each button. Must be called before hidKeys*(). ## BUTTONS ### `u32 hidKeys*(void);` Test a certain condition and return a u32 containing the boolean state for each button. (TODO visual) Use `hidKey*() & KEY_*` to have the boolean value for a specific button. - `u32 hidKeysHeld();` True if the key is currently pressed. - `u32 hidKeysDown();` True if the key has just been pressed. (TODO not only once?) - `u32 hidKeysDownRepeat();` TODO - `u32 hidKeysUp();` True if the key has just been released. ### KEY_* Simple buttons: - KEY_{A|B|X|Y}: A/B/X/Y buttons. - KEY_{SELECT|START}: Select/Start buttons. - KEY_{L|R}: L/R buttons. Directions: - KEY_D{RIGHT|LEFT|UP|DOWN}: D-Pad directions. - KEY_CPAD_{RIGHT|LEFT|UP|DOWN}: Circle Pad directions. - KEY_{UP|DOWN|LEFT|RIGHT}: Catch Circle Pad and D-Pad at the same time. New 3DS only: - KEY_{ZL|ZR}: ZL/ZR buttons (New 3DS only) - KEY_CSTICK{RIGHT|LEFT|UP|DOWN}: C-Stick directions (New 3DS only) Uh? - KEY_TOUCH: (Not implemented? TODO) ## TOUCH SCREEN ### `void hidTouchRead(touchPosition *dest);` Read the current touch position. ### `typedef touchPosition;` ```c++ typedef struct { u16 px; u16 py; } touchPosition; ``` ## TOUCH SCREEN ### `void hidCircleRead(circlePosition *dest);` Read the current circle pad position. ### `typedef circlePosition;` ```c++ typedef struct { u16 dx; u16 dy; } circlePosition; ```