mirror of
https://github.com/labwc/labwc.git
synced 2026-06-13 14:33:18 -04:00
Merge 78f2b4656c into 2135fb0d35
This commit is contained in:
commit
eade18fdcd
9 changed files with 54 additions and 175 deletions
16
include/input/key-state-indicator.h
Normal file
16
include/input/key-state-indicator.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_KEY_STATE_INDICATOR_H
|
||||
#define LABWC_KEY_STATE_INDICATOR_H
|
||||
|
||||
struct seat;
|
||||
|
||||
/*
|
||||
* All keycodes in these functions are (Linux) libinput evdev scancodes which is
|
||||
* what 'wlr_keyboard' uses (e.g. 'seat->keyboard_group->keyboard->keycodes').
|
||||
* Note: These keycodes are different to XKB scancodes by a value of 8.
|
||||
*/
|
||||
|
||||
void key_state_indicator_update(struct seat *seat);
|
||||
void key_state_indicator_toggle(void);
|
||||
|
||||
#endif /* LABWC_KEY_STATE_INDICATOR_H */
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_KEY_STATE_H
|
||||
#define LABWC_KEY_STATE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct seat;
|
||||
|
||||
/*
|
||||
* All keycodes in these functions are (Linux) libinput evdev scancodes which is
|
||||
* what 'wlr_keyboard' uses (e.g. 'seat->keyboard_group->keyboard->keycodes').
|
||||
* Note: These keycodes are different to XKB scancodes by a value of 8.
|
||||
*/
|
||||
|
||||
void key_state_indicator_update(struct seat *seat);
|
||||
void key_state_indicator_toggle(void);
|
||||
|
||||
/**
|
||||
* key_state_pressed_sent_keycodes - generate array of pressed+sent keys
|
||||
* Note: The array is generated by subtracting any bound keys from _all_ pressed
|
||||
* keys (because bound keys were not forwarded to clients).
|
||||
*/
|
||||
uint32_t *key_state_pressed_sent_keycodes(void);
|
||||
int key_state_nr_pressed_sent_keycodes(void);
|
||||
|
||||
void key_state_set_pressed(uint32_t keycode, bool is_pressed);
|
||||
void key_state_store_pressed_key_as_bound(uint32_t keycode);
|
||||
bool key_state_corresponding_press_event_was_bound(uint32_t keycode);
|
||||
void key_state_bound_key_remove(uint32_t keycode);
|
||||
int key_state_nr_bound_keys(void);
|
||||
|
||||
#endif /* LABWC_KEY_STATE_H */
|
||||
|
|
@ -83,6 +83,9 @@ struct seat {
|
|||
|
||||
struct lab_set bound_buttons;
|
||||
|
||||
/* Keys that have been pressed and not consumed by compositor actions */
|
||||
struct lab_set pressed_sent_keys;
|
||||
|
||||
struct {
|
||||
bool active;
|
||||
struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue