GkUnicode keyboard

 
Home

Note: I regard my GkUnicode keyboard as superseded by Donald Mastronarde's GreekKeys keyboard. You may also want to check out Christopher Blackwell's keyboard.

GkUnicode Keyboard
Version 1.0: 2002-7-22.
Nick Nicholas, opoudjis [AT] optusnet . com . au
http://www.opoudjis.net/Play/GkUnicode.html
Download

The enclosed Unicode keyboard resource file is for installation in MacOSX. It constitutes a variant of the GreekKeys keyboard, with all the Unicode 3.2 Greek characters accessible.

This keyboard was created using Alex Eulenberg's keyboard compiler; κύδος αὐτῷ.


To install

Apple did not make it easy to install keyboards in MacOS until Jaguar 10.2. Instructions for pre-Jaguar OSX (which are still useful if you are making your own keyboard) follow; for Jaguar onwards, it is simply a matter of dragging the keyboard files into the Keyboard folder of your Library. (See Mastronarde's page for a less impatient account.)

These instructions are based on Eulenberg's page, combined with Richard Morse's page, which I'm rehashing in the following; check those two pages if something here is obscure. Basically you do something like this in a Terminal session.

(The text in the monospaced font and following the "%" is text to be typed into the terminal. Don't type the "%", this is a character used to represent your prompt.)
  1. % mkdir ~/Documents/Keyboarding
  2. % cd ~/Documents/Keyboarding
  3. % cp [wherever you've put the GkUnicode.r file] .
    You might prefer to copy the GkUnicode.r file to here manually, using Aqua. You'll find the directory to copy it to by clicking on Home at the top of your window, then going to Documents, then Keyboarding.
  4. % cp /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Resources/HIToolbox.rsrc .

    You've just copied the system file containg your keyboards and everything; be vewwy vewwy caweful.

    Now we want to see if the number I've assigned the GkUnicode keyboard isn't already being used by some pre-existing keyboard. Out of the box, I've given it the number -20000. (UCHRs, Unicode keyboards, have to have negative IDs.) To find out, we're going to make the HIToolbox.rsrc file human-readable.

  5. % mv HIToolbox.rsrc HIToolbox.old
  6. % /Developer/Tools/Derez HIToolbox.rsrc -useDF >> HIToolbox.r
    Now open HIToolbox.r in your favourite text editor. You're looking for any instances of UCHR or uchr followed by (-20000. If you're monumentally unlucky enough to find any, find a negative number that doesn't correspond to a UCHR, and replace that number for all instances of -20000 in the copy of GkUnicode.r you've made in the Keyboarding directory.
  7. % /Developer/Tools/Rez HIToolbox.r GkUnicode.r -o HIToolbox.rsrc -useDF
    To confirm this has worked, as Richard Morse suggests, compare the sizes of HIToolbox.rsrc and HIToolbox.old. HIToolbox.rsrc should be a smidgeon bigger.
    The next bit is what will wreak havoc and devastation; be sure you know what you're doing. You will overwrite the system's version of HIToolbox.rsrc with what you've just created.
  8. % sudo cp ./HIToolbox.rsrc /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Resources/HIToolbox.rsrc
    You will be asked to type in a password to do the command (because of the sudo part). This is your password, not root's.
    You're done. All you need to do now is log out and log back in. If you go to your System Preferences, and head to Internationalization:Keyboard Menu, you should find a poorly drawn icon for GkUnicode down the list, among the other unicode keyboards (Extended Roman (U) and Unicode Hex Input). Enable it by clicking the checkbox.

To use

The applications

You will notice that in most applications in MacOSX, the Unicode keyboards (including GkUnicode that you have just become a proud owner of) are disabled -- most notoriously including Microsoft Office v.X as of this writing. Unicode keyboards are hard work to implement; so often you won't be able to use your new toy.

Alan Wood, in his way cool Unicode and Multilingual Support site, has a list of applications that allow unicode keyboards to be used. The list is slowly growing, and includes Apple's TextEdit, which comes out of the box with MacOSX.

My current Unicode-aware editors of choice are TextEdit and Pepper .

The Fonts

You will certainly need a Unicode font to work with that includes polytonic Greek. I happen to maintain a list of them on behalf of the Thesaurus Linguae Graecae; I also have links there to other resources on Unicode online.

You will find that all the fonts are PC fonts, with .TTF suffixes. This is not a problem, since MacOSX recognises PC Unicode fonts without complaint. (I have only needed to restart to get a font recognised once.) Copy your fonts into a /Library/Fonts folder --- either that at the top level of your system disk, or in your home directory; whichever you're more comfortable with.


The key mappings

Graphic to be done; text-based for now
Key Result Shift Option Shift-Option
a α Α
b β Β ϐ ϖ
c ψ Ψ ϲ ϶
d δ Δ ϯ Ϯ
e ε Ε ` [grave deadkey] ̀
f φ Φ ϝ Ϝ
g γ Γ ϫ Ϫ
h η Η
i ι Ι [rough acute deadkey] ˆ
j ξ Ξ ϳ Ô
k κ Κ ϗ ϰ
l λ Λ ¬ Ò
m μ Μ ϣ Ϣ
n ν Ν ˜
o ο Ο [smooth grave deadkey] Ø
p π Π [rough deadkey]
q ϟ ϟ ϙ Ϙ
r ρ Ρ [circumflex deadkey] ͂
s σ Σ ϛ Ϛ
t τ Τ ᾿ [smooth deadkey] ̓
u υ Υ [smooth acute deadkey] ¨
v ω Ω
w ς ς [acute deadkey] ́
x χ Χ ϧ Ϧ
y θ Θ [rough deadkey] ̔
z ζ Ζ ϡ Ϡ
` ` ~ `
1 1 ! ¨ [diaeresis deadkey]
2 2 @ [diaeresis acute deadkey] ¤
3 3 # [diaeresis grave deadkey]
4 4 $ [diaeresis circumflex deadkey]
5 5 % ϵ
6 6 ^ ϭ Ϭ
7 7 & ϒ
8 8 * ϩ Ϩ
9 9 ( ϥ Ϥ
0 0 ) ϕ ϱ
- - _ ˉ [macron deadkey] ̄
= = + ˘ [breve deadkey] ̆
[ [ { [smooth circmflex deadkey]
] ] } [rough circumflex deadkey]
\ \ | ͺ ͅ
; ; : Ú
' ' " ΄ [tonos deadkey] ΅ [diaeresis tonos deadkey]
, , < ͵
. . >
/ / ? ÷

Reverse index to be done; see the original Rez file


To modify

If you wish to modify the mapping or anything else about the keyboard file, be my guest, as long as you credit me if you redistribute. You will need the Rez file, to alter and input into Alex Eulenberg's keyboard compiler; and/or an icon editor, to alter the kcs# and kcs4 icon resources.


To uninstall

Uninstalling GkUnicode (which you will also need to do if you install an upgrade) is as messy as installing: basically you need to turn the HIToolbox.rsrc file back into something human-readable, manually delete the relevant entries, and recompile it:

  1. % cd ~/Documents/Keyboarding
  2. % cp /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Resources/HIToolbox.rsrc .
  3. % /Developer/Tools/Derez HIToolbox.rsrc -useDF >> HIToolbox.r
  4. % mv HIToolbox.rsrc HIToolbox.old
    Open HIToolbox.r in your favourite text editor, and manually delete any blocks of text encompassed in curly brackets, and starting with a string including GkUnicode.
  5. % /Developer/Tools/Rez HIToolbox.r -o HIToolbox.rsrc -useDF
    Compare the sizes of HIToolbox.rsrc and HIToolbox.old. HIToolbox.rsrc should be a smidgeon smaller.
  6. % sudo cp ./HIToolbox.rsrc /System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Resources/HIToolbox.rsrc
    Log out and lock back in, and GkUnicode will be gone.
Nick Nicholas, opoudjis [AT] optusnet . com . au
Created: 2002-07-22; Last revision: 2003-11-17
URL: http://www.opoudjis.net/Play/GkUnicode.html