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

feat(mac): mnemonic layout support 🐘 #11334

Merged
merged 89 commits into from
Oct 25, 2024

Conversation

SabineSIL
Copy link
Contributor

fixes #7068
see #3345

see #9384

This is a proposal to rewrite mcompile for macOS.

It will be a standalone implementation for macOS for now which is similar to the standalone implementation for Linux. (#9384)

To achieve this we can reuse most of the code from mcompile-Linux, especially the structure and the .kmx rewriting. We need to adapt the keyboard interrogation though. On Linux we use x11; For macOS we use the Carbon.h library.

Since we keep the structure of the code as it is on Linux, we only have to change the content of several functions, especially those that handle the keyboard interrogation and the mapping between Keycodes/Scancodes and Keyvalues.

Therefore for mcompile-mac we will first set up the the .kmx rewriting, then add the handling of non-deadkeys and in the last step add the handling of deadkeys.

Maybe in a next step we may combine the 3 versions of mcompile for Windows, Linux, macOS into a cross-platform version of mcompile.

@keymanapp-test-bot skip

Copy link

gitguardian bot commented May 2, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@SabineSIL SabineSIL removed the common/ label May 2, 2024
SabinePlay and others added 10 commits May 2, 2024 12:38
feat(mac): include km_types and u16

feat(mac): include filesystem and some kmx

feat(mac): include old functions in keymap

feat(mac): include kmx_file, mc_kmxfile

feat(mac): include deadkey, filesystem, km_types, import_rules,mc_kmxfile

feat(mac): include functions in mcompile.cpp/h

feat(mac): #includes out to be used
This reverts commit d32e352.

# Conflicts:
#	mac/mcompile/keymap.cpp
#	mac/mcompile/keymap.h
#	mac/mcompile/mcompile.cpp
#	mac/mcompile/mcompile.h
feat(mac): open more functions

feat(mac): open DoConvert-InitializeUCHR

feat(mac): open write_US_ToVector

feat(mac): (temporarily) add mac_ to function names to be able to distinguish between linux-functions and mac functions if needed

feat(mac): finished mac_createOneVectorFromBothKeyboards()

feat(mac): started DoConvert

feat(mac): mcompile tidy up
feat(mac): mcompile new X_find_Shiftstates to verify shiftstates

feat(mac): mcompile fill rgkey for base, shift, opt, shift+opt including CAPS

feat(mac): mcompile fill rgkey prevent writing x01 into rgkey[]

feat(mac): mcompile tidy up code
@mcdurdin mcdurdin changed the title feat(macOS): rewrite mcompile for macOS 🐘 feat(mac): rewrite mcompile for macOS 🐘 May 3, 2024
@SabineSIL SabineSIL force-pushed the feat/mac/mcompile_mac branch from 7b98ea5 to 5139ba4 Compare May 3, 2024 07:19
@github-actions github-actions bot added linux/ common/resources/ Build infrastructure labels Oct 11, 2024
@darcywong00 darcywong00 modified the milestones: A18S12, A18S13 Oct 11, 2024
@SabineSIL SabineSIL requested a review from mcdurdin October 14, 2024 06:50
Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's get this in and finish off this epic. I know we'll still need to do more work to integrate into the core products but at least this will be ready to go

keys[0].dpOutput = new KMX_WCHAR[4];
keys[0].dpOutput[0] = UC_SENTINEL;
keys[0].dpOutput[1] = CODE_DEADKEY;
keys[0].dpOutput[2] = deadkey; // TODO: translate to unique index
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this TODO resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a comment from mcompile-windows - I did not do any changes

@SabineSIL SabineSIL merged commit f9e7db1 into epic/linux-mcompile Oct 25, 2024
28 checks passed
@SabineSIL SabineSIL deleted the feat/mac/mcompile_mac branch October 25, 2024 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

feat(windows): mcompile - use static tables for Windows keyboard data
5 participants