1

So I documented most of the the .keylayout file here, mostly based on the what looks like scraped together spec, in order to figure out how to programmatically generate the .keylayout file like Ukelele does. The only thing I am unclear about is what I do with JIS and ANSI (and possibly ISO), all of which is said is:

Since the ISO keyboard used in Europe can be handled with the same layout as the ANSI keyboard used in the US, that leaves ANSI and JIS (used in Japan) as the two classes that need to be handled.

All that it is referenced in is mapSet up top, and then:

<keyMapSet id="JIS">
  <keyMap index="0" baseMapSet="ANSI" baseIndex="0">
    <key code="512" output=""/>
  </keyMap>
...

Is this a special value treated specially? Or how does it get used / what do I need to know about it?

If my font is for a fantasy language, do I need to think about / consider the JIS keyboard format?

https://deskthority.net/wiki/ANSI_vs_JIS

1 Answer 1

1

Keyboard layouts normally work essentially the same on either ANSI, ISO, or JIS keyboards. You can see this by doing View > Keyboard Type in Ukelele and switching among them while it is set to the US or any other layout. ISO keyboards have an extra key, so it's possible to wind up with characters allocated to that key not being available from other keyboard types. Best practice is to make sure the ANSI and JIS versions also have those characters somewhere.

The only connection between fonts and layouts is the fact that you need to have the layout keys return the unicode values of the characters in your font that you want your keyboard to be able to produce. If you are making custom glyphs, it's best to locate them in the Unicode Private Use Area instead of putting them at codepoints already assigned to existing scripts.

4
  • Thank you for the clarity, follow-up question about the state machine.
    – Lance
    Feb 1, 2022 at 7:53
  • I am curious -- could you describe what the end purpose of your keyboard creation effort is? Creating layouts that enable Mac hardware keyboards to type things in a constructed script/language? Feb 1, 2022 at 16:18
  • Yeah I want to allow people to type things in a constructed language. I was just going to make a JavaScript/web app to do it, but then I learned you can do it with native keyboard layouts it looks like.
    – Lance
    Feb 2, 2022 at 1:20
  • @Lance The problem with native layouts is you have to install them into the local machine's file system and then activate them by opening and manipulating the input source preferences. I would go with the javascript webapp myself (which can also be used on any platform, not just Mac). Feb 2, 2022 at 4:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .