User:Shenme/BetaCodeIME

BetaCodeIME.js:&ensp;A user script providing a keyboard-only input method for entering Ancient Greek letters with the complete set of accents and diacritics by using Beta Code syntax.

Introduction

 * Ancient Greek diacritics are weird.
 * Beta Code is weird.
 * The perfect marriage.

Beta Code is a standard for encoding polytonic Greek text, using only ASCII (Latin) characters. Beta Code has become "a sort of universal default keymap for text entry in polytonic Greek".

Using only basic keyboard input the complicated accented Greek letters may be entered more easily, without having to remember complex and difficult key 'chords' required by operating system input methods.

Beta Code is just plain alphabetic keys translated to Greek letters, plus a small number of other keys that add accents and breathing marks to the Greek letters.

Three quick examples, you would enter Beta Code to get Greek:

Matching alphabetic keys to Greek letters
While in Beta Code mode, the plain alphabetic keys are remapped to enter Greek letters. The keys and Greek letters are matched using two general guidelines for usage.

Alphabet letters that have 'obvious' relationships are paired, such that 'a' gives you 'α', 'b' to 'β', 'g' to 'γ' (gamma), etc. That gives us most of the needed Greek letters.

The remaining few are paired up by looking at the 'shape' of the letters while wearing really bad glasses. Since omicron already uses the 'o' key, Beta code chooses 'w' for 'ω' omega, because they look alike. Similarly for 'Θ' theta the letter 'Q' is chosen. Look for a couple other strange choices in the list of correspondences below.

Special cases
As usual with any too simple conventions there are a number of added rules to allow for special cases.

There are three forms for Greek 'S', the capital Sigma Σ, the middle sigma σ, and the final end-of-word sigma form ς.

The Greek FINAL SIGMA can usually be determined contextually, when a 'σ' is found to be at the end of a word. Entering Beta Code text "PRO/S " will be seen to result in "". However if this doesn't work sometime you can enter:

Then there are the two more Greek 'S', the LUNATE SIGMAs. To enter those you can use:

Diacritics and Accents
These little marks are a big deal.

Most of the time you will only need to use the first six diacritics above. Very occasionally you will need the diaresis in a word such as.

Only some combinations of diacritics are possible. You can have only one of rough or smooth breathing marks. And only one of the accents acute, grave and circumflex.

Most of the time only vowels can have diacritics. One special case is rho which might have rough or smooth breathing marks.

Punctuation
Over time Ancient Greek established a set of punctuation marks, some quite different from modern typography. Of these, the most often needed are:

Several other Greek punctuation characters have specific Unicode assignments, but these look so much like the usually seen punctuation characters that no special characters are used. (wha?)