Vietnamese VIQR Keyboard Layout 1.0 for Mac OS X
If you type primarily in English, you have it easy: all 26 letters are right in front of you, one keystroke away. But if, like me, you do any typing in a language like Vietnamese, you’ll sometimes find it tempting to just use a typewriter, where you don’t have to worry about font support for accent marks or application support for various flavors of Unicode, and you can usually flip the page down a notch to turn a caret into a bone fide circumflex. It’s just easier.
When I absolutely have to use a post-1980s device like the computer (what horror!), my keyboard takes a beating, especially when I edit the Vietnamese Wikipedia. Since computers these days treat accented characters like ễ as distinct from their base letters (in this case, e), Vietnamese contains over 90 such characters, and there’s no way you’d cram that into a keyboard. So various folks have devised input methods for Vietnamese: you strike multiple keys, one letter comes out. Not the best way to avoid Carpal Tunnel Syndrome, but you just try talking to someone without any vowels. Isn’t happening, unless you’re a Klingon.
VIQR
VIQR is the most inconvenient of these input methods. In order to type the word tiếng Việt (Vietnamese for “Vietnamese”), you’d enter:
tie^'ng Vie^.t
Only a habitual Perl programmer would actually enjoy using the diaspora of keys needed for VIQR, but I find it less cryptic than schemes like VNI, which uses numbers instead of arcane punctuation:
tie61ng Vie65t
Looks like the subject line of an e-mail advertisement for V-one-agra, I know. And if for nothing else, VIQR is cool because it’s got a catchy acronym (rhymes with “quicker”, ironically enough).
All that’s an inexcusably long way to introduce a little tool I’ve been cooking up: the Vietnamese VIQR Keyboard Layout 1.0 for Mac OS X. (Yep, it’s got a long name too.) After enabling this keyboard layout, you can type perfectly-accented Vietnamese into any Mac application that supports Unicode. That includes the works: TextEdit, Firefox, Word, Adium, iTunes, the Dashboard, and even Terminal.
Download
So if you’re a Mac user, you can add VIQR support to your computer by downloading this keyboard layout:
VietnameseVIQR-1.0.tar.gz
(tarball, 12 kB)
System requirements
First of all, this keyboard layout requires Mac OS X. Any localization will do. Although I haven’t tested the keyboard layout on anything by Tiger (version 10.4), it should theoretically work as far back as Jaguar (10.2).
Windows users should try UniKey, which supports multiple input methods and is much more flexible. (For instance, it allows you to enter the diacritics after the letters.)
Apparently Leopard includes its own VIQR layout, but I haven’t gotten my hands on Leopard yet, and I desperately needed to type in VIQR. (Leopard includes several Vietnamese input methods now, all under the UniKey brand, so perhaps it has the same advanced features as the real UniKey.)
If you’re not on Leopard yet but don’t particularly care for VIQR, you might prefer one of Gero Herrmann’s Vietnamese keyboard layouts.
Installation and setup
- Download the tarball and unzip it.
-
The resulting folder contains five files, but of those, you only need VietnameseVIQR.keylayout and VietnameseVIQR.icns. The latter is the keyboard layout’s icon. Copy both to one of these locations on your computer (both locations are accessible from the Finder):
- Name of User ▸ Library ▸ Keyboard Layouts ▸
- Placing the files here makes the keyboard layout accessible to you and you alone.
- Name of Hard Drive ▸ Library ▸ Keyboard Layouts ▸
- Network ▸ Library ▸ Keyboard Layouts ▸
- On Mac OS X Server, placing them here makes the keyboard layout accessible to every user on your network.
- Log out and back in again. (No way around this step, unfortunately for anyone who has to write and debug a keyboard layout.)
In System Preferences, open the International panel (under the Personal section) and switch to the Input Menu tab. “Vietnamese-VIQR” should now appear in the list; turn it on. Also, make sure that the “Show input menu in menu bar” option is checked, so that you can switch between the different keyboard layouts you’ve enabled.

There should be a new icon for the Input Menu on the right side of your menu bar. (If you don’t like its placement, hold down ⌘ and drag it around.)

A geopolitical note
For consistency with the built-in Vietnamese keyboard layout, the VIQR layout’s icon bears the current flag of Vietnam. However, I know that many overseas Vietnamese would be uncomfortable displaying this flag on their menu bar all day, so I included two alternatives: VietnameseVIQR-South.icns, which bears the historical flag of South Vietnam, and VietnameseVIQR-Map.icns, which features Vietnam’s silhouette. If you prefer, you can replace VietnameseVIQR.icns with either of these icons.
Usage
The Wikipedia article on VIQR does a good job of explaining how to use this input method. Here’s a quick demonstration:
You’ll need the Flash Player to watch the clip.
viqr-demo.mov
(QuickTime movie, 1.5 MB)
Yes, that was too fast for an instructional video. No, that wasn’t intended to be an instructional video.
Known issues
In some programs, buttons in dialogs don’t respond to keyboard shortcuts. For instance, in TextEdit, ⌘D doesn’t trigger the “Don’t Save” button when closing an unsaved document.
License
The keyboard layout is licensed under the standard MIT License. In essence, go all out. Just don’t blame me if no one can understand you any longer, because circumflexes and tildes suddenly litter your handwritten English notes, because you love VIQR so much.
Colophon
The keyboard layout was made with the help of Ukelele and KeyLayoutMaker, both freeware tools by SIL International. However, I had to do a lot of hand-tweaking to get it to a usable state.
It conforms to the VIQR standard, though it handles dead keys differently than most JavaScript-based input methods for Vietnamese, due to the limitations in Apple’s XML Keyboard Definition format. In addition to the standard characters, the đồng sign (₫) is accessible via ⌥4 (replacing the cent sign from the standard U.S. English keyboard layout).
Categories
Macintosh , Programming , Vietnamese1 TrackBacks
Listed below are links to blogs that reference this entry: Vietnamese VIQR Keyboard Layout 1.0 for Mac OS X.
TrackBack URL for this entry: http://panel.1ec5.org/mt/mt-ping.fcgi/807
Introducing an extension for Firefox and its companion e-mail program, Thunderbird, that checks your Vietnamese spelling as you type. Read More

Well M.X. Nguyễn, I finally took it upon myself to get my own hosting. I may put up a blog soon but for now it's just a placeholder with a cute frog.
You should really look into getting a domain name-- I'm sure $7 a year wouldn't kill you to get minhsnotes.com or something. That is, unless you have a reasoning otherwise.
Whoops. I meant, get an extra domain besides 1ec5.org.
I actually intend for my site to center around the 1ec5 name someday in the future. (After I redesign the redesign I’m working on right now.) It’s hard to come up with something more obscure than “1ec5”, anyhow.
I used to write with VIQR exclusively, but have now converted to Telex. It was sort of weird at first but once you get used to it, it's much easier. VIQR requires too many keypresses, and requires you to constantly extend your fingers to reach the numbers row. Now that Telex is so ingrained in me, I have trouble typing with VIQR where Telex is unavailable (**cough**Pidgin**cough**).
One of my pet peeves is using flags as symbols for languages or people. This is idiotic and sometimes insulting. Why use something that is not familiar to all speakers of a language or not even insulting to some of them when you can use something universally understood like the language name itself in that language. Thankfully, I never had to deal with that in the operating systems that I've used.
I suppose it never bothered me to have my fingers reach for the keyboard’s extremities so often, since programming (**cough** regular expressions **cough**) makes me do that anyways.
The only reason I used a flag to represent this keyboard layout by default was that the existing Vietnamese keyboard layout (Telex) already uses the Vietnamese flag. Otherwise, I would’ve just made the silhouette of Vietnam the default. Not a perfect solution for every language, but probably good enough for Vietnamese, which is identified with the country most of the time anyways.
I’m pleased that Leopard, the latest version of Mac OS X, represents the Vietnamese input methods with what appears to be the Temple of Literature.
Hi Minh,
I followed all the steps to add VIQR to my menu bar on a mac computer and after selecting the Vietnamese-VIQR icon in the Input menu I didn't see the options for "Show Character Palette", "Show IPA palette" or "Show Keyboard Viewer".
Sorry, those menu items aren’t part of the VIQR keyboard layout; only the Vietnamese-VIQR item is. You can turn on the Character Palette and Keyboard Viewer using the Input Menu tab of the International preference pane. (They’re at the top of the list.) You can download the IPA Palette separately, but that’s for writing in the International Phonetic Alphabet, which I do on occasion. Sorry again for the confusion.
Minh, thanks for the article and the program.
Hi--
Sorry for a random question, but does movable type support VN fonts and script? have you had any issues with this?
thanks,
J. Sager
Hanoi
By default, Movable Type does not use Vietnamese-specific encodings like VISCII, VNI, or VPS, if that’s what you mean. (These encodings all have “Vietnamese fonts” that you have to download.) Instead, like most web applications these days, MT uses Unicode.
Unicode fonts that support Vietnamese include Times New Roman, Arial, Helvetica, Tahoma, etc., so things should work right out of the box if you use ordinary fonts. However, if you’d like to use legacy Vietnamese encodings, you can specify it in MT’s configuration file (
mt-config.cgi), using something like this:This is a system-wide setting, so it affects every blog using that installation of MT. Some versions of MT also have a setting right inside the user interface that apply only to a specific blog. This configuration setting changes the encoding used when publishing entries, but MT’s interface will remain in Unicode, so it’s a bit awkward to compose entries. (Depending on your browser, you’d need to set the encoding using the View menu each time you edit.)
The main issue with using a legacy Vietnamese encoding is browser support. Firefox is rather nice in this regard: it supports TCVN, VISCII, VPS, and Windows-1258, but not VNI. As far as I know, Internet Explorer supports only Windows-1258, but I’m not certain about that.
Your best bet is actually to use Unicode, which doesn’t require specialized Vietnamese fonts and is supported by most software applications these days. Hope this helps.
Cam on nhieu qua, Minh!
Minh, not sure if this is normal behavior, it often happens (e.g., in gmail) that after I type something, go back and edit the word, after done editing I have to use the arrow key to move to a different word for my modification to stay, otherwise it is auto delete (i.e., the changes not committed).
When you go back and edit the word, was the last key you pressed a vowel or D? Unfortunately, I believe this is normal behavior in that case. In Cocoa-based applications like Safari and TextEdit, that vowel or D will be highlighted in yellow until you press something else, like the spacebar, an arrow key, ⎋, or one of the keys that produces an accent mark. In Firefox (and maybe other applications), the vowel is given a thick underline instead. The highlighting or underlining means the letter hasn’t been completed yet.
This seems to be the way Mac OS X’s keyboard layout feature works. The highlighted or underlined character is called a dead key. Most keyboard layouts require you to press a dead key before the vowel, so if the vowel is never entered, Mac OS assumes you changed your mind and don’t want that accented letter after all, and gets rid of the dead key character. Because Vietnamese input methods are the other way around – vowels before accent marks – the dead key character is the vowel, and that means the vowel is sometimes removed. I don’t know if this is how the UniKey input managers in Leopard function.
If that’s not the problem you’re seeing, let me know.
Minh yes I believe that's what I have been experiencing in Tiger. Just a minor issue nonetheless.
Minh I saw on this page that you also edit Vietnamese entries on wikipedia, I'd like to contribute but not very familiar with the editing/management parts. In particular I want to create a page containing lyrics (in utf-8) of famous songs from renown Viet composers such as Van Cao, or poems from Ho Xuan Huong, Ba Huyen Thanh Quan etc.
Anyway let me know if you're interested. My email is nguyenthanhvuh@gmail.com .
I used to use VPS keypad from OS X classic version and it worked beautifully. Since I updated my system to Tiger, I can't seem to use the fonts anymore. Although, I did install the VIQR key and it worked fine on TextEdit and online, but because i do design job and it requires me to use different program like Illustrator or photoshop and can't seems to work on them. Do you have any suggestion or different program for them? Looking forward to hear from you. Cheers, Amy
Sorry, I’m not that familiar with either software package, although I know Photoshop doesn’t use the native Mac facilities for displaying text – as far as I know, all text is custom-drawn, so I’m not confident that I could make this keyboard layout work in it.
Minh, could you also provide the Vietnamese icons without the VIQR text at the bottom ? Thanks
It’s already available on your system at Name of Hard Drive ▸ Library ▸ Keyboard Layouts ▸ Unicode.bundle ▸ Contents ▸ Resources ▸ Vietnamese.icns. But since that’s rather hard to find, I’ve uploaded a copy, and I’ll include that file in any later releases of this keyboard layout. As always, replace VietnameseVIQR.icns with that file, and you’re good to go.
ah I was referring to the pre75 viet icon --- do you have that cone w/out the viqr text ? Thanks
Here you go.