Over Summer 2018, the Center for Undergraduate Research Opportunities (CURO) at the University of Georgia sponsored my research into creating an efficient, stable, and easy-to-modify keyboard layout for Polytonic Greek. Thanks CURO!
A fairly extensive write-up of design decisions and justifications was part of this initial summer run, accessible on my website as as a PDF. People interested in the development of the paper over time may also check out the Org files in the docs/ directory, since the entire writing process was version-controlled. This document also contains some discussion of typing as a cognitive process relating to language, and its (possible) relationship to language learning.
After Greek and Latin-script functionality was completed over the summer, this project has been mostly frozen. As a triple major (Computer Science, Greek, Classics), I have been too busy to realize other project goals, such as extending the idea to other alphabets (the shortlist is Hebrew, Russian, and Farsi), enabling GUI configuration of layouts (partially completed in a hackathon entry Spring 2019, with work ongoing), supporting non-standard physical keyboards, like the Kinesis Advantage Ergonomic Keyboard, and supporting Linux and macOS by finding some stable alternatives to AutoHotkey for these platforms.
Some of these other goals may be realized eventually, particularly after I graduate and have more free time.
- Install AutoHotkey. The download page for this software is here; I recommend clicking on the big blue button that says “Download AutoHotkey Installer,” and following the instructions in the setup program.
- Download the latest version of this project from the project page on my website. Right click on the downloaded file and select “Extract all.” It does not matter where you unzip the files to, as long as AutoHotkey is installed.
- Double click on the file called “remap.ahk” to launch the program. By default, the program starts out in English mode, sending precomposed Unicode where possible. You can exit the program by right clicking the AutoHotkey icon for the script in the system tray and selecting “Exit.”
(If you are comfortable with Git you can also install this project from the command line with the command git clone --recursive https://github.com/StevenTammen/unicode-language-layers.git
).
When in English mode, to toggle on the Greek mode, press CapsLock and then the letter g. The mnemonic is “language key (CapsLock) plus g for Greek turns on the Greek mode.”
When in Greek mode, to get back to English mode, press CapsLock and then the letter e. The mnemonic is “language key (CapsLock) plus e for English turns on the English mode.”
This layout uses CapsLock as a leader key for language behavior. Most people do not use CapsLock very often, but it is in a very favorable position (compared to a function key, say), which makes it ideal for quickly switching back and forth between languages and adding diacritics.
However, some people may still wish to use CapsLock as CapsLock. Epigraphers, for example, may want to digitize inscriptions that are all uppercase. For this reason, locking behavior is supported across alphabets.
To use CapsLock in the traditional sense, simply press CapsLock twice instead of once. This will lock down the shift layer for whatever language you are currently typing in. Just as with normal CapsLock, you unlock the layer by pressing the CapsLock key after you are done typing with the layer locked.
This may sound complicated, but it becomes second nature very quickly. To access language leader behavior (switching between languages, as above, or making use of some of the more advanced features below), press CapsLock once. To lock shift down, press CapsLock twice.
If you accidentally or unintentionally press CapsLock, or press it but then change your mind and decide that you do not want to switch languages or access any of the other functionality of the language leader, you can “eat” the keypress by pressing any key that does not have any mapped behavior on the language leader layer. (Any key not mentioned in the sections below is likely unmapped.)
For convenience, it probably easiest to press Space. This will not enter a Space, but simply get you back to the layout’s normal behavior, as if you had never pressed CapsLock to begin with.
The default Greek letter correspondences are listed in the table below. Some notable letters that frequently vary across layouts are upsilon, chi, and theta. For this layout:
- Upsilon is on U not Y
- Chi is on C not X
- Theta is on J
Greek letter | English match | Greek Letter | English Match | |
Α α | A a | Ν ν | N n | |
Β β | B b | Ξ ξ | X x | |
Γ γ | G g | Ο ο | O o | |
Δ δ | D d | Π π | P p | |
Ε ε | E e | Ρ ρ | R r | |
Ζ ζ | Z z | Σ σ | S s | |
Η η | H h | Τ τ | T t | |
Θ θ | J j | Υ υ | U u | |
Ι ι | I i | Φ φ | F f | |
Κ κ | K k | Χ χ | C c | |
Λ λ | L l | Ψ ψ | Y y | |
Μ μ | M m | Ω ω | W w |
To type diacritics in Greek mode, type a vowel (or consonant), and then press the key corresponding the desired diacritic, as outlined in the table below. To remove a diacritic without deleting the character itself, simply press the diacritic key again. To remove a full character (a vowel and all its diacritics), press Backspace.
Grouping | Diacritic | Corresponding Key |
---|---|---|
Breathings | Rough | [ |
Smooth | ] | |
Accents | Acute | / |
Grave | \ | |
Circumflex | = | |
Quantity | Iota Subscript | | |
Macron | { | |
Breve | } | |
Other | Diaeresis | : |
Underdot | * |
Greek mode also overrides the behavior of ; and ? to produce the Greek equivalents of · and ;, respectively.
Punctuation | Corresponding Key |
---|---|
Middle Dot | ; |
Greek Question Mark | ? |
The current Greek layer intercepts opening and closing brackets (to use for rough and and smooth breathing, respectively) and the colon (to use for diaeresis), among other things. What happens if you want to type brackets and a colon?
The layout provides support for this by prefixing these keys with the language leader (CapsLock). To get a colon in Greek mode (rather than adding a diaresis to the last key), for example, press CapsLock then enter a colon.
This leader key prefixing is similar to how language characters are entered in English mode (see below), but the semantics are flipped. In English mode the language leader turns the next key into a diacritic/language-specific character, while in Greek mode (and for other languages in the future) the language leader turns off the layer behavior for the next key so that it is entered literally.
When you are in English mode, diacritics for French, German, etc. work in exactly the same manner: pressing the key corresponding to a diacritic adds the diacritic if it is not already present, or removes it if it is; Backspace removes a full character. However, you have to prefix the key corresponding to a diacritic with CapsLock to override the key’s normal behavior. As can be seen from the table below, by default the diacritics for the Latin alphabet mirror the key choices for Greek, so that you only have to remember one set of correspondences.
Grouping | Diacritic | Entry Sequence |
---|---|---|
Accents | Acute | {CapsLock}/ |
Grave | {CapsLock}\ | |
Circumflex | {CapsLock}= | |
Quantity | Macron | {CapsLock}{ |
Breve | {CapsLock}} | |
Other | Diaeresis | {CapsLock}: |
Out of the box, English mode also supports language-specific characters for some of the more common Latin-script languages. These are also accessed by prefixing keys with the language leader. Note that through the diacritics alone some other Latin-script languages, such as Italian, are supported: they just don’t have “extras” that have to be accounted for.
Language | Character | Entry Sequence |
---|---|---|
French | ç | {CapsLock}c |
Ç | {CapsLock}C | |
œ | {CapsLock}o | |
Œ | {CapsLock}O | |
æ | {CapsLock}a | |
Æ | {CapsLock}A | |
German | ß | {CapsLock}s |
ẞ | {CapsLock}S | |
Spanish | ñ | {CapsLock}n |
Ñ | {CapsLock}N | |
¿ | {CapsLock}? | |
¡ | {CapsLock}! |
At the time of writing, there are three different customization options that can be changed in the configuration file. Each is explained below, with all the possible values listed. The properties are broken out into sections depending on if they deal with a specific language mode or not.
For changes in these options to take effect, you will need to exit out of the script and restart it.
Possible values: English
, Greek
The activeLanguage property specifies which language mode the script starts in. The default is English. To start the script in Greek mode, change the line activeLanguage=English
to activeLanguage=Greek
. Recall that you can change between modes with the language leader key ({CapsLock}g
switches to Greek, and {CapsLock}e
switches to English), so this option is just a convenience.
Possible values: precomposed
, decomposed
The unicodeSendType property specifies whether precomposed Unicode characters are sent when possible, or whether to always send combining characters. The default is to send Unicode precomposed, since it has wider font support, and has marginal performance advantages. To use decomposed Unicode instead, change the line unicodeSendType=precomposed
to unicodeSendType=decomposed
.
Possible values: 0
, 1
The useLunateSigma property specifies whether or not the script should use lunate sigma in place of normal sigma. The default is 0, for false. To use lunate sigma, change the line useLunateSigma=0
to useLunateSigma=1
. Using lunate sigma will also disable final sigma behavior.
It would be ideal if this project became a group effort from the collection of people that regularly need to type in languages with specialized alphabets. Due to my academic interests, I will initially be focusing on ancient Greek and Hebrew, but I am attempting to design a generalized framework abstracted out of any one particular language, and discuss design variables in such a way that layers for additional Unicode languages (such as Russian, Arabic, etc.) may be added even if they do not share exactly the same features (such as breathing marks or vowel points).
People of all levels of technical knowledge are welcome and encouraged to open issues/bug-reports, create feature requests, and make suggestions. For the more technically inclined that would like to contribute to development directly:
- Download AutoHotkey from its site, and install it.
- Install a capable text-editor with Unicode support. Notepad++ is a simple option (for people that don’t want to deal with the likes of Vim and Emacs), provided you ensure that you save Autohotkey files in the UTF8-BOM encoding. (You must do this for Unicode to be supported directly in the code).
- Clone the repository and its dependencies:
git clone --recursive https://github.com/StevenTammen/unicode-language-layers.git
. cd
into the project and start looking through the files and open issues to see where you can contribute.
The project is still fairly young (meaning inline comments are fairly minimal and there is no stable API), but after my research responsibilities cease I will start to finalize things and provide better documentation. Eventually there will be a full API and examples regarding language specific implementation concerns.