URDU on the MACbyKamal Abdali |
The Mac OS X is capable of editing and word processing in Urdu.
In a few simple steps, you can enable your Mac to handle Urdu documents.
This page could as well have been entitled "Urdu and Persian on the Mac", because the information given here can also be used to compose Persian (Farsi) documents. The keyboard, fonts, and explanations below apply equally to Persian, but the explanations are illustrated with Urdu words. The keyboard and fonts also suffice for Punjabi (Shahmukhi or Pakistani style, written in the Arabic script) and Ottoman Turkish. But the keyboard does not have all the symbols of Sindhi and Pushto alphabets.
Please email your enquiries, comments, criticisms, and suggestions to me at k.abdali@acm.org
BEFORE INSTALLATION: If the folder /Library/Keyboard Layouts contains files named UrduPhonetic.keylayout and UrduPhonetic.icns, then delete these two files. (These have now become obsolete.)
If a US flag was not previously visible at the top right of
the screen (on the menu bar), it should now be displayed.
This is the Input menu (sometimes called the
Keyboard menu).
If you click on this flag, a menu will appear underneath it with
various icons and names representing all the active keyboards.
A keyboard named Urdu-QWERTY and an icon (Urdu-QWERTY Keyboard Icon)
somewhat like the flag of Pakistan should now appear.
If you click on it, then the keyboard icon on the top right of
the screen will turn into the Pakistani flag, and any keys pressed
on the Mac keyboard will produce Urdu characters.
You can switch between keyboards by clicking on the flags
(the keyboard icons).
On a Mac, it is best to use Naskh fonts (which are typically used in Sindhi, Arabic and Persian publications), not the Nastaleeq fonts (which are used in most Urdu newspapers). Although Nastaleeq fonts are available for the Mac, they don't work as robustly as the Naskh fonts. But if you want to experiment with Nastaleeq fonts anyway, they are discussed in the section Nastaleeq Fonts further below.
Knut Vikor's excellent page The Arabic Macintosh has a detailed discussion of various Arabic Fonts with interesting information about them and links to obtain them.
The Mac OS comes with only one Naskh font, Geeza Pro, which can be used for Urdu, but the characters do not look particularly attractive. A free and very attractive set of fonts for Intel Macs is XB Zar distributed by the Iran Mac Users Group (IRMUG).

Your Mac is now ready for handling documents in Urdu.
After having used the Urdu-QWERTY keyboard on your Mac for a while, you might be interested in using the same key settings also on your Windows computer. If so, you can download the Urdu QWERTY Keyboard Layout for Windows. Unzipping the downloaded file will produce a folder. Open this folder, and double-click on the file setup.exe in it to install the keyboard on your system. Then activate the keyboard via the Control Panel. Be sure to also install some of the fonts recommended below; these fonts will properly display the symbols that this keyboard lets you type.
You can download a one-page compact diagram showing the key assignments in Urdu QWERTY Keyboard Layout from here. (This file was updated on 2011-11-29.)
The Urdu-QWERTY keyboard layout that you have downloaded has been designed to closely resemble the phonetic keyboard of InPage, a popular commercial desktop publishing application for Urdu that runs under Windows.
The advantage of a QWERTY (also called, phonetic) keyboard is that keys are assigned to letters based on letter sounds; e.g., the key "b" for the Urdu letter "bay", "p" for "pay", "k" for "kaaf", "g" for "gaaf", and so on. Such an assignment helps you remember most of the keys. As we do not have enough keys on the standard computer keyboards to assign to all Urdu characters, we need to use shifted keys for some (e.g., "shift-k" for "khay", "shift-g" for "ghain", etc.)
In addition to being phonetic, this is also a Unicode keyboard layout. Whatever you type is converted to its Unicode representation which is the modern universal character encoding used in computers for multi-lingual texts.
The Input menu (Keyboard menu) has an item Show Keyboard Viewer. If you select this item, then the system will display a picture of the keyboard on the screen. By default, the picture is very small. But you can make it larger or smaller like any window by pulling the handle at its right-bottom corner with your mouse. In this picture you can see what character each key corresponds to. The characters will change appropriately if you press the shift key or option key (or another modifier key) or select a different keyboard from the Input menu.
For reference, below are larger pictures of the Urdu-QWERTY Keyboard showing the characters corresponding to the keys in plain, shift, option, and option-shift modes. For a pdf file with printable keyboard pictures, click here. (This file was updated on 2011-11-29.) You can then print the keyboard pictures for reference.




Even though we have tried to make the keyboard layout as phonetic
as possible, the mismatch between the Urdu alphabet and the available
keys on a Western keyboard has forced us to make some unintuitive
mapping between letters and keys.
But with a little practice you should be able to type most letters
from memory.
The above pictures contain all the information that there is to give about the Urdu-QWERTY key assignments. But for quick reference here are some tables of useful key bindings.


Another useful key is Shift-" that generates the dash-like Kasheeda character. Kasheeda can be used in Naskh fonts to stretch words.

An email message is usually a very simple document. If you compose your email on a Mac, and your recipient is also going to read your email on a Mac, then you can try writing your messages in Urdu. In fact, the messages are readable even on any non-Mac machine that has been configured with system options for right-to-left languages and on which appropriate fonts have ben installed. An occasional character in these messages might be undecipherable, and might be replaced with its unicode icon (or some gibberish, in the worst case).
Both Gmail and YahooMail systems work admirably when the Urdu-QWERTY input is turned on and message composition is in Rich Text format with right-to-left text direction. With Hotmail, mixing right-to-left and left-to-right text in the same line seems problematic, as that seems to interfere with the correct sequencing of words. In each case, the cursor behavior is a bit erratic; the cursor sometimes shows up at the right end of the line instead of being at left next to the last word typed. But you can ignore all that since your text is still set correcly. The cursor behavior will likely be fixed by Apple and email system producers anyway.
It helps to set the Web browser preference for Default Character Encoding to Unicode (UTF-8). If you use the Firefox Web browser, then in its preferences set the Default Font to XB Zar, Size 18, all Fonts for Arabic to XB Zar, Monospace Font Size to 16, and other sizes to 18. The Safari Web browser does not allow language by language font control, so just set Standard Font to XB Zar 18. If your machine is not an Intel Mac, or for any other reason you cannot use the XB Zar font, then in its place use Scheherazade-AAT, Size 24.
Google has developed an input method based on transliteration of text typed using letters of the Latin (i.e., Roman or English) alphabet. This method, called Google Transliteration Input Method Editor (IME), is available for Urdu. It lets you enter Urdu words using Latin characters phonetically. Google Transliteration IME will convert the text, based on its sound, to Urdu characters. The conversion is quite liberal so the correct Urdu word will result from most of its reasonable phonetic Roman spellings. By the same token, the same Roman text can lead to several different Urdu words. In the latter case, you will be able to choose one of the words from a menu. For example, the Roman text "sada" can correspond to the Urdu words سادہ (meaning simple), سدا (always), صدا (sound), and possibly others. So if you type "sada" in Google Transliteration IME for Urdu, the system will display these Urdu words in a menu, from which you can select your intended word.
IME saves you the trouble of installing keyboard layouts for the languages you like to type in. But experimenting with IME is likely to convince you that it is more efficient to type Urdu text directly using the Urdu-QWERTY keyboard layout, rather than via IME. The mismatch between Roman and Urdu alphabets is so substantial that there are too many phonetic Roman spellings for the same Urdu word, and too many Urdu words result from the same Roman text. So while using IME, you are likely to be wasting much time trying and selecting alternatives.
IME is available as an option in Gmail. It is also available for MacOS as a service so you can use it with applications such as word processors.
Gmail also allows specifying Urdu as the application language. In that case all the menus, titles, warnings, etc., will be translated to Urdu. But you do not need this drastic setting in order just to read and write Urdu email messages. While keeping English as the system working language, you can type Urdu text by selecting the Urdu-QWERTY input. Of course, you can also intersperse texts in Urdu and English by simply switching back and forth between Urdu-QWERTY and English keyboards.
For the Mac, there are two free office suites OpenOffice and NeoOffice, each of which includes a powerful word processor that can be used to edit Urdu documents. OpenOffice is a multi-platform open-source software application, with a Mac-specific version called OpenOffice Aqua. NeoOffice is another Mac-specific implementation of OpenOffice. If you want to install one or both of them, you can find detailed descriptions and installation instructions on their official Web sites OpenOffice and NeoOffice. We will not describe their use.
A highly recommended editor is Bean for which the general information and download instructions can be found on its official Web site. This is a free, easy to use, small, and very efficient word processor. It is quite adequate for simple documents. Beware that at present it lacks some advanced word processing features such as footnotes. It is also a bit stubborn in its behavior; for example, the document line size cannot be changed simply by resizing the editor window.
The Mac's built-in application TextEdit is good enough for simple documents. TextEdit is considered a text editor rather than a word processor. Yet it can be used for composing documents with multilingual text, embedded graphics, tables, and other advanced features typically found only in large, expensive software applications. Its advantage is that it doesn't need to be installed: It is always there, and is the Mac's default editor for text files.
In Plain Text mode, TextEdit allows only a single font and a single paragraph justification style for the entire document. In Rich Text mode, you can mix various font families, font sizes, font styles (e.g., bold, outlined, shadowed), and justifications (e.g., centered text, or text justified at left or right or both sides). You need to use Rich Text since Plain Text does not work well with Urdu.
To start a new Urdu document, select the menu item File > New, then Format > Text > Writing Direction > Right to Left. Set the Input menu (Top Right) to Urdu-QWERTY. Choose fonts, font styles, size, colors, etc., as is usual with most word processors. Since the default formatting is Plain Text, switch to the Rich Text Format by doing Format > Make Rich Text. Now you can apply a different justification to each paragraph, and a different formatting style to each selection.
It is helpful to also do Format > Font > Show Fonts. This puts on the screen a font palette which is convenient for choosing font family (e.g, XB Zar, Scheherazade-AAT, or Lateef-AAT), size, color, etc. The XB Zar font family also includes typeface variants such as italic, bold, and bold italic. (But see the note in the section More Naskh Fonts about the use of italics.) The system seems to unpredictably switch the font sometimes to Geeza Pro (the "system default font" for the Arabic script). So you need to watch the font palette and, if necessary, change the font back to what you want it to be.
You can configure TextEdit to use your favorite font as the default. To do this, start TextEdit, and on the Menu bar click on TextEdit, then on Preferences, and then on the New Document tab. If the Rich Text radio button is not active, click on it. Click on the Change... button next to Rich text font: . The font dialog will open. Now, select, for example, XB Zar in the family column, and 18 in the size column, then close the dialog. Finally, close Preferences, and quit TextEdit. When you restart TextEdit, it will use the Rich Text format and the XB Zar size 18 font as the default for new documents.
Here is an image of a portion of the Mac screen during the editing of an Urdu document using TextEdit.

X Series 2 is a set of free, high quality, attractive Naskh fonts that support Urdu and Persian. These come with matched groups of regular, italic, bold, and bold italic characters; some even have outline and shadow variants. The X Series 2 fonts are downloadable from the Iran Mac User Group Wiki site. Particularly nice font families on that site are XB Niloofar, XB Yas, XB Kayhan, and XB Zar for general use, and XB Titre for headings.
NOTE: In the regular typeface of Naskh fonts, the "vertical" strokes of Alif, Laam, etc., are actually drawn with a slight tilt to the left. The italic Naskh typefaces of X Series 2 fonts are designed by slanting the same strokes a bit to the right. Some font families in this series also have oblique typefaces in which the strokes are slanted even more to the left than in the regular typeface. But since few Urdu letters contain prominent vertical elements, the italicized (or oblique) text in Urdu does not stand out well. (This is in contrast to the Latin alphabet where nearly every letter has vertical strokes.) The boldface text in Urdu is, of course, quite noticeable.
Dozens of free Naskh fonts can be downloaded from the Internet. But you need to experiment with them to pick the ones that are of good quality and work with the whole Urdu alphabet. Some of them have been adapted from Arabic or Persian, without extending them properly for the additional letters of Urdu. You should check, in particular, whether these fonts properly display all the needed forms of the letters "Noon Ghunna" ں, "Goal Hay" (also called "ChoTi Hay") ە, "DoChashmi Hay" ھ, and "Bari Yay" ے .
In Mac OS 10.5 and above, it is possible, with some care, to use Nastaleeq fonts with TextEdit and Bean. Some freely available Nastaleeq fonts are:
A variety of Nastaleeq as well as Naskh fonts are available for download from Urdu Web, Urdu Jahan, and Deedahwar. Please be warned though that the InPage company alleges that some freely available Nastaleeq fonts are pirated from their work.
Note: To install a font file, copy it to /Library/Fonts. On Mac OS 10.6, you can also install a font file by double clicking on it, then clicking on the Install Font button in the dialog box presented to you. Any font installed in this way is copied to ~/Library/Fonts where it is available to the active user but not to other users.
CAUTION: Nastaleeq does not work at all in OpenOffice and NeoOffice. The former displays in isolated form the characters that are specified to be in any Nastaleeq font. The latter replaces all Nastaleeq fonts with the Naskh Geeza Pro font.
OBSERVATION: Nastaleeq works satisfactorily with the message composer in Google's Gmail. You need to have the rich text style activated and the Right-to-Left text direction turned on. Since Gmail composer's font menu is fixed and there is no Nastaleeq font in it, how do you make the composer use Nastaleeq? The only way that seems to work is to start a message with some Nastaleeq text copied from another Gmail message. Then while you edit this text, Gmail preserves the current text font! But keep in mind that any text copied from elsewhere, e.g., a TextEdit window, won't be rendered in Nastaleeq, so there is no sense starting a message with such text for the purpose of composing a message in Nastaleeq.
OBSERVATION: Nastaleeq works satisfatorily with TeX, discussed below in the section Typesetting Using TeX, LaTeX, XeTeX. For best results, use Open Type (OT) fonts with TeX.
Here are some conculsions from experiments with the above fonts using TextEdit and Bean under MacOS 10.6:
Summary: Nafees is the only Urdu font that works sastisfactorily with editors like TexTEdit and Bean. IranNastaliq is undoubtedly the most elegant and stylish, but it cannot handle the letters particular to Urdu. While Jameel and Faiz have very nice quality, they fail to render many typed words, and can be quite annoying at times. Pak is not acceptable at all in its current state because of its letter shapes. Fajer is too unstable to be used with confidence, which is a pity because its shapes are nice and the failures are limited to just a few ligatures.
Details:
By comparison with Nastaleeq fonts, Naskh fonts work much better on the Mac, and editing with them is generally trouble-free.
Here is an image of the TextEdit window during the eding of a document mainly with the Nafees Nastaleeq font (size 48 for the title, size 36 for the author's name, size 22 for the text body).

To contrast the Urdu and Persian Nastaleeq styles, here is the image of a document set in the IranNastaliq font. Notice that compared to the Urdu sample, the strokes in the Persian sample are more consistent and uniform, and the latter sample more closely resembles manually calligraphed old manuscripts. Specially pleasing to the eye are the long slanted strokes (called "markaz") of kaaf and gaaf, and the stretched horizontal parts of letters like bay, tay, kaaf, etc.
NOTE: For the Persian letter Hay (ه), type the key Option-o. The Urdu letter Goal Hay (ہ), typed with the key o, will not get properly connected within a word when a Persian font is being used.

InPage is a commercial desktop publishing application for Windows. It is widely used by publishing houses for producing Urdu publications because of its rich feature set, multi-lingual and multi-script capabilities, and robustness. Until recently, it was one of very few applications that could produce high-quality Nastaleeq documents.
Unfortunately, InPage works only on Windows and, moreover, uses proprietary document structure and fonts. Naturally, there is much interest in converting InPage files into alternate, more portable versions that could be processed on multiple computing platforms with multiple applications. So several online tools and programs have become available to convert Inpage files to Unicode text files. In fact, InPage itself has a unicode coversion facility of sorts through its copy and paste Edit menu items.
The coversion programs that I tried turned out to have errors or limitations, so I had to write one myself. This is a command line application in universal binary code, and works on both PowerPC and Intel macs. It requires Mac OS version 10.4 or higher. As I do not have access to any documentation of the inner structure of InPage documents, this program is based on guess work. Although I have run it successfully on several large documents, please use it at your own risk. Also, since it is a command line application (i.e., a shell command), you need some rudimentary Unix skills to use it productively. Please let me know if you encounter any bugs. Here are the instructions for the simplest way to use it:
./InpToUniTxt story.inp story.txt
and press Enter.
CAUTION: If your files or the saved application are in different
directories, then make sure to use the right path for each file.
Please be aware that the InPage document's formatting properties
(justifications, fonts sizes and styles, colors, etc.) are lost during
the conversion.
The conversion mainly consists of text extraction.
The term TeX is used here in a generic sense for TeX or any of its derivatives, such as LaTeX, AMSTeX, ArabTeX, XeTeX, ArabXeTeX, etc. But when the discussion is about a particular derivative, that system is mentioned by name, e.g., XeTeX.
When you use a word processing system, you take formatting actions yourself, and the system keeps displaying the document as it changes in response to your actions. When you use TeX, you put the document contents (text, images, etc.) and the formatting instructions together in one or more tex files, and the system processes them to produce the desired document. The tex files you prepare constitute a TeX program. The TeX system executes this program to produce the desired document, typically in the form of a PDF file.
TeX has a steep learning curve, but once mastered it allows you to produce very complex, high-quality documents, and provides you very fine control over the look and feel of the document. TeX is widely used for producing scholarly works, and many scientific journals and conferences require that articles be submitted to them in the form of tex files.
Various distributions of TeX are available for the Mac. We highly recommend the TeX Live distribution together with the TeXShop graphics environment for using TeX. For this, download and install the full MacTeX package. The download, installation, and usage instructions are on the TeXShop Web site. The MacTeX package includes most of the components needed for processing Urdu documents. In particular, it includes the system called XeTeX which currently offers the best facilities for Urdu.
XeTeX has overcome two limitations that were not satisfactorily addressed by the previously existing derivatives of TeX, and that, in particular, greatly hampered the production of Urdu documents with TeX:
TeXShop makes it very easy to edit and execute TeX programs. When you launch TeXShop, it brings up a window in which you can edit your TeX program, i.e., your tex source file. But you should first set TeXShop's Preferences. The most important preferences are in the Source and Typesetting tabs.
Since preparing TeX files for Urdu documents requires frequent switches between the Urdu keyboard (for text) and the English keyboard (for special characters and TeX commands), you might consider setting up Keyboard shortcuts for that purpose. Refer to the section Keyboard Shortcuts for Changing Keyboards further below.
Note that TeXShop's default in the source window is to display the TeX commands in blue, comments in red, and other text in black. Also, you will notice that TeXShop uses the first character of each new line of text in the source window to determine whether to start displaying the line from the left or from the right end of the window. If the first character of the line belongs to a left-to-right script (e.g., English), then the line is started at left. But if the first character of the line belongs to a right-to-left script (e.g., Urdu or Persian or Arabic), then the line is started at right. Characters like space and certain punctuation symbols are considered belonging to left-to-right scripts, and cause the line to be started at left.
Once the editing of your tex file is complete, you should click on the Typeset button. TeXShop will process your tex file, and will display the resulting PDF file if the program ran successfully. It will also bring up a Console window with progress and error messages.
We now give an example of typesetting an Urdu ghazal using XeTeX. The first image below shows the TeX program, poemRA.tex. XeTeX (actually the program xelatex) executes this file to produce the PDF file poemRA.pdf, shown in the next image.
The TeX program uses the fontspec package to gain access to the fonts installed on the computer. The program uses Vafa Khalighi's bidi package for the text's bidirectionality (i.e., to handle left-to-right and right-to-left scripts). The bulk of the poetry formatting is done by the bidipoem package The essential TeX instructions for typesetting consist of the first seven lines and the part between \begin{document} and \end{document}. Note how simple the TeX code is in this case; it really amounts to just putting the lines of the poem within the traditionalpoem environment.
IMPORTANT: To make sure that bidipoem justifies the lines of the poem correctly, you need to typeset the document twice (that is, press the Typeset button again after running the program successfully once).
To illustrate how TeX makes it easy to add extra flair to the output, the TeX program also puts a decorative border along the page margins. This is done by the block of code in the middle section. The work is done mainly by the fancyhdr package. You need to install on your computer the free font WebOMints GD which can be downloaded from the Internet. The symbols in this font can be used for decorating documents in various ways. Here some of its symbols are being used to assemble the border shown on the output PDF file. Note that in the new font family declaration, we give a name (\w) to the WebOMints GD font, and use the Color option so that all symbols of this font will be in the designated color. The 6 hexadecimal digits represent the code for a shade of turquoise.
If you try to typeset a poem with longer lines, then you might get each of its couplets displayed on two lines, in a different poem style. Also, you might need to play with the parameters (62,-18) in the line beginning with \begin{picture} to display the border correctly.


More complex Urdu documents are best produced in TeX by making use of François Charette's package polyglossia. This package is intended to support texts in multiple languages, including Urdu. It runs on top of the XeLaTex derivative of TeX.
The example below shows an Urdu document typeset with the aid of polyglossia. It illustrates a number of features typically needed in an article or scholarly paper, such as: typesetting of titles and section headings; formatting of lists and tables; footnotes; and automatic numbering of sections, list items, and tables. The document also shows how to insert English text in an Urdu document.
The document style employed for the sample Urdu document is article; this can have sections and references but not such components as tables of contents. For a book length document, you should use the book or memoir document styles. These styles greatly facilitate and automate much of the work needed in the production of: title pages; table of contents; chapters with sections, subsections, subsubsections, etc.; automatic numbering of lists, figures, tables, etc.; bibliographic references; and indices.
The next two images below give the beginning and ending parts of
the TeX source file to produce the sample Urdu document.
The third image below shows the PDF pages of the Urdu document.




Links to obtain the above Urdu document in PDF form as well as the TeX source to generate the document:
For better legibility, the PDF file of the Urdu document can be downloaded from
here.
The full TeX source code to produce the Urdu document is
here.
Modern web browsers are quite good at interpreting and displaying multi-lingual texts from their Unicode character encodings. Of course, the browser needs to be told that it should expect Unicode material in the web document (usually, an html file) that it is being asked to execute. The Unicode character encoding for Urdu and Persian letters, along with the letters of many other languages, is called UTF-8. So to display Urdu text, you have to specify in your web document that its character set is given by UTF-8, as explained next.
The particular character set that a web document contains is specified by the meta statement. Near the beginning of your html file you will find some code that looks like this:
   <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
(This is just an example.
Your character set might have a name different from "ISO-8859-1".)
You have to change the character set declaration to "UTF-8", by replacing
the above meta statement by:
   <meta content="text/html; charset=UTF-8" http-equiv="content-type">
Any Unicode inserted after this meta statement will be displayed as the character that the code represents. The Unicode for Urdu and Persian can be found in the Unicode Arabic page. A table which gives the standard Unicode as well as its html representation, called html numeric character reference, is given here. A very useful online tool is UTF Converter that lets you quickly convert a string of one or more characters to Unicode in various formats. UTF Converter's author, Mark Davis, has a Web site Macchiato with several other very useful Unicode-related utilities.
From the table on page 2 of Unicode Arabic page, you can check that the hexadecimal Unicode representations of the Urdu letters Alif, Re, Daal, and Vaao are, respectively, 0627, 0631, 062F, and 0648. Now the html syntax for a hexadecimal code HHHH is &#xHHHH; . So suppose in your html document you insert the following:
   <center>
   <big><big><big>
   &#x0627;&#x0631;&#x062F;&#x0648;
   </big></big></big>
   </center>
The result will be the word "Urdu" (in Urdu) displayed in 3-size larger letters and centered in a line, as follows:
Typing numerical codes in this way is clearly impractical except for displaying just a few characters. Fortunately, you don't have to enter character codes manually if you use the Urdu-QWERTY keyboard layout. The characters typed on this keyboard are automatically converted to their Unicode version and placed in the input. All you have to do is to switch to Urdu-QWERTY on the Input menu at the point in your html file where you desire to insert Urdu text.
A caveat is in order here. To prepare html files, you are likely to use some special editor different from TextEdit. We have seen that, in RichText mode, TextEdit processes Urdu letters correctly, displaying the right form of the letter and connecting the letters appropritaely. Other editors, specially the so-called programmer's editors often used to prepare html files, may not do all that. For example, your typed Urdu letters might be displayed in their isolated form from left to right in the order of their entry, without being connected together. Or worse, your typed input might appear garbled in even more annoying ways! If you are looking for an excellent, free html editor that handles Unicode and UTF-8 well, and displays Urdu text correctly, try Arachnophilia.
Of course, the readers of your Web page will be able to see the Urdu text correctly only if their system has been configured for multi-lingual processing and has the Urdu fonts installed. In addition, it might be necessary for your readers to set the viewing option of their web browser for "Unicode (UTF-8)" character encoding.
Some mathematical symbols are so frequently needed in technical typing that they have become standard in Mac's English keyboards. So the Urdu-QWERTY keyboard also provides several of these symbols, via option and option-shift keys as usual. Note that the symbols for summation, integration, root, etc., change their orientation to match the right-to-left text direction.
In Urdu mathematical notation, the dots of the dotted letters
are sometimes omitted.
So the Urdu-QWERTY keyboard provides the dotless forms
ٮ for ب
ڡ
for ف
ٯ for ق
Another practice in Urdu mathematical writings is to sometimes use just
the stems of letters, not their full form.
Such symbols can be easily generated by adding the "kasheeda"
character (ـ) to a letter.
For example, the symbol خـ , generated by the key
sequence shift-K and shift-" , represents the "imaginary"
(in Urdu, خیالی) number i.
NOTE: The keyboard suffices only for the casual typing of a few mathematical symbols in a general document. To prepare documents with elaborate mathematical content, the ideal approach is to use TeX/LaTeX/XeTeX. See the section Typesetting Using TeX, LaTeX, XeTeX.

NOTE: For "Changing Keyboards", the standard MacOS terminology is "Changing Input Source" or "Changing Input Method".
While editing certain documents, you need to change Keyboards quite often. For example, you may be working on a dictionary. Or, you might be preparing TeX files for Urdu documents, and need to continually switch keyboards between Urdu (for text) and English (for special characters and TeX commands).
The standard way for changing Keyboards is to select the desired keyboard in the Input menu at the right end of the Apple menu bar at the top. This is cumbersome and annoying when Keyboard changes are very frequent. So you might like to set up a Keyboard Shortcut for it.
MacOS has shortcuts programmed for Keyboard change already. These are: Command-space for toggling between keyboards and Command-shift-space for cycling through the active keyboards. But in MacOS versions 10.5 and above these are disabled by default, because exactly the same shortcuts are enabled for Spotlight searches.
If you prefer, you can disable the Spotlight shortcuts and enable the Keyboard shortcuts. To do this in MacOS 10.5 and above, go into the Finder, and select Apple > System Preferences > Keyboard. In the window that opens, click on the Keyboard Shortcuts tab. Select Spotlight in the left column, and disable the shortcut items that show up in the right column. Then select Keyboard & Text Input in the left column, and enable the input source-related items that appear in the right column.
Of the two Keyboard shortcuts Command-space and Command-shift-space, the former is certainly easier to type. If you have only two keyboards activated (say, English and Urdu), then the two shortcuts are equivalent. (You can quickly see which keyboards are active by clicking on the Input menu. An icon appears underneath it for each active keyboard.) However, if there are more than two active keyboards, then you might like to interchange the shortcuts. You can change a shortcut by double-clicking on it, and typing over it any desired combination of modifier keys (Command, Control, Shift, etc.) and a regular key (space, letter, number, etc.)
Most of the reported installation difficulties turned out to have a simple reason: during download or extraction, the file extensions got changed. Often a .txt extension was appended to one or more file names.
So first please make sure that your Mac shows extensions in file names. For this, move into Finder (for example, by clicking in a Finder window, or on the Finder icon in the Dock, or at a point on the screen which is not occupied by an application window). Then on the Menu bar (the one with the Apple icon at the left), click on Finder, then on Preferences, then on the Advanced tab. Now look at the Show all file extensions item. If the check box on its left does not have a check mark, then click on it so that a check mark appears there. Finally, close the Advanced window.
Now you can check whether the extensions of the Urdu-QWERTY files are correct. The downloaded file (UrduQWERTY-v3.zip) and the files that your unzipper extracts (UrduQWERTY.keylayout and UrduQWERTY.icns) should have exactly those names. Change their extensions if necessary, ignoring the Finder's complaint that this could render your files dysfunctional.
Another problem some people have encountered is that during editing Urdu letters show up isolated rather than connected together in the normal way. This can happen when the editor being used is different from TextEdit or Bean. For example, at present Microsoft Word does not handle the Naskh and Nastaleeq scripts correctly on the Mac. Even in TextEdit, sometimes Urdu letters appear isolated rather than correctly connected. This is usually due to TextEdit being run in the plain text mode rather than the rich text mode which Urdu editing requires.
To fix this problem, start TextEdit, and on the Menu bar click on TextEdit, then on Preferences, and then on the New Document tab. If the Rich Text radio button is not active, click on it. Now close Preferences, and quit TextEdit. When you restart TextEdit, it will use Rich Text as the default for new documents.
A related problem that has troubled some people is that in their Urdu files some letters don't seem to have correct shapes. For example, the letters "Goal Hay" or "yay" don't connect to the preceding or following letters properly. The culprit in such cases is nearly always the font used. At present only the X Series 2, Scheherazade, Lateef, and Geeza Pro among Naskh fonts, and Nafees and Jameel Noori among Nastaleeq fonts are known to work correctly with the whole Urdu alphabet. Please let me know if you discover (or design) other well-behaved fonts for Urdu.
In Urdu, short vowels (e`raab) are denoted by diacritical marks that are placed above, below, or to the left of the letter involved. Although usually omitted, they are occasionally needed to remove ambiguity or to show the correct pronunciation of a word. In particular, the tashdeed and madd signs and the zer of izaafat combinations are always helpful to the reader of the text.
While composing text, you should type such a mark after typing the letter to which it belongs. The most frequently used marks are: zabar (shift->), zer (shift-<), pesh (shift-P), tashdeed (shift-_), and madd (shift-+). Alif with madd can be typed directly as shift-A. The "jazm" mark (shift-Q), which should print like a tiny "daal", doesn't have that shape in existing fonts. The alternative, also unattractive, is the "sukun" mark (/) of Arabic orthography that looks like a little circle.
A complete list of diacriticl marks is given earlier with the keyboard images.
The I and Y keys correspond, respectively, to the maaroof and majhool forms of "yay", popularly referred to as "ChoTi yay" ی and "baRi yay" ے , respectively. (See the note below about maaroof and majhool sounds.) Thus, "galee" گلی (meaning lane) is to be typed as G, L, I, and "taaray" تارے (meaning stars) is to be typed as T, A, R, Y.
The form entered by Y does not connect to the next letter. So even a majhool "yay" letter that occurs in the middle of a word should be typed as I. For example, "bayTay" بیٹے (meaning sons) has to be typed B, I, shift-T, Y. Even though both "yay" letters occuring in this word are pronounced with the majhool sound, the first one has to be entered as I.
In Arabic, the letter "yay" has two dots underneath. In Urdu, the two dots are shown only if "yay" appears at the beginning or in the middle of a word, but not when it is the final letter of a word or when it stands alone (e.g., in an alphabet table). If needed, the "yay" with two dots ي can be typed as option-i.
Noon Ghunna, which appears as the letter Noon but without a dot, is entered as shift-N. Thus "maaN" ماں (mother) is typed as M, A, shift-N. Noon Ghunna adds a nasal quality to the sound of the vowel preceding it.
In the freewheeling, inconsistent way of Urdu orthography, Noon Gunna is used only at the end of a word. In the middle of a word, even where Noon Ghunna would be appropriate, Urdu just uses the ordinary Noon. Examples: "saaNp" سانپ (snake) has to be entered as S, A, N, P; or "pataNg" پتنگ (kite) has to be entered as P, T, N, G. This inconsistency is forced by the circumstance that in the middle of a word, Noon is written as a shosha with a dot above. Without a dot, such a shosha would be visually quite confusing.
In some very old books, specially Urdu instructional primers, Noon Ghunna was indicated by a tiny inverted "v" (circumflex accent) placed above the Noon. This worked both in the middle and at the end of a word. An equivalent sign, ٘ , is still available as option-n although its use in Urdu went out of style decades ago. Note that, by contrast, Hindi takes the rational approach of signifying the nasal modification by always placing a special mark above the affected letter.
The main forms of this letter are
1) independent ء ,
entered as shift-4,
2) hamza above "alif" أ ,
entered as the hyphen key (-),
3) hamza in the middle of a word ئ ,
entered as U,
4) hamza above "vaao" ؤ ,
entered as shift-W, and
5) hamza above "Goal Hay"
ۂ , entered as the equal key (=).
The rules relevant to these forms are the following:
1) If hamza is the last letter of a word, use the independent hamza form (shift-4). Examples: "ziaa" ضیاء (meaning light) is entered by typing shift-J, I, A, shift-4; "zakaa" ذكاء (intelligence) is entered by typing shift-Z, K, A, shift-4.
NOTE: The terminal hamza is usually omitted in modern Urdu publications. For example, the above two words are frequently spelled as "ziaa" ضیا and "zakaa" ذكا .
NOTE: Only the words of Arabic origin can have a terminal hamza. It is incorrect to append a hamza to the words derived from other languages. For example, the words "Asia" ایشیا , "Australia" آسٹریلیا , "Angela" اینجلا , or "boo" بو (smell) should not be spelled with a terminal hamza. An exception is made in Urdu when a hamza is needed for the "izafat" combination; e.g., "Asia-e Kuchak" ایشیائے کوچک (Little Asia) or "boo-e gul" بوئے گل (the flower's fragrance). But the hamza used in such combinations is specific to Urdu spelling; in Persian, the same combinations contain only the yay, not the hamza. So the above Urdu phrases are spelled in Persian as "Asia-e Kuchak" ایشیای کوچک or "boo-e gul" بوی گل .
2) There is a special way to spell the word combinations in which the first word ends in an alif followed by a hamza, and the second word starts with an alif; for example, "ziaa uddin" ضیأالدّین . It is then traditional to use the "hamza above alif" form. The above combination is entered as shift-J, I, -, A, L, D, shift-_, N. (This L is written but is slient, and the "daal" is pronounced with a tashdeed.)
It is important to understand that "hamza above alif" أ means two different things in Urdu and Arabic orthographies. In Urdu, it is a compactly written combination of two letters, the vowel alif followed by the consonant hamza. In Arabic, it stands for the consonant hamza alone (operated with the short vowel zabar), and is equivalent to Urdu's alif with zabar اَ .
3) If the letter hamza occurs in the middle of a word, use the key U for it. When typed, it is displayed as a hamza over the letter "yay" ئ. But as soon as the next letter is typed, the yay disappears, and the correct combination of hamza and the next letter is displayed. Examples: "ghaael" گھائل (wounded) entered by typing G, H, A, U, L; "chaae" چائے (tea) entered by typing C, A, U, Y; "na-i" نئی (new) entered by typing N, U, I.
4) However, even in the middle of a word if a hamza precedes a "vaao", and this pair starts an isolated subword, then the two should be typed together as the single "hamza above vaao" key (shift-W). (To start an isolated subword, this pair should come after an alif, vaao, daal, ray, etc.) Example: "gaaoN" گاؤں (village) should be entered by typing G, A, shift-W, shift-N, and not G, A, U, W, shift-N which would result in the wrong shape گائوں !
The isolated subword condition is important. Otherwise just a medial hamza form (key U) is to be used. Example: "gau maataa" گئو ماتا (Mother Cow) should be entered by typing G, U, W, space, M, A, T, A; Typing G, shift-W, space, M, A, T, A would result in the wrong shape گؤ ماتا !
5) The "hamza above Goal Hay" ۂ occurs in "izaafat" combinations derived from Persian, and it is helpful to add a "zer" sign below it. Examples: "sitaara-e shaam" ستارۂِ شام (evening star) should be entered by typing S, T, A, R, =, shift-<, space, X, A, M. Or, "naala-e dil" نالۂِ دِل (heart's cry) should be entered as N, A, L, =, shift-<, space, D, (optionally, shift-<), L.
The form of the letter "Goal Hay" with a hamza above can occur only in the terminal and isolated positions of a word, while the form without a hamza can occur in all positions---initial, medial, terminal or isolated. One should be careful in choosing the correct form of "Goal Hay" in "izaafat" combinations. The form without hamza should be used when the "Goal Hay" ending a word is pronounced as H, as in "tah" تہ (layer or bottom). The form with a hamza above should be used when the Goal Hay ending a word is pronounced as A or E, as in "gila" گلہ (complaint). This point is taken up again in the next subsection.
"BaRi Hay" ح (humorously called "Halvay Vaali Hay") is entered by typing shift-H. Thus "muhabbat" محبّت (love) is entered by typing M, shift-H, B, (optionally shift-_ for tashdeed), T.
"Dochashmi Hay" ھ is entered by typing unshifted H. In modern Urdu orthography, this letter is used only in combination with some consonant (which precedes it), and its purpose is to modify that consonant's sound to make it an "aspirated letter".
"Goal Hay" ہ , entered by typing the letter O, is pronounced separately by itself rather than being just used to "aspirate" another consonant. For example, the "Hay" sound is pronounced independently in the word "kahaa" كہا (said); so this word is typed with a "Goal Hay", as K, O, A. This is in contrast to the word "khaa" كھا (Eat!) where the "Hay" is used to aspirate the "k" sound; so this word is spelled with a "Dochashmi Hay", as K, H, A.
In the word "majhool" مجہول even though "h" follows "j", no aspiration takes place since the two letters belong to different syllables ("maj-hool") and are pronounced independently. This word should therefore be typed as M, J, O, W, L, and not M, J, H, W, L which would appear incorrectly as مجھول ! In general, "Dochashmi Hay" should not be used in any Urdu word that is derived from Arabic or Persian, since these languages do not have aspirated letters. Aspirated letters can occur only in the words of Indic origin.
There is an exception to the rule that "Goal Hay" must be pronounced with an "h" sound. At the end of a word, "Goal Hay" is pronounced as an A or E, not as H; for example, the word تكیہ typed as T, K, I, O is pronounced as "takya" (pillow).
An exception to that exception occurs sometimes, and the terminal "Hay" is actually pronounced as H, not A or E. For example, the word "shah" شہ (meaning check [of chess]) is typed X, O. The word "shaah" شاہ (meaning king), typed as X, A, O, is another example where a terminal "Goal Hay" is pronounced with an "h" sound.
However, the oddities of Urdu orthography do not end here. In the words ending in a pronounced Goal Hay which is not isolated but connected to the previous letter, the Hay is often written twice! For example, the word "kah" (meaning say!) is often written as كہہ , entered by K, O, O; or "sah" (meaning bear!, from the verb "sahna") as سہہ , entered by S, O, O; or "faqeeh" (expert of fiq-h [jurisprudence] ) as فقیہہ , entered by F, Q, I, O, O.
The purpose of doubling the Goal Hay is ostensibly to avoid
its being wrongly pronounced as A or E.
For example, without the extra Goal Hay the above words
"kah" كہہ and "sah"
سہہ
could be easily confused with the words
"ke" كہ (that) and
"se" سہ (Persian three), respectively,
in which the terminal Goal Hay is indeed pronounced as E.
But such is clearly not the case with
"faqeeh" فقیہہ ,
where the extra Goal Hay actually introduces
the hazard of this word being confused with "faqeeha"
(female expert of fiq-h).
The reason for writing the Goal Hay twice in this word
seems to be just the whim of the scribe rather
than any logical need.
In general, you will find that the spelling variation
of doubling the Goal Hay is practiced unpredictably and
rather inconsistently!
NOTE: When using a Persian or Arabic font, use the Option-o key rather than the plain o key for the letter Goal Hay (ہ); otherwise the letter might not be rendered properly.
The end of an Urdu declarative sentence is marked with a small dash rather than a period. But the period key itself generates the dash in the Urdu-QWERTY keyboard. Other punctuation symbols such as question mark, exclamation, comma, semicolon, parentheses, brackets, braces, double and single quotation marks, etc., are entered with the usual keys. Punctuation symbols are appropriately reversed or inverted to match the right-to-left flow of text.
The Urdu-QWERTY keyboard provides two sets of digits 0, 1, 2, ... . The plain digit keys generate the so-called Eastern Arabic digit forms, meant to be used in Persian, Urdu, etc. These are the correct digit forms for use with Nastaleeq fonts. These are also the correct digit forms for use with Persian documents, in Naskh as well as Nastaleeq. There is another variation of digit shapes known as Traditional Arabic digits. The digit keys typed with Option pressed generate the latter shapes. An Urdu document produced in a Naskh font looks better when the Traditional Arabic form is used for digits.
Most fonts display ony the digits 4, 5, and 6 differently between Traditional and Eastern numeral forms. So, if you wish, you can use the Option key only with these digits. That is what we do in the examples below; yet the display looks as if the numbers have been typed in entirety to have the Traditional Arabic digit shapes.
The decimal point sign "٫" and the thousands separator
"٬" are, respectively, typed as option-period
and option-comma.
Examples: One million is typed as 1, option-comma, 0, 0, 0, option-comma, 0, 0, 0, and is displayed as ۱٬۰۰۰٬۰۰۰ . The number 3.1416 is typed as 3, option-period, 1, option-4, 1, option-6, and is displayed as ۳٫۱٤۱٦ .
NOTE: Separating groups of digits by thousand, million, billion. etc., is a relatively recent practice. The more traditional separation is by hazaar, laakh (lac), karoR (crore), arab, kharab, etc., for which the separating commas are placed after 3, 5, 7, 9, 11, ... digits from the right.
It is traditional in writing dates to insert a "date separator" or "small slash" symbol ؍ (shift-3) between the day number and month word, or between the numbers designating day, month, and year. The abbreviation equivalent to "A.D." is a Hamza (which looks as the stem of the letter Ain) entered by typing shift-4.
Example: August 14, 1947 is typed as 1, option-4, shift-3, A, G, S, T, space, 1, 9, option-4, 7, shift-4, and is displayed as ١٤؍اگست ۱۹٤۷ء . Alternatively, this date can be typed as 1, option-4, shift-3, 8, shift-3, 1, 9, option-4, 7, shift-4, and is displayed as ١٤؍۸؍۱۹٤۷ء .
NOTE: The recent tendency in Urdu publications is to use Western numerals. This switch is accompanied by the British-American style of formatting numbers, that is, using a period for the decimal point and a comma for the thousands separator. To use Western numerals, you just need to switch to the English keyboard when starting the number and return to the Urdu-QWERTY keyboard when finished with the number.
People accustomed to Nastaleeq publications will discover that the documents composed in Naskh have spaces and other punctuation separating each pair of adjacent words. This is the correct and rational approach to word processing, shared by every non-Nastaleeq word processor in the world. Nastaleeq word processors stand alone in suppressing inter-word spaces. The user, of course, still has to type spaces to signify ends of words, but those spaces are removed and the words follow each other in a continuous stream.
Just imagine reading this English page if it did not include any spaces between words. Deciphering such a character stream requires, in essence, that you already know what you are trying to learn! But that's exactly what is expected of you when you are reading a text composed in Nastaleeq. Because some Urdu letters (e.g., alif, daal, re, vao) do not connect to the next letter in a word, Urdu words consist of isolated parts that could themselves be thought of as words. For example, the word درخواست (meaning request or appeal) contains as potential words خواست , است , رخوا , خوا , رخو , درخوا , درخو , در , and many more. When inter-word spaces are used, there is no confusion between any unintended "words" and the intended words because the beginning and end of each intended word is clearly delimited. But in the text edited with current Nastaleeq word processors, the only reason you are able to skip over the unintended "words" is that you already know the intended words, not because the text display is of any help!
When computer typesetting of Nastaleeq was first introduced for Urdu in the 1980s, inter-word spaces were actually employed. The practice of suppressing them is more recent. This unwise retrogression, justified in the name of "tradition and esthetics", is an unnecessary obstacle to anyone trying to learn Urdu. The Nastaleeq script already suffers from too many complexities, obscurities, irregularities, and inconsistencies. It makes no sense to invent more barriers to the accessibility of Urdu. The practice simply prolongs the time it takes students to master the language. It is also hindering the development of optical character recognition and other important electronic processing technologies for Urdu.
Exercise for the reader:
Find out what ghatrabood is,
and enjoy the story.
The term Ottoman Turkish refers to both the language and the Arabic-based script in common use in Turkey during the Ottoman period. While the Modern and Ottoman Turkish languages are not very different, the script of Modern Turkish uses Latin characters. However, since there exists a huge volume of older Turkish publications and manuscripts written in the Ottoman script, this script remains of interest as an essential scholarly tool and is taught in most departments of Turkish Studies. It is suitable, for example, for preparing the contents of older texts for linguistic analyses.
There is exactly one character, "Saghir Nun" ڭ (key Option-g), that is unique to Ottoman Turkish and is not used in Urdu or Persian. This character has now been added to the Urdu-QWERTY keyboard layout. So with this keyboard layout installed, your computer will be ready for Ottoman Turkish texts.
To download and install this keyboard, see the earlier section Installing Urdu keyboard layout. To activate the Ottoman Turkish input, follow the steps for Activating Urdu Input. Also, you will need to install some suitable fonts in order to be able to read, edit, and produce documents in Ottoman Turkish. Some beautiful, freely available fonts are recommended in Installing Urdu Fonts. Finally, if you prefer to do the Ottoman Turkish work on a Windows computer, there is an Urdu-QWERTY keyboard layout for Windows also, with key settings identical to the Mac one. The fonts and general instructions given here will work on the Windows machines also. See DIGRESSION: Urdu QWERTY for Windows.
The Urdu-QWERTY keyboard provides the various diacritics employed in older Ottoman texts (as well as in Urdu and Persian). The following diacritics are used in a standard way:
The example below shows a sample text typed in Ottoman Turkish (right), together with its equivalent in Modern Turkish (left). Incidentally, this entire two-column table has been prepared by using nothing else but the Mac OS's built-in TextEdit utility. The Ottoman text part that you see on the right in the table has been typed using the exquisite Lateef font, which can be downloaded and installed as described in the section Installing Urdu Fonts. The Turkish text is supposedly the translation of a French text, Jean de La Fontaine's fable La Cigale et la Fourmi (The Cicada And The Ant). Both the typed (right) and the transcribed (left) versions shown below have been taken from the Web site of the Department of Turkish Studies at the University of Michigan. There you can also see the image of the original manuscript in the Osmani calligraphic style (referred to as Nastaleeq in Urdu and Persian calligraphy).

The Urdu alphabet contains the following additional symbols that do not exist in Persian:
"Noon Ghunna" ں , "Hamza" ء , "Dochashmi Hay" ھ , and "BaRi Yay" ے   are letters in a rather weak sense, since no Urdu word can begin with these. (Hence, Urdu dictionaries do not dedicate chapters to these as they do to regular letters.)
Urdu and Persian differ markedly in the pronunciation of vowels.
There are minor variations in the placement of "Hamza" between Urdu and Persian orthographic styles. But the needed forms in all cases are adequately provided by the keyboard and the fonts that we have recommended.
The standard ("educated person's") pronunciation of consonants is generally identical in Urdu and Persian, and often different from Arabic. Some of the similarities and differences are as follows:
Since we have called our keyboard phonetic, we wanted to relate the pronunciation of the alphabet letters with the keys being used to enter them. The tedious details given above will perhaps help you in remembering the keys. As you can see, some Persian and Urdu letters are hard to phonetically map to a Latin-based keyboard!
There is an old classification of certain vowel sounds as maaroof (literally, well-known) or majhool (literally, unknown or unfamiliar). The difference between these can be illustrated with English words as follows:
In general, note that:
Urdu-QWERTY was designed with the aid of Ukelele, a keyboard layout editor for MacOS. I thank John Brownie, the author of Ukelele, for developing this melodious software and for making it available under a freeware license.
I also wish to thank
Amal Ahmed, Aaron Jakes, Muhammad Javed,
Shebab Javed, Karan Misra, Knut S. Vikor, and Muhammad Yusaf
for reporting problems and for offering suggestions to make this
page more informative and useful.