Is there a tool to quickly create custom keyboard layouts for international keyboard, greek and unicode math?
Solution 1:
I think this tool might work for you although I've never used it. keyboardlayouteditor
If it doesn't work then with a little patience you can create a custom keyboard layout by yourself.
I know it's not a quick way to do it but by doing it this way you will learn something.
If you decide to do it by yourself then the only thing you need to do is edit a file located in /usr/share/x11/xkb/symbols.
Inside the folder "symbols" you will find all the keyboard layout files.
Backup the file you want to use, in your case the "us" file.
To backup the file open a terminal and type:
cp /usr/share/X11/xkb/symbols/us /usr/share/X11/xkb/symbols/us_backup
Now open the "us" file:
sudo gedit /usr/share/X11/xkb/symbols/us
You will see something like this:
// Alphanumeric section
key <TLDE> { [ grave, asciitilde ] };
key <AE01> { [ 1, exclam ] };
key <AE02> { [ 2, at ] };
key <AE03> { [ 3, numbersign ] };
key <AE04> { [ 4, dollar ] };
key <AE05> { [ 5, percent ] };
key <AE06> { [ 6, asciicircum ] };
key <AE07> { [ 7, ampersand ] };
key <AE08> { [ 8, asterisk ] };
key <AE09> { [ 9, parenleft ] };
key <AE10> { [ 0, parenright ] };
key <AE11> { [ minus, underscore ] };
key <AE12> { [ equal, plus ] };
The key <xxxx>
entries are the name of the keys and the {[]};
entries are the symbols
The image below will show you the key codes:
Now to create your custom keyboard layout you need to replace the contents of {[]};
with the symbol names you want.
For example in order to replace the exclamation mark with the dollar symbol change the following line
key <AE01> { [ 1, exclam ] };
to this:
key <AE01> { [ 1, dollar ] };
After you finish editing your custom keyboard save the file and restart your computer.
In case you want to go back to your original "us" keyboard layout open a terminal and type the following:
sudo cp /usr/share/X11/xkb/symbols/us_backup /usr/share/X11/xkb/symbols/us
For further reading:
- http://www.charvolant.org/~doug/xkb/
- http://www.x.org/releases/X11R7.5/doc/input/XKB-Config.html
- https://help.ubuntu.com/community/Howto%3A%20Custom%20keyboard%20layout%20definitions
Solution 2:
Recently looking at packages I found mathwriter input
.
This, apparently in Gnome3, allows the input of mathematical characters as if it were a special language. This allows to enter symbols by typing the name of the symbol, in the screen a menu appears with options and hitting space allow to choose a match.
Relevant links:
https://launchpad.net/ubuntu/+source/ibus-table-others/1.3.5-2
https://github.com/mike-fabian/ibus-table-others
https://code.google.com/p/ibus/