Ungrab devices if there is a keyboard lock (if an input remapping software runs and grabs gsr-ui virtual keyboard)

This commit is contained in:
dec05eba
2025-11-07 19:23:38 +01:00
parent 2bc2252d30
commit be07070789
11 changed files with 166 additions and 24 deletions

View File

@@ -9,7 +9,8 @@ namespace gsr {
public:
enum class GrabType {
ALL,
VIRTUAL
VIRTUAL,
NO_GRAB
};
GlobalHotkeysLinux(GrabType grab_type);
@@ -21,6 +22,8 @@ namespace gsr {
bool bind_key_press(Hotkey hotkey, const std::string &id, GlobalHotkeyCallback callback) override;
void unbind_all_keys() override;
void poll_events() override;
std::function<void()> on_gsr_ui_virtual_keyboard_grabbed;
private:
void close_fds();
private:

View File

@@ -94,6 +94,8 @@ namespace gsr {
void rebind_all_keyboard_hotkeys();
void set_notification_speed(NotificationSpeed notification_speed);
bool global_hotkeys_ungrab_keyboard = false;
private:
void update_upause_status();
@@ -102,6 +104,7 @@ namespace gsr {
void handle_keyboard_mapping_event();
void on_event(mgl::Event &event);
void recreate_global_hotkeys(const char *hotkey_option);
void create_frontpage_ui_components();
void xi_setup();
void handle_xi_events();