Hebrew text entry gizmo
Thursday, April 19th, 2007 01:28 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
At home, when I'm writing a blog post (or anything else) with Hebrew in, it's quite convenient; I have Emacs ready to hand with the Hebrew mode I made for it. At work, it's rather less convenient; and anywhere else, it's downright inconvenient: I have to fire up Word, and, using "Insert symbol", insert the characters one at a time, taking several mouse clicks to do each.
Fed up with this, I have made myself a little web-based Hebrew text entry gizmo, and offer it up here because I think it might be of use to other readers of this journal.
Note that this does not utilise the standard Hebrew keyboard layout; it's intended for (people like) myself, who do not know the standard Hebrew keyboard layout, and want a layout in which, as much as possible, Hebrew letters are generated by their QWERTY equivalents.
Because I wrote this primarily for myself, it's also not been tested other than on Firefox 1.5 on Linux and Windows, and IE 6 on Windows. If people have issues with it on other browsers, let me know (though I do not promise to necessarily do anything about it).
Fed up with this, I have made myself a little web-based Hebrew text entry gizmo, and offer it up here because I think it might be of use to other readers of this journal.
Note that this does not utilise the standard Hebrew keyboard layout; it's intended for (people like) myself, who do not know the standard Hebrew keyboard layout, and want a layout in which, as much as possible, Hebrew letters are generated by their QWERTY equivalents.
Because I wrote this primarily for myself, it's also not been tested other than on Firefox 1.5 on Linux and Windows, and IE 6 on Windows. If people have issues with it on other browsers, let me know (though I do not promise to necessarily do anything about it).
no subject
Date: 2007-04-19 12:48 pm (UTC)no subject
Date: 2007-04-19 12:50 pm (UTC)no subject
Date: 2007-04-19 12:54 pm (UTC)Source File: http://www.michaelgrant.dsl.pipex.com/hebrew_entry.html
Line: 199
Error: missing variable name
Source File: http://www.michaelgrant.dsl.pipex.com/hebrew_entry.html
Line: 10, Column: 8
Source Code:
var char = "";
no subject
Date: 2007-04-19 01:08 pm (UTC)no subject
Date: 2007-04-19 01:28 pm (UTC)no subject
Date: 2007-04-19 01:32 pm (UTC)no subject
Date: 2007-04-19 01:51 pm (UTC)no subject
Date: 2007-04-19 01:52 pm (UTC)no subject
Date: 2007-04-19 01:57 pm (UTC)no subject
Date: 2007-04-19 02:20 pm (UTC)no subject
Date: 2007-04-19 02:40 pm (UTC)If only if I knew how to use it...
no subject
Date: 2007-04-19 02:43 pm (UTC)no subject
Date: 2007-04-19 02:48 pm (UTC)// At the top of the javascript section, outside any function definition:
var allstr = '';
// ...
// at the bottom of insertHebrewChar function
// change
// document.forms[0].elements[0].value += char;
// to:
allstr += char; // whatever you're calling char these days
document.forms[0].elements[0].value = allstr;
// ...
//and change
// document.forms[0].onkeydown = onKeyDownH;
// to
document.forms[0].onkeyup = onKeyDownH;
Also might be good practice to refer to the form by a name rather than an index, but it won't really matter for this.
no subject
Date: 2007-04-19 03:03 pm (UTC)There, I've rearranged the file so it now works for both of us, but only looks ugly for you. ;^b (On the grounds that there's likely to be more users using Firefox or IE 6 than an old version of Mozilla.)
no subject
Date: 2007-04-19 03:10 pm (UTC)no subject
Date: 2007-04-19 06:16 pm (UTC)I suppose it would be possible to work around this, by (say) allowing keystrokes to insert normally, then reinterpreting every Latin character when the key or mouse is released (or, if all else fails, starting from scratch in Java), but really this is somewhat overkill for the purpose. It's just meant as a simple way of being able to type the odd Hebrew word or phrase for copying into a predominantly Latin-alphabet editor, and not as a sophisticated text editor in its own right.
no subject
Date: 2007-04-19 04:04 pm (UTC)no subject
Date: 2007-04-19 04:09 pm (UTC)no subject
Date: 2007-04-19 05:07 pm (UTC)no subject
Date: 2007-04-19 05:37 pm (UTC)no subject
Date: 2007-04-22 08:10 pm (UTC)If so, this would make my life ever so much easier! (My Hebrew spelling is lame enough that if I have to take half a minute per character insertion, I keep forgetting how to spell whatever I am trying to write - pathetically this sometimes includes my own name...)
Eliana
no subject
Date: 2007-04-23 08:19 am (UTC)Sounds like you have an old version of Word that can't handle bidirectional text; it comes out the right way around for me. Possible solutions: (a) upgrade to a later version of Word. (b) If you're not prepared to spend the money for this, download an open-source word processor such as Open Office (http://www.openoffice.org/) to use when you need Hebrew in your document. (c) Wait and I may add a "reverse text" button to it.
no subject
Date: 2007-05-20 03:09 am (UTC)