15 January 2011

An SIL Biblical Hebrew Keyboard for Linux Operating Systems

One of the advantages of Linux is the ability to customize your computer’s operating system. In this regard, Linux seems to be a lot more flexible than Microsoft Windows. Like when it comes to designing your own Hebrew keyboard; all it basically requires is the editing of a single file! Vern Poythress has some helpful information on the “Keyboard Entry of Polytonic Greek and Biblical Hebrew in GNU/Linux” on his website. Poythress shows you how to edit the xkb keymap so that you can customize your Hebrew keyboard according to the way you like it. For Poythress (and me), this is a keyboard that is similar to the SIL Biblical Hebrew keyboard that was designed by SIL International and built by John Hudson (who also designed the SBL Hebrew font).

But there is another way of mapping your own Hebrew keyboard using IBus, the Intelligent Input Bus, which is now the default input method for Ubuntu and some other Linux systems. This involves editing the he-kbd.mim file in the ibus-m17n software package. I have edited this file to develop a Hebrew input method that substantially simulates the SIL Biblical Hebrew keyboard. The result is an input method that replicates the keystrokes of the SIL Biblical Hebrew keyboard for all numbers and English punctuation marks, all Hebrew consonants, all common Hebrew vowel points, plus the maqef, dagesh, meteg, atnakh, rafe, and sof pasuq. The accent ole is also included as it can be used as a general marker of syllabic stress in non-accented texts. Departing a little from the SIL Biblical Hebrew keyboard, the backslash key inputs a backslash rather than the paseq. The layout also uses CTRL+ALT for the third and fourth keyboard levels rather than ALTGR.

For anyone interested in typing Hebrew on a Linux system using a keymap similar to the SIL Biblical Hebrew keyboard using IBus, the necessary steps are as follows (in Ubuntu 10.04; 10.10; and 11.04):

1) Make sure you have the ibus software package installed, and download and install the ibus-m17n package;

2) Backup the original /usr/share/m17n/he-kbd.mim file somewhere safe;

3) Download my version of the file he-kbd.mim—if the link is down, a copy of the content of the file can be found at Vos Linux—and copy it into your /usr/share/m17n/ folder; or

4) If you prefer to design your own Hebrew keyboard, then edit the he-kbd.mim file—you need to edit the file yourself particularly if you want the full range of Hebrew accents to be available;

5) Configure General IBus Preferences (in Keyboard Input Methods in the System Preferences Menu in GNOME 2.32) by defining the keyboard shortcuts and language bar behavior;


6) Configure Input Method IBus Preferences by clicking on Select an input method to select your desired language and input method, then press add for it to be listed;


7) Reboot;

8) Run the ibus-daemon (if this is not automatically run by the system), and use your IBus Preferences keyboard shortcut in a text editor, word processor, or input window, to enable the IBus language bar;

9) Toggle to select א kbd on the language bar by using the appropriate keyboard shortcut (if necessary);

10) Start typing Hebrew SIL style!

If for some reason the ibus-daemon does not run automatically at startup, you can create an ibus-daemon.desktop file in the /etc/xdg/autostart/ folder with content as follows:

[Desktop Entry]
Type=Application
Name=IBus Daemon
Comment=The IBus input method daemon
Exec=ibus-daemon -d
OnlyShowIn=GNOME;LXDE;XFCE;

Recommended fonts to use for typing Hebrew are the stylish SBL Hebrew font, and the more traditional Ezra SIL font. If you intend to use the SBL Hebrew font exclusively, then the entries for the key sequences "f=", "f+", "j=", and "j+" can be removed from the he-kbd.mim file. These key sequences allow the dagesh to be entered with the letters sin and shin when using the Ezra SIL font (and others).

Please note that SBL Hebrew is a trademark of the Society of Biblical Literature.

17 comments:

Steven Coxhead said...

Version 3 of the he-kbd.mim file has corrected the direction of the brackets for text direction that is right to left.

Steven Coxhead said...

Version 4 of the he-kbd.mim file has added the following information:

Please note that "SBL Hebrew" is a trademark of the Society of Biblical Literature (http://www.sbl-site.org/).

Stephen M said...

Just what I was looking for. Thanks! (Ubuntu 10.10)

Steven Coxhead said...

Thanks, Stephanos. Hope you find it helpful!

Steven Coxhead said...

Version 5 of the he-kbd.mim file leaves the keyboard layout unchanged, but clarifies in the description that the layout follows the SIL Biblical Hebrew keyboard, and also that CTRL+ALT is used for the third and fourth levels of the keyboard instead of ALTGR.

Anonymous said...

Please teach me how to put the Hebrew vowel under the consonant?

Steven Coxhead said...

Assuming that you have installed my he-kbd.mim file, and that you are using a standard US style keyboard, the vowel points are as per the SIL Biblical Hebrew keyboard documentation.

In sum:

patakh = [a]
khatef patakh = [Ctrl][Alt][A]
qamets = [A]
segol = [e]
khatef segol = [Ctrl][Alt][E]
tsere = [E]
sheva = [;]
khireq = [i]
kholem = [o] or [O]
khatef qamets = [Ctrl][Alt][O]
qibbuts = [u]
dagesh = [=] or [+]

Kazark said...

I had been using Ubuntu + iBus + KMFL, but that no longer seems to work, and was always a little bit annoying to get working. Frustrated with that, I decided to find the m17n Hebrew file and see if I could modify it. I found it, but I thought "I could do it, but why not get some help?" I searched online for "defining your own ibus mim file" and your page was the first that came up. Thanks so much! Very pleased. You just saved me a lot of time.

Steven Coxhead said...

Thanks, Kazark! I hope the he-kbd.mim file works well for you.

Moses said...

Thank you so much Kazark. Your he-kbd is a great help after I have searched many other options on the internet.

Paul said...

Steven,

I used this method very successfully on Ubuntu 14.04 for over a year. However, when I upgraded to 16.04, it no longer worked. I tried a number of things, but the only thing that worked in the end was to open the original he-kbd.mim file and copy and paste your mapping into the original file. At that point, it worked. I did a vimdiff on the original and your files, and could not see anything that would cause a problem, so I do not know what the issue was. Perhaps it was localized to something in my setup.

Used PC Distributor said...

Nice Blog Post !

brianp said...

This looks very nice but I can't get a working copy of he-kbd.mim. The www.berithroad.com site isn't responding, and the Vos Linux file dump doesn't seem to be encoded properly - I don't see any Hebrew characters, either on the website or when I download or copy to a text file. I did install the keyboard, but it only produces ASCII gibberish.

Would you be willing to find another way to post that file? Thanks!

Paul said...

Brianp,

Do you have a Hebrew font installed on your linux machine? I think if you don't have a font file, then your editor might not know how to read the Hebrew in the .mim file. I just use the SBL Hebrew font off the SBL website, and download it to ~/.fonts/ and I was able to open and view the .mim file.

You also might try to open it in a different editor. I use vim on linux and it reads it just fine.

I don't seem to be able to pot a file in these comments, however.

brianp said...

Thanks, Paul. Fonts, editors, etc. were not the problem, it was getting the file itself. However, berithroad.com is back up now apparently and I was able to get the proper file and it works!

As a side note, if you go to the Vos Linux link, does it show Hebrew to you? I just see things like:
("f=" "שּׂ")
("f+" "שּׂ")
("g" ?×’)
("h" ?×”)
("j" ?שׁ)

Paul said...

Yeah, I don't see Hebrew on the Vos Linux site. Must be some unicode thing with that site. I just downloaded the .mim file and opened it.

Anonymous said...

To learn hebrew language easily download hebrew keyboard.