Seeking KeyboardLayout ID for All Native Keyboards in iOS and macOS

Hello everyone,

I am currently working on a project that requires me to programmatically manage keyboard layouts on both iOS and macOS devices. I'm looking for a comprehensive list of KeyboardLayout ID values for all the native keyboard layouts available in both iOS and macOS. While I can extract some of this information from the /System/Library/Keyboard Layouts/ directory on macOS, I cannot extract all without adding every keyboard layout active, having a complete and pre-compiled list would be immensely helpful.

Does anyone here have such a list or know where I might find one? Any guidance on this matter would be greatly appreciated.

Thank you in advance for your assistance!

JJ

Replies

The list of keyboard layouts supported on iOS & macOS is always changing/expanding. Additionally, users can install their own keyboard layouts in ~/Library/Keyboard Layouts. Can you share more details about exactly what kind of management tool you’re building and why needing a list of all layouts would be a requirement for it?

I am working on developing a centralized configuration management tool tailored for localisation. One of the core functionalities is to automate the setup of devices to fit the linguistic and regional preferences of a user, regardless of their geographic location or the language they speak. This is particularly essential for global companies that frequently onboard employees from different parts of the world and need their devices to be set up in a streamlined and consistent manner.

While I understand that the list of keyboard layouts may be expanding, having a comprehensive list of current KeyboardLayout ID values will enable:

Instant Configuration: Pre-populate settings for users based on their profiles. If a user is from Japan for instance, their device could instantly be equipped with the relevant keyboard layouts without manual intervention. This is especially salient where multiple keyboards are needed due to a mixed language interface. The present selecting keyboards for each individual device and user is rather time consuming, and can be scripted only with IDs available. Audit & Compliance: There may be policies around which keyboards can be used due to data security or compliance reasons. Having this list aids in ensuring devices adhere to those policies. Future Proofing: As we aim to develop a scalable solution, knowing the IDs of even those keyboard layouts not currently in use in an organization will make the tool more robust and future-proof. Regarding custom keyboards in the ~/Library/Keyboard Layouts directory, the tool would certainly respect these and make allowances as needed. However, the primary focus is on the native keyboard layouts provided by Apple to ensure the broadest compatibility and consistency.

I hope this clarifies my requirement for the comprehensive list. Otherwise, I will need to install/activate all native keyboards and record their IDs from terminal in that manner, so I was just hoping the list was available.

Thank you for your understanding and any assistance you can provide on this matter.

Further it appears that ~Library/Keyboard Layouts will no longer be available in MacOS 14 and default keyboards are now ~Library/Keyboards according to localisation, e.g. in the UK, DE, ES, FR, EN, IT, PT are made available by default. This seems in tune with the .db regarding vulgar usage. As presumably this has been generated for select languages only thus far.