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

change default local r9k keybinding per macOS standard #5764

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jacob-thompson
Copy link

fixes #5711

#5711 is labelled as a bug, but this behavior is intended (source) (source)

easiest fix is to change the default local r9k keymap. while Ctrl/Cmd + H is a more mnemonic keymap, I do not think it is mnemonic enough to be worth making all macOS users have to configure this setting manually.

Copy link
Collaborator

@Mm2PL Mm2PL left a comment

Choose a reason for hiding this comment

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

Ctrl+H is a perfectly good bind for every other OS, I don't want it changed for any other system.

src/controllers/hotkeys/HotkeyController.cpp Outdated Show resolved Hide resolved
@jacob-thompson
Copy link
Author

@Nerixyz @Mm2PL see changes

I don't have a windows machine to test with but this works on my end

@Nerixyz
Copy link
Contributor

Nerixyz commented Dec 10, 2024

I don't have a windows machine to test with but this works on my end

This doesn't change anything on Windows or Linux, so it's fine. I don't know about common macOS key binds, so I can't comment on the chosen bind.

@jacob-thompson
Copy link
Author

jacob-thompson commented Dec 10, 2024 via email

@jacob-thompson jacob-thompson requested a review from Mm2PL January 18, 2025 21:20
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

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

I agree that setting a hotkey to one of the macOS "system" bindings is wrong.

However, I think I would prefer to not set a hotkey in this specific scenario for macOS, rather than adding a macOS-specific hotkey.
macOS users can still add a custom hotkey to the "toggle local r9k" action as they see fit.

@jacob-thompson
Copy link
Author

jacob-thompson commented Jan 19, 2025

@pajlada

However, I think I would prefer to not set a hotkey in this specific scenario for macOS, rather than adding a macOS-specific hotkey.

I agree that it is a bit silly to have one specific default hotkey be different for one specific subset of users. Still, I would argue that the given solution is best.

The only other "solution" I can think of at the moment that would address each of this PR's reviews would be to set the following attribute, which modifies Qt's default behavior of swapping Control with Command on macOS:

QCoreApplication::setAttribute(Qt::AA_MacDontSwapCtrlAndMeta);

However, this is a terrible solution, mainly because this affects existing configurations. It also presents the same exact issue that this PR aims to solve, as Control+E is also a macOS system keybind.

Another possible solution was my original commit, that simply changed the hotkey for all systems, but I agreed with the other reviewers that a macOS-specific issue shouldn't affect non-macOS behavior. I also felt that replacing Ctrl+H altogether could possibly lead to this same exact issue re-occurring in the distant future.

macOS users can still add a custom hotkey to the "toggle local r9k" action as they see fit.

Of course. They can do this whether the given solution is implemented or not. The issue that this PR aims to solve, though, is that macOS users are forced to configure this manually should they want to utilize this feature.

@pajlada
Copy link
Member

pajlada commented Jan 20, 2025

If this was a more used feature I would agree to consider a macOS binding for it, but adding it adds complexity to all future hotkeys that I want to avoid unless necessary

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.

Chatterino for Mac has incorrect key mapping for R9K toggle hidden messages
4 participants