mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
keyboard: add utilities for pointer keys
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3803
This commit is contained in:
parent
7ce868bcf6
commit
95d25d833f
2 changed files with 61 additions and 0 deletions
|
|
@ -115,6 +115,23 @@ bool wlr_keyboard_set_keymap(struct wlr_keyboard *kb,
|
|||
|
||||
bool wlr_keyboard_keymaps_match(struct xkb_keymap *km1, struct xkb_keymap *km2);
|
||||
|
||||
/**
|
||||
* Interpret pointer button key symbols.
|
||||
*
|
||||
* Returns a button code (BTN_*) if the key symbol is a pointer button
|
||||
* (XKB_KEY_Pointer_Button*), 0 otherwise.
|
||||
*/
|
||||
uint32_t wlr_keyboard_keysym_to_pointer_button(xkb_keysym_t keysym);
|
||||
|
||||
/**
|
||||
* Interpret pointer motion key symbols.
|
||||
*
|
||||
* Sets dx and dy to horizontal and vertical motion deltas (0, 1 or -1) if the
|
||||
* key symbol is a pointer motion (XKB_KEY_Pointer_*). Otherwise, sets both dx
|
||||
* and dy to 0.
|
||||
*/
|
||||
void wlr_keyboard_keysym_to_pointer_motion(xkb_keysym_t keysym, int *dx, int *dy);
|
||||
|
||||
/**
|
||||
* Set the keyboard repeat info.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue