btrask / Sequential

Image viewer for Mac OS X
http://sequentialx.com
Other
229 stars 55 forks source link

Keyboard shortcuts do not trigger the correct action on an azerty keyboard #6

Open thibaudcolas opened 9 years ago

thibaudcolas commented 9 years ago

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:

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 commented 9 years ago

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 commented 9 years ago

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:

Wish me luck!

btrask commented 9 years ago

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

thibaudcolas commented 8 years ago

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: