elpekenin/xap.h

Utilities on top of XAP.

See also

QMK’s documentation about XAP.

Caution

XAP is still work in progress.

Pull Request for the feature.


type xap_msg_id_t
[source]

Identifier for each type of message.


struct screen_pressed_msg_t
[source]

Inform about a screen press event.

xap_msg_id_t msg_id
[source]

Identify this message.

uint8_t screen_id
[source]

Identify the screen.

uint16_t x
[source]

X-coord of the touchpoint.

uint16_t y
[source]

Y-coord of the touchpoint.

void xap_screen_pressed(uint8_t screen_id, touch_report_t report)
[source]

Send a message to PC’s client about a screen press event.


struct screen_released_msg_t
[source]

Information about a screen release event.

xap_msg_id_t msg_id
[source]

Identify this message.

uint8_t screen_id
[source]

Identify the screen.

void xap_screen_released(uint8_t screen_id)
[source]

Send a message to PC’s client about a screen release event.


struct layer_change_msg_t
[source]

Information about a layer change event.

xap_msg_id_t msg_id
[source]

Identify this message.

layer_state_t layer
[source]

Layer state.

void xap_layer(layer_state_t state)
[source]

Send a message to PC’s client about a layer change event.


struct keyevent_msg_t
[source]

Information about a key event.

struct _base
[source]

Internal type used to hold event’s information.

Defined an inner struct instead of plain attributes to compute space left for the string.

xap_msg_id_t msg_id
[source]

Identify this message.

uint16_t keycode
[source]

Keycode involved.

bool pressed
[source]

Whether it got pressed or released.

uint8_t layer
[source]

Highest layer currently enabled.

uint8_t row
[source]

Electrical row of the key.

uint8_t col
[source]

Electrical column of the key.

uint8_t mods
[source]

Current modifiers.

char str[MAX_PAYLOAD - sizeof(struct _base) - 1]
[source]

String representation of the keycode.

uint8_t null
[source]

Ensure we have a null terminator byte.

void xap_keyevent(uint16_t keycode, keyrecord_t *record)
[source]

Send a message to PC’s client about a key event.


struct shutdown_msg_t
[source]

Information about shutdown event.

xap_msg_id_t msg_id
[source]

Identify this message.

bool bootloader
[source]

Whether MCU is rebooting or jumping to bootloader.

void xap_shutdown(bool bootloader)
[source]

Send a message to PC’s client about a shutdown event.