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 trigger the correct action on an azerty keyboard #6

Open
thibaudcolas opened this issue Dec 22, 2014 · 4 comments

Comments

@thibaudcolas
Copy link

Hey there,

there seems to be an issue with the way Sequential handles keyboard shortcuts on azerty: shortcuts seem to be bound to the key's position, not to the character that's entered.

For example:

  • Pressing ⌘ + , does not open Preferences, it minimizes the window instead (like ⌘ + M), because on azerty , is where m is on a qwerty layout.
  • A quits Sequential (A is placed where Q is on a qwerty layout)

This issue does not affect all keyboard shortcuts (for example ⌘ + Maj + A works fine). I tried to look at the code in PGDocumentController.m, #L647 but my knowledge of Obj-C is very limited.

@btrask
Copy link
Owner

btrask commented Dec 22, 2014

This project is very old and I'm not maintaining it anymore. I believe the problem was that some keyboard layouts (e.g. Russian?) require the use of physical keycodes, while others require the use of logical characters.

To work around the issue you could #ifdef an alternate mapping in PGKeyboardLayout.h. A proper solution (for all layouts) would be more complicated, but maybe there is a library that would take care of it. I would accept pull requests for either approach.

@thibaudcolas
Copy link
Author

Thank you for your answer, it's nice to see that you're still looking after the project after such a long time.

My knowledge of OSX development is very lacking but I did manage to build it from source and get it running, so I might as well give it a try. I'll hopefully submit a PR.

Further notes:

  • I'm on OSX Mavericks (10.9), I don't know if I can produce builds which will be compatible with previous versions. TODO: look it up.
  • When I got that first build running, I had to modify a lot of lines which caused build errors. This may be due to the above "version of OSX frameworks" problem (there were a few deprecation notices in here too). TODO: find history of API changes for all those lines.
  • In this build, I did not encounter the "A quits Sequential" bug I reported above. I cannot tell if this is due to:
    • some kind of lack of support for OSX Mavericks in the build available online
    • the fact that I compiled this build on a computer with an azerty keyboard
    • the lines that I changed to get the build running
  • For the "⌘ + , minimizes the window" issue, I only encountered it when Sequential's main window was open. If there is no window, it correctly opens the Preferences pane.

Wish me luck!

@btrask
Copy link
Owner

btrask commented Dec 25, 2014

I haven't checked it but this commit might help with 10.9.

@thibaudcolas
Copy link
Author

Since encountering this bug, I have... switched to a QWERTY computer. Which means that I've lost interest in making a fix.

If someone wants to investigate this further, here are links that were useful at the time:

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

No branches or pull requests

2 participants