mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-07 15:19:56 +09:00
Use X11 global hotkeys on X11 when possible to prevent clashing with keys used by other applications
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
namespace mgl {
|
||||
class Event;
|
||||
}
|
||||
|
||||
namespace gsr {
|
||||
struct Hotkey {
|
||||
uint64_t key = 0;
|
||||
@@ -24,5 +28,7 @@ namespace gsr {
|
||||
virtual void unbind_all_keys() {}
|
||||
virtual bool bind_action(const std::string &id, GlobalHotkeyCallback callback) { (void)id; (void)callback; return false; };
|
||||
virtual void poll_events() = 0;
|
||||
// Returns true if the event wasn't consumed (if the event didn't match a key that has been bound)
|
||||
virtual bool on_event(mgl::Event &event) { (void)event; return true; }
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user