Doing math homework on a full keyboard. Would like the top row to be the special characters without holding shift.
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:
Search for the layout variant you are using, in the case of English (US) you will find it at the beginning of the file:
Change this text to:
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.:
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.
Or, under "Miscellaneous compatibility options" you can check "Both Shift-Keys together toggle ShiftLock" if you want to keep the Caps Lock functioning the same, then you can press both Shift keys.
in How do I remap certain keys? , there is a general method to do what you're trying to do.
It'll be a bit of work, though.
In the end, the guy teaches you how to keep your changes after a reboot. You might want to skip the
and just run