gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

Add customisable hotkey binds

Open anone-zone opened this issue 1 year ago • 5 comments

This PR moves hotkey handling out of backends and adds configuration via lua. Adds support for issue #457.

anone-zone avatar Jan 14 '25 17:01 anone-zone

Hmmm, this has a decent amount of overlap with https://github.com/ValveSoftware/gamescope/commit/fef0bca23508da7cb131438fc11c9737e279e934

I wonder if these two things can be merged. We should also make this configurable from lua.

misyltoad avatar Apr 25 '25 15:04 misyltoad

Oh neat, I can have a go at frankensteining something together

anone-zone avatar Apr 26 '25 06:04 anone-zone

Alright, I've ported the code to use the gamescope_action_binding protocol, and added configuration via lua.

Couple things I'm still unsure about:

We probably want default keys + commands defined somewhere in cpp-land in case the lua config file doesn't exist.

Starting another thread for hotkeys feels icky, but wlserver has to be running in order to bind actions, and I wasn't sure where else to put it.

anone-zone avatar May 04 '25 20:05 anone-zone

Can we make this not just execute a command, but just run a lua function that can do that?

misyltoad avatar May 27 '25 22:05 misyltoad

Added a lua function for running ConCommands.

~Btw looks like pipelines are failing due to extra/wlroots getting renamed to wlroots0.18.~ Resolved in 5a15c24607f7c81ca5c3b80b2ee7e0735179f176.

anone-zone avatar Jun 06 '25 14:06 anone-zone