Edit: Pinyinput is now hosted on sourceforge. The main project page can be found here: http://www.pinyinput.net/.
Let's face it, typing pīnyīn with tone marks is a real pain. Sure there are Word macros, and webpages and certain software programs that you can use to type them, but there's not exactly one seamless or consistent method to do it. Also, sometimes you're not using Word, sometimes you're not connected to the internet, and sometimes you don't want to have to boot up another program and copy and paste.
What would be really nice is an IME that instead of outputting Chinese characters, would output pīnyīn with tone marks. Seeing as I've had a bit of spare time recently, I thought I'd put it to good use and develop such an IME. The result is Pinyinput.
Once installed, it works just like a regular Chinese IME. Whenever you want to type some pīnyīn you just switch on the IME and start typing. It works at the system level, and so it will allow you to type pīnyīn with tones in any Windows program, just as easily as you would type Chinese (in fact even easier, because you don't need to select the correct character.
Pinyinput has two main modes of operation. The first mode is "checked" mode, which only accepts (mostly) valid pīnyīn (mostly valid in that it only checks for correct combinations of initials and finals, and not valid/invalid combinations of tones). When typing, if you place a number at the end of a pīnyīn syllable then Pinyinput will automatically convert the correct vowel in the syllable so that it has the appropriate tone e.g. Typing Ni3hao3 will produce the output Nǐhǎo. It knows where the tones are supposed to go so you'll never need to worry about whether the tone was supposed to go over the a or the o, or whatever. It also makes sure you put the apostrophe in the correct place, so the only letters that can follow an apostrophe are a, o and e (píngān and píng'ān are acceptable, pín'gān is not). "Checked" mode also optionally supports "érhuà" so things like pingr2 will be converted to píngr. The "érhuà" support is pretty simplistic, and it will allow any valid pīnyīn syllable which is followed by an r (even though such syllables might not exist in valid pinyin).
The second mode is "unchecked" mode, and in this mode you can type whatever you like, and when you type the numbers 1-4, Pinyinput will put the corresponding tone mark over the preceding letter. By using Unicode's combining diacritic marks, it even supports tone marks over consonants, s̄ò ȳǒù c̀áň w̌řītě āll s̀ōřts̄ ōf čŕāžy̌ s̄tǔff lǐǩě thǐs
Pinyinput outputs Unicode, and the user can optionally decide whether they want to use combining diacritic marks or individual characters (consonants will always use the combining diacriticals). For users who don't know the difference, individual characters are probably the best way to go, as not all programs handle combining diacriticals correctly.
Another feature is that Pinyinput can support multiple different keyboard layouts. So if you use the Dvorak, the French or some other non-qwerty layout you can still type pīnyīn using the keyboard layout that you are familiar with. Pinyinput detects what other keyboard layouts you have installed, and allows you to choose which layout you prefer in its configuration dialog. Also, regardless of the layout used, the letter v of that layout is always automatically converted to ü.
I'm releasing the program free of charge, but if you find it useful, I won't stop you from making donations :-)
Although Pinyinput is reasonably stable, it most likely still contains a few bugs (some of which have now been fixed over the course of the last few months). Anyway, it comes with no warranty of any sort and while it shouldn't cause any problems on your computer, if your hard-drive dies after installing this, it wasn't my fault :-)
Pinyinput works on Windown NT/XP/Vista/7/8 for both 32 and 64bit systems. There is only a single installer, which will detect whether your version of Windows is 32 or 64bit and install the correct binaries as appropriate.
Edit: User peekay has produced a Mac equivalent, MacPinyin
Once installation is completed, you activate it the same way you would any other Chinese input method. So, go to the language toolbar and select Chinese. Then click on the second icon which will bring up a list of all input methods you have installed for Chinese. One of them will be Pinyinput. Once you've selected this, then Pinyinput will be used for all input in that application, and depending on the application, you will either get a little pop-up box, or the text will appear inline as you type.
You can also use the standard keyboard shortcuts to activate it, so Alt-Shift will cycle through the languages available on the language toolbar (English, Chinese etc), and then once you're on Chinese you can use Ctrl-Shift to cycle through the different Chinese input methods available (MS Pinyin, Wubi, Pinyinput etc).
I've attached a couple of images below so you can see what I mean.
Edit: Updated installer to fix a small problem.
Edit 2006/11/9: Updated installer to output more accurate error messages (with thanks to atitarev for testing/debugging), and fixed random bug with checked input.
Edit 2006/12/26: Fixed bug with OpenOffice and keyboard repeat codes.
Edit 2007/5/26: Fixed bug with function keys not working.
Edit 2007/6/01: Fixed bug with ü when typing in checked mode.
Edit 2010/11/20: Released 64-bit compatible version, and fixed a bunch of bugs. Pinyinput is now hosted on sourceforge.
ADMIN NOTE: ATTENTION VISITORS FROM WIKIPEDIA AND ELSEWHERE!
Don't just download the fantastic Pinyinput and disappear! Download it and then register on here to say thanks to Imron. And then participate in our many fascinating discussions! All this could be yours!
Edited by imron, 04 February 2015 - 09:12 PM.
New release of pinyinput