libei 1.3.0
A library for Emulated Input

Functions

void eis_keymap_add (struct eis_keymap *keymap)
 Set the keymap on the device.
 
size_t eis_keymap_get_size (struct eis_keymap *keymap)
 
enum eis_keymap_type eis_keymap_get_type (struct eis_keymap *keymap)
 Returns the type for this keymap.
 
int eis_keymap_get_fd (struct eis_keymap *keymap)
 Return a memmap-able file descriptor pointing to the keymap used by the device.
 
struct eis_keymapeis_keymap_ref (struct eis_keymap *keymap)
 
struct eis_keymapeis_keymap_unref (struct eis_keymap *keymap)
 
void * eis_keymap_get_user_data (struct eis_keymap *eis_keymap)
 
void eis_keymap_set_user_data (struct eis_keymap *eis_keymap, void *user_data)
 
struct eis_deviceeis_keymap_get_device (struct eis_keymap *keymap)
 Return the device this keymap belongs to.
 

Detailed Description

The API to query a struct eis_keymap for information

Function Documentation

◆ eis_keymap_add()

void eis_keymap_add ( struct eis_keymap * keymap)

Set the keymap on the device.

The keymap is constant for the lifetime of the device and assigned to this device individually. Where the keymap has to change, remove the device and create a new one.

If a keymap is NULL, the device does not have an individual keymap assigned. Note that this may mean the client needs to guess at the keymap layout.

This function has no effect if called after eis_device_add()

◆ eis_keymap_get_device()

struct eis_device * eis_keymap_get_device ( struct eis_keymap * keymap)

Return the device this keymap belongs to.

◆ eis_keymap_get_fd()

int eis_keymap_get_fd ( struct eis_keymap * keymap)

Return a memmap-able file descriptor pointing to the keymap used by the device.

The keymap is constant for the lifetime of the device and assigned to this device individually.

◆ eis_keymap_get_size()

size_t eis_keymap_get_size ( struct eis_keymap * keymap)
Returns
the size of the keymap in bytes

◆ eis_keymap_get_type()

enum eis_keymap_type eis_keymap_get_type ( struct eis_keymap * keymap)

Returns the type for this keymap.

The type specifies how to interpret the data at the file descriptor returned by eis_keymap_get_fd().

◆ eis_keymap_get_user_data()

void * eis_keymap_get_user_data ( struct eis_keymap * eis_keymap)

◆ eis_keymap_ref()

struct eis_keymap * eis_keymap_ref ( struct eis_keymap * keymap)

◆ eis_keymap_set_user_data()

void eis_keymap_set_user_data ( struct eis_keymap * eis_keymap,
void * user_data )

◆ eis_keymap_unref()

struct eis_keymap * eis_keymap_unref ( struct eis_keymap * keymap)