From 6c7158c06d41fd7c77a8a8b9d186440904950f8c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 14 Mar 2025 00:20:08 +0100 Subject: Support more keys for hotkeys (media keys) --- TODO | 11 ++++++++++- depends/mglpp | 2 +- src/gui/SettingsPage.cpp | 6 +++--- tools/gsr-global-hotkeys/keyboard_event.c | 6 +++++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 6014cc5..ec7ea50 100644 --- a/TODO +++ b/TODO @@ -137,4 +137,13 @@ Make input work with cjk input systems (such as fcitx). System startup option should also support runit and some other init systems, not only soystemd. -Allow using a hotkey such as printscreen or any other non-alphanumeric key without a modifier. Allow that in gsr-ui and gsr-global-hotkeys. Update the ui to match that. \ No newline at end of file +Allow using a hotkey such as printscreen or any other non-alphanumeric key without a modifier. Allow that in gsr-ui and gsr-global-hotkeys. Update the ui to match that. + +Implement region capture by adding it as a capture target. The region selection should be done in the same way as the gsr-ui overlay works, by doing xi grab and displaying a fullscreen semi-transparent window. + The window however should covert all monitors combined (use XWidthOfScreen/XHeightOfScreen) and selecting a region should make that region fully transparent to make it clear which region is selected. + Clicking instead of dragging should select that monitor (by passing region 0x0+X+Y). + Hide gsr-ui overlay before showing the region capture (the region capture should start when you start recording/screenshot). + +Use x11 shm instead of XGetImage (https://stackoverflow.com/questions/43442675/how-to-use-xshmgetimage-and-xshmputimage). + +Add a hotkey to record/stream/replay/screenshot region. diff --git a/depends/mglpp b/depends/mglpp index 44f0026..6341a8a 160000 --- a/depends/mglpp +++ b/depends/mglpp @@ -1 +1 @@ -Subproject commit 44f002631fc3ebbaa54846909e422eb757881c8a +Subproject commit 6341a8aa77761a94e6ef073bccd28f880ee61f95 diff --git a/src/gui/SettingsPage.cpp b/src/gui/SettingsPage.cpp index 9394104..e4319ce 100644 --- a/src/gui/SettingsPage.cpp +++ b/src/gui/SettingsPage.cpp @@ -351,14 +351,14 @@ namespace gsr { list->add_widget(std::move(video_bitrate_entry)); if(type == Type::STREAM) { - auto size_mb_label = std::make_unique