Make sure the number lock key is on. Hold down the "Alt" key and enter the number below. The foreign character should appear after you release the "Alt" key. These codes are for Microsoft Word for PCs.
Character codes for Mac OS 10.3.x are available in the Keyboard viewer which must be enabled. For acute, hold down command and type e, then the letter over which you want an acute; for circumflex, use command + i then the key; for umlaut, use command + u then the key, for grave, use command + ` then the key. To type longs and shorts on Roman characters in Mac, activate the US Extended keyboard and type option-a for macron (or option-b for breve) before you type the vowel.