Files
my_glut/headers/input/input_events.h

50 lines
1.5 KiB
C
Raw Permalink Normal View History

#pragma once
#include <events.h> /* from mydevicehandler */
/* should include it in the input library instead... */
#include <linux/input.h>
#include "touch/touch_controller_L1_builder.h"
extern unsigned char buffered_keys[KEY_CNT];
/* DELTAS
yes, typedef can also be used like this
typedef unsigned char buffered_keys_transition[KEY_CNT];
*/
void dispatch_input_event();
static void dispatch_input_absolute_event( device_event event);
static void dispatch_input_key_event( device_event event);
static void dispatch_regular_absolute_event( device_event event);
/* subtype of input_absolute_event */
static void dispatch_multitouch_event( device_event event);
/* common keyboard codes from 0 up to KEY_MACRO, before KEY_MUTE */
static void dispatch_keyboard_keys( device_event event);
/* interesting keys from KEY_MIN_INTERESTING = KEY_MUTE up to BTN_DEAD, before BTN_GAMEPAD */
static void dispatch_interesting_keys_1( device_event event);
/* joypad keys, from BTN_GAMEPAD up to BTN_THUMBR, gap of one before BTN_DIGI */
static void dispatch_interesting_keys_2( device_event event);
/* interesting keys, from BTN_DIGI up to the MAX */
static void dispatch_interesting_keys_3( device_event event);
/* reserving the NULL character code for unsupported keys
maps from linux input.h key codes to ascii
*/
char get_ascii_code( unsigned short linux_code);
/* shitty hack waiting for the use of hashmaps */
unsigned short remap_joypad_to_keyboard( unsigned short linux_key);