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

MacOS Deadkey support #1588

Merged
merged 2 commits into from
Nov 21, 2024
Merged

MacOS Deadkey support #1588

merged 2 commits into from
Nov 21, 2024

Conversation

SiegeLord
Copy link
Member

No description provided.

@SiegeLord SiegeLord force-pushed the macos_deadkeys branch 2 times, most recently from a228608 to bee5c7b Compare November 10, 2024 21:59
@SiegeLord SiegeLord force-pushed the macos_deadkeys branch 3 times, most recently from 1d54970 to a45c751 Compare November 18, 2024 00:59
We replace the old, somewhat flaky direct reads from NSEvent with the
use of UCKeyTranslate.

It is still not perfect, so we do a bunch fo hacks to get the various
keys repeating and emitting the correct CHAR events.
…y to ALLEGRO_KEY_BACKSLASH2 on MacOS.

The first is uncontroversial.

The second is unclear, but perhaps a decent choice?
https://discussions.apple.com/thread/8133633?sortBy=rank says that the
Usage ID of that key is 0x64.
https://github.com/tmk/tmk_keyboard/wiki/USB:-HID-Usage-Table#note-9
says that that usage maps to the international backslash key. Not having
a physical keyboard, I cannot confirm one way or another.

One snag is that there's
https://keyshorts.com/blogs/blog/37615873-how-to-identify-macbook-keyboard-localization#norwegian
which has both the section key (in the top left) and the internaltional
tab key (to the right of left shift). I don't know what the expectation
for those keys, or what they code would do for them. Not having a
physical keyboard, I cannot confirm one way or another.

Still, perhaps this is a better situation than before, where the key was
unmapped entirely.

Fixes liballeg#1523.
@SiegeLord SiegeLord merged commit e652daf into liballeg:master Nov 21, 2024
3 checks passed
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.

2 participants