Saturday, September 24, 2016

Keyboard Layout for Polyglot Programmers

If you are chatting on Facebook with two-three friends and each speaks a different language, switching over between the keyboard layouts is demanding. It would be nice to have more of a universal layout, right? But it shouldn't be too weird and since you are a programmer, it should be based on the US-English layout, which has all those cool programming characters at hand.

Here is my attempt to create such a keyboard layout for MS Windows. It's basically a US-English keyboard, where the numbers in the alphanumeric section were replaced by dead-keys (inspired by the dead-keys from the Czech QWERTZ-layout). I haven't written the version for Unix-like systems, but I might add it later.

You can download it here: al-polyglot-keyboard-2016-source.klc

And it looks like this:

Normal state

Shift key pressed
AltGr key pressed


Who is it good for?

Programmers
...that use mostly US-English keyboard, but want to write from time to time in their own language with Latin-based alphabet properly, with all the diacritics
Polyglots
...that need to write short texts in several languages and switch over between the layouts often
Web developers
It has a damn-hard-to-find n-dash (–) and his elusive brother m-dash (—)!
Perl6 coders
The layout contains the French quotation marks («»)

Who is it not intended to?

Writers and copywriters
If you want to type fast in a specific language, you should probably stick with one of its dedicated layouts (Good luck learning French AZERTY ;) )
People with keyboards without NumPad
You cannot type numbers in the alphanumeric section of this layout, so numeric keypad is a must.

In what languages can I write with this?

The layout was created, so that it is fairly easy to type in: English, Czech, Slovak, Portuguese, German, Spanish, French (It even has the ligatures æ and œ. The cœur of my sœur rejoices.), Romanian, Polish, Hungarian and Esperanto.

But I discovered many more languages are covered by what I fit in, so you can also type in Italian (with their lack of diacritics and special characters, not much of a hard task), Breton, Catalan, Croatian, Danish, Estonian, Finnish, Indonesian, Irish (if you don't require the obsolete dot above—ponc séimhithe), Norwegian, Scottish Gaelic, Serbo-Croatian, Slovenian, Swedish and Welsh.

I have been testing it for a while. Because I was trying to fit in many alphabets, it's a compromise. However, I found out it is very comfortable to type in English, German, Portuguese and if you do not insist on the correct punctuation, even Spanish. French, Czech and Slovak are a bit clumsier. French because of the proximity of the key for the acute accent and the letter e, Slovak and Czech due to the frequency of the accented characters. Maybe, I'll find a way to optimize it in the future. I haven't tested the rest of the languages thoroughly yet.

And in which I can't?

I tried to add Lithuanian, Latvian, Icelandic and Turkish, but I would have to sacrifice either logic of the dead-key combinations or their ergonomics. Sorry guys!

Details (for typography nerds only)

Here is the list of all the possible dead-key combinations (not including their capitalisations):
  • ° (circle above): ů, å (used in Czech and Nordic languages)
  • ~ (tilde): ñ, ã, õ (Spanish, Portuguese and Estonian)
  • ´ (acute accent): á, é, í, ó, ú, ĺ, ŕ, ś, ć, ź, ń, ẃ (w is a Welsh vowel)
  • ^ (circumflex): â, ê. î, ô, û, ĉ, ĝ, ĵ, ĥ, ŝ, ŷ, ŵ (mostly in French, Portuguese and Esperanto)
  • ¨ (diaresis ): ä, ö, ü, ï, ë
  • ˝ (double acute accent): ő, ű (Hungarian)
  • ¸ (cedilla): ç, ș, ț, ą, ę (this group is a mixture of characters with cedilla, comma below and ogonek) 
  • ˇ (caron): č, ď, ě, ľ, ň, ř, š, ť, ž, ă, ŭ (another mixed goup—characters with caron and two last ones with a breve)
  • ` (grave accent): à, è, ì, ò, ù, ẁ
  • · (middot): ł, ż, œ, æ, đ, ø (this is a dead-key category of characters that did not fit elsewhere)

Some notes

  • I tried to prioritize the languages I can write in. So it is possible to type in Hungarian (which I can't speak nor write in it), but the dead-key for the double acute accent is under number 6, so not as easy to access as other accents.
  • Circumflex and (^) and the backtick/grave accent (`) are twice on the keyboard, but I left it that way to keep the layout as close to the original US-English layout as possible
  • Don't use the Romanian ș (s with a comma below) as Turkish ş (s with cedilla), they are two distinct graphemes

Pangrams are fun in all languages

I tested the layout typing pangrams. Pangrams are sentences containing all the characters of a given orthography of some language, or at least all the accentuated characters that use to be problematic in typography or on the web. Some of the pangrams I used are worth sharing :)
Catalan
«Dóna amor que seràs feliç!». Això, il·lús company geniüt, ja és un lluït rètol blavís d’onze kWh.
“Give love and you’ll be happy!”. This, ingenuous fellow with bad temper, is already in a blue sign of 11kWh.
Croatian
Gojazni đačić s biciklom drži hmelj i finu vatu u džepu nošnje.
The overweight little schoolboy with a bike is holding hops and fine cotton in the pocket of his attire.
Czech
Příliš žluťoučký kůň úpěl ďábelské ódy.
Unduly yellowish horse was groaning devilish odes.
Danish
Høj bly gom vandt fræk sexquiz på wc.
Tall shy groom won dirty sex quiz on W.C.
Esperanto
Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj.
According to Ludwig Zamenhof, fresh Czech food with spices tastes good.
Estonian
Põdur Zagrebi tšellomängija-följetonist Ciqo külmetas kehvas garaažis.
Ill-healthy cellist-feuilletonist Ciqo from Zagreb was being cold in a poor garage.
Finnish
Fahrenheit ja Celsius yrjösivät Åsan backgammon-peliin, Volkswagenissa, daiquirin ja ZX81:n yhteisvaikutuksesta.
Fahrenheit and Celsius threw up on Åsa’s Backgammon board, in a Volkswagen, due to the coeffect of daiquiri and a ZX81.
German
Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich.
Victor chases twelve boxers across the great dam of Sylt.
Hungarian
Árvíztűrő tükörfúrógép
A flood-resistant mirror drill (what a language!)
Italian
Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja!
That blameworthy, zealous xenophobe tastes his whisky and exclaims: Alleluja!
Polish
Dość gróźb fuzją, klnę, pych i małżeństw!
“Enough of these threats with the shotgun,” swear I, “haughtinesses and marriages!”
Portuguese
À noite, vovô Kowalsky vê o ímã cair no pé do pingüim queixoso e vovó põe açúcar no chá de tâmaras do jabuti feliz.
At night, grandpa Kowalsky sees the magnet falling on the complaining penguin’s foot and grandma puts sugar in the happy tortoise’s date tea.
Romanian
Bând whisky, jazologul șprițuit vomă fix în tequila.
Drinking whisky, the drunken jazzman threw up right in the tequila.
Serbian
Fin džip, gluh jež i čvrst konjić dođoše bez moljca.
A nice jeep, a deaf hedgehog and a tough horse came without a moth.
Slovak
Kŕdeľ šťastných ďatľov učí pri ústí Váhu mĺkveho koňa obhrýzať kôru a žrať čerstvé mäso.
A flock of happy woodpeckers by the mouth of the river Váh is teaching a silent horse to nibble on bark and feed on fresh meat.
Slovenian
Piškur molče grabi fižol z dna cezijeve hoste.
Lambry silently grasps beans from the bottom of caesium forest.
Spanish
Benjamín pidió una bebida de kiwi y fresa; Noé, sin vergüenza, la más exquisita champaña del menú.
Benjamin ordered a kiwi and strawberry beverage; Noah, without shame, the most exquisite champagne on the menu.
Swedish
Yxskaftbud, ge vår WC-zonmö IQ-hjälp.
Axe handle courier, give our WC zone maiden IQ help.

No comments:

Post a Comment