insidegui / WWDC

The unofficial WWDC app for macOS
https://wwdc.io
BSD 2-Clause "Simplified" License
8.6k stars 777 forks source link

Implement keyboard localization support for player key commands #693

Closed boettges closed 1 year ago

boettges commented 1 year ago

The changes enable consistent keyboard shortcuts for media player commands across different keyboard layouts irregardless of the localization. This is achieved by identifying commands based on the character output of keys instead of their key codes which may vary. Due to the non-textual nature of the arrow keys their input remains to be identified by their keycodes.

Example: The current mapping for minus and plus is set to the keycodes 27 and 24. This is not applicable to all keyboard layouts. For example, German localized ones use 44 and 30 respectively. The proposed changes should solve this.

Thank you in advanced for reviewing and thank you for the handy app 👍

insidegui commented 1 year ago

Thanks @boettges!

@allenhumphreys I'll apply your suggestions and submit another PR with just them.

boettges commented 1 year ago

@allenhumphreys Those are very valid suggestions. Thank you both!