Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mapping Control key modifier combination #152

Merged

Conversation

XuYicong
Copy link
Member

Implements #124

截屏2024-06-15 20 42 09

Managed to implement this without breaking keymap format compatibility, by prepending a symbol before the key name to mark it a modifier combination.

As Control key is now used as a modifier key, it can't be mapped separately any more. But existing keymaps with Control key mapped can still use it.

Limitations

Can only map Button type actions, this excludes DraggableButton and Joystick. It's because these two mainly rely on key code (instead of key name) to distinguish different keys. It's further because of the underlying keymap format, in which there are not enough fields for key name for these types.

@XuYicong XuYicong changed the title Support Control key modifier combination mapping Support mapping Control key modifier combination Jun 15, 2024
@Depal1 Depal1 requested a review from TheMoonThatRises June 28, 2024 20:51
@TheMoonThatRises
Copy link
Member

This could be the MacOS beta, but when using a keymapping with a control prefix, it makes the error sound (this also happens with cmd+k).

@Depal1
Copy link
Member

Depal1 commented Jun 30, 2024

This could be the MacOS beta, but when using a keymapping with a control prefix, it makes the error sound (this also happens with cmd+k).

I couldn't replicate this in macOS Sonoma, neither for the cmd+k. It might be a beta issue as you have suggested or shortcut conflicts in your environment.

@TheMoonThatRises TheMoonThatRises merged commit 31d1b02 into PlayCover:master Jun 30, 2024
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.

3 participants