A GNU/Linux (XKB) layout for Cypriot Maronite Arabic - design

| Comment

Introduction

A keyboard for this script already exists, so I’m not creating something from scratch. It is based on the basic US English QWERTY layout, with the addition of necessary characters from Greek, and Latin letters with diacritics. It was designed by linguist Spyros Armostis in the context of the revitalisation effort of the recognised minority language Sanna, aka Cypriot Maronite Arabic. The language has an ISO 639-3 code of acy, and it has a limited but growing online presence.

I want to implement this keyboard for use by the X Window System’s xkeyboard-config component, making CMA available on a number of free software operating systems, including GNU/Linux. The goal is for this layout to be included upstream, and therefore become available by default. This post contains a first proposal of how this keyboard will look like.

Keyboard description

This keyboard has 4 levels (initial, Shift, AltGr,Shift-AltGr), and one dead-key (´ tonos, the acute accent key from Greek). The 1st and 2nd level contain the letters needed for the standard orthography of the language, and the 3rd and 4th level contain the letters required for an alternative spelling system for the language.

The tonos key should combine with the vowels: Aa, Ee, Ii, Oo, Uu, to give Áá, Éé, Íí, Óó, Úú. Those are, logically, the precomposed acute-accented vowels from the Latin character set, and not Latin letters with the U+0384 GREEK TONOS. Using the precomposed characters will allow Sanna users to use existing fonts with less compatibility problems. tonos in Greek also returns precomposed Greek vowels so there’s symmetry.

Differences between Windows implementation and the us keyboard layout

  • qQθΘ (Greek theta) - qQ is removed
  • dDδΔ (Greek delta) - dD moves to 3rd-4th level
  • gGγΓ (Greek gamma) - gG moves to 3rd-4th level
  • ;´ (Greek tonos dead-key) - ; doesn’t appear in the reference implementation or the spec
  • xXχΧ (Greek khi) - xX moves to 3rd-4th level

Additions by the Windows implementation to the us keyboard layout

  • The letters şŞ are added as the 3rd-4th levels of s.
  • The letters ġĠ are added as the 3rd-4th levels of h. According to the spec ġĠ are also obtained by tonos+γΓ.
  • The letters žŽ are added as the 3rd-4th levels of j.
  • The letters ċĊ are added as the 3rd-4th levels of c. According to the spec ċĊ are also obtained by tonos+cC, and instead the 3rd and 4th level offers ʿ U+02BF MODIFIER LETTER LEFT HALF RING.

Differences between specification and the actual reference implementation

  • The reference implementation has d in the 3rd level of δ but D in the 4th level of e. This is obviously unintentional
  • The capital variant Ŭ doesn’t appear in the Windows implementation. This is obviously unintentional

Differences of the cma-xkeyboard proposal vs the Windows implementation

  • I restore ; in the 3rd level of ´ for ASCII-completeness and to allow users to be able to fully use a computer without needing a secondary QWERTY layout enabled (eg for typing URLs or passwords)
  • I restore qQ as the 3rd and 4th level of θ for the same reasons
  • I add the capital Ŭ as the 4th level of u, as it was intended
  • I move žŽ to the 3rd-4th level of zZ to improve ergonomics
  • I add the Euro sign as the 3rd level of e. The Euro is one of the currencies users of Sanna use. This is the canonical position in the Greek-US QWERTY
  • I add the Turkish Lira sign as the 3rd level of t. The Turkish Lira is the other currency users of Sanna use. This is the canonical position in Turkish-Q
  • I add ʿ as the 3rd level of ' so that cC doesn’t need a 5th level
  • I add, following a suggestion by the original developer of the layout, the Greek ano telia · (U+00B7 MIDDLE DOT) as the 3rd level of Greek telia .

This makes cma-xkeyboard look as follows:

┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━━━┓
│ ~   │ !   │ @   │ #   │ $   │ %   │ ^   │ &   │ *   │ (   │ )   │ _   │ +   ┃Backspace  ┃
│ `   │ 1   │ 2   │ 3   │ 4   │ 5   │ 6   │ 7   │ 8   │ 9   │ 0   │ -   │ =   ┃           ┃
┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━━━┫
┃       ┃ Θ q │ W   │ Ε   │ R   │ T   │ Y   │ U Ŭ │ I   │ O   │ P   │ {   │ }   ┃Enter    ┃
┃Tab    ┃ θ Q │ w   │ e € │ r   │ t ₺ │ y   │ u ŭ │ i   │ o   │ p   │ [   │ ]   ┃         ┃
┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓        ┃
┃Caps    ┃ A   │ S Ş │ Δ D │ F   │ Γ G │ H Ġ │ J   │ K   │ L   │ :   │ "   │ |   ┃        ┃
┃Lock    ┃ a   │ s ş │ δ d │ f   │ γ g │ h ġ │ j   │ k   │ l   │ ´ ; │ ' ʿ │ \   ┃        ┃
┣━━━━━━━━┻━━━━┱┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┲┷━━━━━┻━━━━━━━━┫
┃             ┃ Z Ž │ Χ X │ C Ċ │ V   │ B   │ N   │ M   │ <   │ > · │ ?   ┃               ┃
┃Shift        ┃ z ž │ χ x │ c ċ │ v   │ b   │ n   │ m   │ ,   │ . · │ /   ┃Shift          ┃
┣━━━━━━━┳━━━━━┻━┳━━━┷━━━┱─┴─────┴─────┴─────┴─────┴─────┴──┲━━┷━━━━┳┷━━━━━┻┳━━━━━━━┳━━━━━━┫
┃       ┃       ┃       ┃                                  ┃       ┃       ┃       ┃      ┃
┃Ctrl   ┃Meta   ┃Alt    ┃              Space               ┃AltGr  ┃Meta   ┃Menu   ┃Ctrl  ┃
┗━━━━━━━┻━━━━━━━┻━━━━━━━┹──────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┻━━━━━━┛

Click here for a vector image version of the layout

Keymap explanation:

  • Bottom Left: initial (1st level)
  • Top Left: Shift (2nd level)
  • Bottom Right: AltGr (3rd level)
  • Top Right: Shift-AltGr (4th level)

Some concerns

  • ġĠ are only marginally ergonomic. I have no alternative suggestion, other than the tonos dead-key the spec describes
  • For all its practicality, tonos dead-key with consonants such as ġĠ is inconsistent, its primary use being to modify vowels

I have one working implementation of cma-xkeyboard, but I’m working to make it acceptable for inclusion in the upstream project. I am also considering an ibus-tables implementation, but I haven’t studied how ibus works yet.


Post updated once to fix typesetting.


Category: Documentation

Tags: xorg, xkb, x window, xkeyboardconfig, keyboard layout, cypriot maronite arabic, cma, sanna