1

I have a keyboard defined as a .klc file by Microsoft Keyboard Layout Creator for the underrepresented language Fulfulde (fub) in Arabic-style script. I would like to use it on Mac. How can I convert it?

I know about SIL's Ukelele keyboard layout for macOS, but I can't figure out how to import the .klc file. I don't even know how to interpret the contents of the .klc file so that I can manually enter them into Ukelele.

Here's the .klc keyboard definition.

1

I haven't been able to find neither a macOS importer for .klc files nor a pre-made Fulfulde/Arabic keyboard layout file.

You have to do it manually either with a text editor or with an editor and Ukulele.


The content of the klc file means the following:

Together with the SHIFTSTATE def near the beginning of the klc file and the example key A the various key combinations are:

VKEY  A (no mod)  shift-A  ctrl-A  altctrl-A  shift+altctrl-A
A     0627        064e     -1      -1          -1
                           ↑       ↑           ↑
                           Press A with Ctrl, AltCtrl or Shift & AltCtrl do nothing (none)
                  ↑
                  Unicode U+064e (ARABIC FATHA)
      ↑
      Unicode U+0627 (ARABIC LETTER ALEF)

Pressing A will result in ا, shiftA prints something similar to ´ and ctrlA,altctrlA,shiftaltctrlA print nothing.

Using Ukelele's Arabic.keylayout file as base file - which has to be copied and modified - this translates to:

The <keyMapSelect mapIndex="6"> is the one without modifier (see: <modifierMap... at the beginning of the file) and you would have to scroll down to it and change key code 0 (=a) from

    ...
    <keyMap index="6">
        <key code="0" output="ش"/>
        ...

to

    <keyMap index="6">
        <key code="0" output="ا"/>
        ...

or for Shift-a (=<keyMapSelect mapIndex="7">)

    <keyMap index="7">
        <key code="0" output="«"/>
        ...

to

    <keyMap index="7">
        <key code="0" output="َ"
        ...

(the "ARABIC LETTER FATHA" is hard to see in this last line because it's usually placed above a consonant - here it modifies the left double quote ")

Modifier map def/meanings: Technical Note TN2056/modifierMap Element
macOS Keycode table: Where can I find a list of Mac virtual key codes?

Mac's don't normally use the control key as a modifier key for special characters. You would have to remap the few keys in your *.klc using the ctrl/altctrl/shift-altctrl modifiers to the alt/shift-alt layers.

1

I have never heard of any way to convert windows layouts like this to OS X. You probably have to create it from scratch or just modify an existing Arabic layout. If you could find one already made for Hausa Ajami, it might be similar.

You could also ask on the Ukelele list:

https://groups.google.com/forum/#!forum/ukelele-users

Converters do exist to go the other way, from .keylayout to .klc

One (perhaps tedious) possibility would be to edit/redo the list contained in the .klc and try to use it in KeyLayoutMaker. But I suspect drag/drop from Character Viewer into Ukelele's graphic interface, using Apple's Arabic Qwerty layout as a basis, would be easier.

If you do create such a keyboard, I would be grateful for a copy.

You must log in to answer this question.

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