Before I started using Linux as my default OS I used Mac OS for 5 years. In Mac OS the TAB key behaves different in Firefox than Ubuntu (my preferred distro). When using the TAB key in Mac OS it focuses on input fields only rather than every object (images, links, whatever) in a web page .

Today I finally took the time to find out what the difference between the Firefox in Mac OS and Ubuntu. I opened the about:config and searched for “tab”, and what do you know. I found an option called “accessibility.tabfocus” which was set to the value “7″.

A quick google search brought me to this site which tells you everything you want to know about accessibility.tabfocus.

If you want TAB behavior like the one in Mac OS you simply change the value of accessibility.tabfocus to “1″, et voilà, it works!

You can combine options. For example you can set the value “3″ to select any form element on a web page. Read more at http://kb.mozillazine.org/Accessibility.tabfocus.

edit:

For those who didn’t know; you can press Shift+TAB to focus the previous selected element.

For the last years I’ve been using Mac OS X, but now I’m running Ubuntu. Ubuntu has very much functionality build in, but the Norwegian mac keyboard layout isn’t that great out of the box.

There are three steps required to get the layout partially[NB!] right:

  1. Change 3rd level chooser and switch Alt / Win (cmd) key.
  2. Edit the XKB-file to get keys right.
  3. Set the keyboard in  Ubuntu to “Norway Macintosh”
Step 1:

Open the keyboard settings (System -> Preferences -> Keyboard) and click the “Layouts” tab. Then click the “Other options…” button.

1.1) Press “Alt/Win key behavior” and choose “Left Alt is swapped with left Win-key”.
1.2) Press “Third level choosers” and select “Press any of Alt keys to choose 3rd level” (or “Press left Alt keys to choose 3rd level”).

Step 2:

This part is a bit more tricky.

Open the terminal and open the folder “/usr/share/X11/xkb/symbols”

$ cd /usr/share/X11/xkb/symbols

The file we are going to edit is named “no”, but before we begin lets backup the file!
From now on every command run as root (noted by #).

# cp no no_backup

Now open the “no”-file with your favorite editor, I’m using VIM.

# vim no

Scroll down to the part which starts with:

// Copied from macintosh_vndr/no
partial alphanumeric_keys
xkb_symbols "mac" {

You now need to change the following lines:

key <TLDE>  { [      bar,    section, brokenbar, paragraph    ] };
to:
key <TLDE>  { [      apostrophe, paragraph, bar, brokenbar ] };

And:

key <AE04>    { [         4,  currency,       dollar,       dollar ]    };
to:
key <AE04>    { [         4,   dollar,       currency,       dollar ]    };

Then save.

Step 3:

The only thing remaining is to select “Norwegian Macintosh” as your default keyboard layout.
In System -> Preferences -> Keyboard, press the “Layouts”-tab and press the “+”-button.

If everything is done right you should have the basic Norwegian mac layout.

NB!

This layout is not equivalent to the real Norwegian mac layout. There is a lot of keys that needs mapping to do so. The original layout looks like this (keys are pressed from left to right).

Edit:

It seems that if you use the newer versions of Apple’s keyboard you have to change the setup for the TLDE-key and the LSGT-key. I don’t know why, but it works!