Skip to content

Add customisable hotkey binds#1705

Open
laurirasanen wants to merge 4 commits intoValveSoftware:masterfrom
laurirasanen:custom-shortcuts
Open

Add customisable hotkey binds#1705
laurirasanen wants to merge 4 commits intoValveSoftware:masterfrom
laurirasanen:custom-shortcuts

Conversation

@laurirasanen
Copy link
Copy Markdown

@laurirasanen laurirasanen commented Jan 14, 2025

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

@misyltoad
Copy link
Copy Markdown
Collaborator

Hmmm, this has a decent amount of overlap with fef0bca

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

@laurirasanen
Copy link
Copy Markdown
Author

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

@laurirasanen laurirasanen marked this pull request as draft April 26, 2025 16:41
@laurirasanen laurirasanen changed the title Add customisable shortcut keybinds Add customisable hotkey binds May 4, 2025
@laurirasanen laurirasanen marked this pull request as ready for review May 4, 2025 20:09
@laurirasanen
Copy link
Copy Markdown
Author

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.

@misyltoad
Copy link
Copy Markdown
Collaborator

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

@laurirasanen
Copy link
Copy Markdown
Author

laurirasanen commented Jun 6, 2025

Added a lua function for running ConCommands.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants