3 Answers
3

Keyboard layouts in Ubuntu are stored in /usr/share/X11/xkb/symbols/. The easiest way to get your desired result is to create a new layout by copying an existing one. Choose the one you are using at moment (you can have a look inside the files to find see the user friendly name of a layout). So for English (US) type

into a terminal window. Now you have to edit the key specifications of the number keys. Open the file for editing, for example:

gksudo gedit /usr/share/X11/xkb/symbols/us_math

Search for the layout variant you are using, in the case of English (US) you will find it at the beginning of the file:

name[Group1]= "English (US)";

Change this text to:

name[Group1]= "English (math)";

Below you see the definition of the particular keys. Change (or insert, if you are using a variant that doesn't explicitly define these keys) the entires for keys AE01 to AE10. In our example we would replace

This will give you access to the special keys without using Shift and by Shift-ing you will be able to write numbers if you like to. Now edit anything else you like and save and close the file.
In the last step we will register the new keyboard layout with Gnome so you will be able to select it from the System settings.

Therefore open /usr/share/X11/xkb/rules/endev.xml in the text editor of your choice, f.e.:

gksudo gedit /usr/share/X11/xkb/rules/evdev.xml

Find the text <layoutList> and insert the following description directly after it:

After saving the file you have to restart the X server. As Ctrl+Alt+Backspace didn't work on my system I restarted the system and was now able to select the new layout in System Settings... -> Keyboard Layout.