Skip to content

Conversation

soywiz
Copy link

@soywiz soywiz commented Jan 31, 2025

In macOS usually ctrl+c, ctrl+v, ctrl+f and the like are mapped to cmd+c, cmd+v, cmd+f, etc. some apps like Parallels Desktop do this swap too.

This adds an option to allow swapping cmd and ctrl keys.

Right now the option is not translated, and it appears in all the platforms;
we could add this option only on mac but I don't have experience with Qt, so I will need help with that.

Copy link

@athei athei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a great addition. The control (strg on windows) is usually harder to reach on macOS keyboards and is not used much. It would also be very helpful for games where you could then bind the cmd key which is not possible right now as it is never sent as its considered a system key. This is also why I see no harm here because without the switching the key is simply never send.

I also don't think it doesn't have to be OS specific here. The cmd key is just the windows key. Just adjusting the lable is probably fine (as suggested by me).

We could also change the option to just be: "Sent the left windows/cmd button as strg'. This would already probably be what most people want. You still keep your right windows button.

@athei
Copy link

athei commented Feb 6, 2025

BTW there is already a similar PR that was never merged: #1078

But I think swaping with strg is more idiomatic.

Co-authored-by: Alexander Theißen <[email protected]>
@athei
Copy link

athei commented Feb 8, 2025

@cgutman Would you consider merging this? Do you have any concerns?

@twcut
Copy link

twcut commented Feb 20, 2025

I'd love to see this implemented. We're trying out Moonlight and this is the one function stopping us from migrating completely.

@soywiz
Copy link
Author

soywiz commented Feb 20, 2025

@athei @cgutman is there anything else I can do here for this to be merged?

@twcut
Copy link

twcut commented Feb 20, 2025

@soywiz i wonder if instead of this being an entirely new menu option it's just a third option for the existing dropdown... if the concern is clutter

@soywiz
Copy link
Author

soywiz commented Feb 20, 2025

Can you indicate which existing dropdown? Can't find anything related.
In any case, no feedback yet related to cluttering, so maybe that's not even an issue? Let's wait for a reply to figure out next steps.

@twcut
Copy link

twcut commented Feb 20, 2025

@soywiz I had read something on one of these related requests there was a concern about too many menu items.

I'd suggest changing 'capture system keyboard shortcuts' to always/fullscreen/swap super only

@soywiz
Copy link
Author

soywiz commented Feb 20, 2025

@soywiz I had read something on one of these related requests there was a concern about too many menu items.

Thanks. Can you provide the link so I can read the full conversation?

I'd suggest changing 'capture system keyboard shortcuts' to always/fullscreen/swap super only

What if the user wants to use always or fullscreen and also swap? Would we need 4 options in the selector?
In the controller section, there is a swap for buttons like A/B X/Y, so this would be similar and could be somehow symmetrical in terms of how it is exposted: a checkbox.

Other option could be an advanced settings, where you could remap any key. That would require a refactor and a lot of work and that's beyond what I can contribute here.

In any case @twcut the project is pretty straightforward to build on a mac following the README, you can use my branch and build it and use it locally so you can switch to moonlight. I'm using a build with my branch already.

@JulianGro
Copy link

Thank you so much for this PR. I have been trying for like 4 hours now to get something to do this for either Sunshine or VNC.

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.

4 participants