Skip to content

Customizable Unicode keyboard layouts (starting with ancient Greek and Hebrew)

License

Notifications You must be signed in to change notification settings

StevenTammen/multilingual-keyboard-layouts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About this project

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.

Installation Instructions

  1. 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.
  2. 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.
  3. 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).

Usage instructions

Switching to Greek mode

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.”

Switching back to English 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.”

Using CapsLock as CapsLock

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.

Dealing with accidental CapsLock presses

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.

Getting familiar with letter correspondences

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 letterEnglish matchGreek LetterEnglish 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

Typing diacritics and punctuation in Greek mode

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.

GroupingDiacriticCorresponding Key
BreathingsRough[
Smooth]
AccentsAcute/
Grave\
Circumflex=
QuantityIota Subscript|
Macron{
Breve}
OtherDiaeresis:
Underdot*

Greek mode also overrides the behavior of ; and ? to produce the Greek equivalents of · and ;, respectively.

PunctuationCorresponding Key
Middle Dot;
Greek Question Mark?

Accessing punctuation that is used in Greek mode

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.

Typing diacritics and language-specific characters in English mode

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.

GroupingDiacriticEntry Sequence
AccentsAcute{CapsLock}/
Grave{CapsLock}\
Circumflex{CapsLock}=
QuantityMacron{CapsLock}{
Breve{CapsLock}}
OtherDiaeresis{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.

LanguageCharacterEntry 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}!

Customization Instructions

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.

General

activeLanguage

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.

unicodeSendType

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.

Greek

useLunateSigma

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.

Contribution guidelines

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:

  1. Download AutoHotkey from its site, and install it.
  2. 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).
  3. Clone the repository and its dependencies: git clone --recursive https://github.com/StevenTammen/unicode-language-layers.git.
  4. 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.

About

Customizable Unicode keyboard layouts (starting with ancient Greek and Hebrew)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published