Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've recently migrated from Ubuntu to Mac, but one of the features that I'm lacking most is the keyboard layout for alternative languages. I don't like to switch keyboard layouts all the time, yet at the same time I like to write using accents and diacritics, as needed in each language (Romanian, French, German, etc.).

The Romanian keyboard layout provided on Linux offers a very nice "compatibility variant", specially for programmers. Basically it's identical to the English one, but holding down the right Alt (level 3) key gives you the Romanian special characters:

Romanian keyboard layout provided on Linux

How can I have a similar functionality?

Can I at least customize it along these lines:

  • + a » ă
  • + s » ș
  • + t » ț

PS: I am aware of the Accent Menu and it's limitations.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

Although it isn't exactly what you asked for, one possible solution is to use the built-in ability to rapidly switch Input Sources (aka keyboard layouts). To make this function useable, you'll need to do a little setup.

Open System Preferences: Keyboard and select the Keyboard Pane. Check the option to Show Keyboard & Character Viewers in menu bar (1), then click on the Input Sources… button (2).

image of Keyboard preferences pane

The Language and Text preference pane will open to the Input Sources tab. Select the input sources (3) you want to access on a regular basis. Fewer is better, remember you can always return to this tab and change your selections. When you've made your choices click on the Keyboard Shortcuts… button (4).

image of Language & Text pane Input Sources tab

The Keyboard preferences pane will open to the Keyboard Shortcuts tab. Select Keyboard and Text Input from the column on the left (5). Then check the options to enable the keyboard shortcuts to navigate between input sources. (6).

image of Keyboard preferences pane Keyboard Shortcuts tab

If you stay with the default shortcuts, they will conflict with the default Spotlight shortcuts. Select Spotlight from the column on the left, and either deactivate or change the keyboard shortcut assigned to the Spotlight functions.

image of Keyboard preferences pane Keyboard Shortcuts tab

Now when you need to type a special character, use the hotkey to select the appropriate Input Source and use Lion's long hold function to bring up the choices for each character.

I am currently using Romanian as my Input Source . I know this because it's displayed in the Keyboard and Character Viewers menu item. A long press on a provides:

image of Special Key selection and Keyboard & Character menubar item and special character choices

Once I've typed the Romanian character, I can use the keyboard shortcut to return to the U.S. input source.

share|improve this answer

Since you're coming from a Linux background, I think you'd feel right at home with my suggestion of reading about DefaultKeyBinding.dict file.

You use Ukelele as suggested above for the layouts of accented letters and such. But the keyboard bindings comes handy for programmers shortcuts and special keys.

Google up the file name and you'll have many links and tutorials on the subject. One reference link would be Apple's NSResponder Class Reference which lists all possible actions you can perform in any Cocoa applications using custom keybindings.

share|improve this answer
1  
The main problem with DefaultKeyBinding.dict is that it doesn't work in many cross platform applications or in shell environments. So as you mentioned, basic remapping should probably be done with Ukelele, even though DKB is indispensable for things like defining text editing macros. –  ؘؘؘؘ Feb 15 '12 at 8:39

The US Extended layout may suit your needs. A chart is at

http://homepage.mac.com/thgewecke/diacritics.html

It's very easy to make your own with

http://scripts.sil.org/ukelele

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.