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

Keyboard shortcuts do not recognize the macOS "command" key #717

Closed
roachcord3 opened this issue Nov 5, 2020 · 3 comments
Closed

Keyboard shortcuts do not recognize the macOS "command" key #717

roachcord3 opened this issue Nov 5, 2020 · 3 comments
Labels

Comments

@roachcord3
Copy link

roachcord3 commented Nov 5, 2020

Environment

Hydrus version: 415 (via executable)
Platform: macOS
OS specifics: 10.15.7

What happens

On macOS, the "command" key is not recognized as one of the keys that can be used for keyboard shortcuts.

Steps to reproduce

  1. Create a new shortcut, or edit an existing one.
  2. Try to bind command + any other (normal) combination of buttons, such as command + a, or command + shift + v.
  3. The shortcut displayed will not have the command button included.

Desired outcome

The command key should be supported. Qt documents which enum values map to the control versus command keys here.

Error message / Log file / Screenshots

I'd add a screenshot but it would just show me trying to make a shortcut with "shift + a" 🤷

@roachcord3 roachcord3 added the bug label Nov 5, 2020
@hydrusnetwork
Copy link
Owner

Thank you for this report. This is an artifact of the old wx UI library hydrus used to run on, or at least command/ctrl merging used to be. Perhaps the shift mixup is just a bug. In any case, now we are on Qt, I'll see if I can tighten up this macOS logic.

@hydrusnetwork
Copy link
Owner

Thanks again. I am not a macOS user, so I have often been a bit hazy on what the Control/Command distinction was. I have gone through my shortcut code and I believe I have fixed this issue for tomorrow. It looks like an artifact from the old migrated wx code where I used to merge Control into Command. I think I now detect both buttons separately, the right way around, and render them to strings correctly. I am not totally sure, but there may be a couple of instances where legacy shortcuts that were pre-baked into your defaults are recorded as Control when they really should be Command, but I think it'll actually be ok. Let me know if you have any more trouble!

@roachcord3
Copy link
Author

Thanks, it's picking up the command key presses now, and there's no regression on detecting control or option (alt) either.

One thing to note is that this change took all previous shortcuts that used control and switched them to use command instead. That is actually completely fine by me, and hopefully you won't get any complaints from other macOS users. 🙇‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants