How to change the decimal comma ',' to decimal period '.' in the numeric pad of the keyboard?
I have used xmodmap
but every time that I change my keyboard layout the changes (by xmodmap) are being reset.
How to change the decimal comma ',' to decimal period '.' in the numeric pad of the keyboard?
I have used xmodmap
but every time that I change my keyboard layout the changes (by xmodmap) are being reset.
In Ubuntu 14.04 LTS, there are at least two ways to do this. Assumptions:
Option 1: GUI (dconf-editor)
Run (Alt+F2) "dconf-editor", navigate in the tree to schema "org.gnome.desktop.input-sources" and set the key "xkb-options" to value that you want, e.g. "['kpdl:comma']" or "['kpdl:dot']".
Values are defined in xkeyboard-config help:
This is what I found there:
Option 2: Command line (gsettings)
You can also use command line instead of dconf-editor GUI to accomplish the same. Like this:
I think the problem is that you are mixing
xmodmap
commands withsetxkbmap
commands (whether on the command-line or by using the graphical settings menus). As you have observed, thesetxkbmap
commands will override thexmodmap
commands when you change your keyboard layout. The logical solution would therefore be to usesetxkbmap
to change both your layout and the keypad comma to a decimal period.When you use
setxkbmap
to change your layout any specified customisations will also be applied: the full list of options is available at/usr/share/X11/xkb/rules/evdev.lst
. I don't know which language layouts you use, so I have placed just two examples at the end of the following command, which you can use to switch layouts with ALt+Shift. If you have any more key mappings or bindings you want to activate, simply add them to the command:The first command switch (
-option ''
) clears any current settings, as when new settings are given they are added to and do not replace any existing ones unless this option is used. The second (-option kpdl:dot
) makes sure that the appropriate keypad key is a dot or period; the third command switch (-option grp:switch,grp:alt_shift_toggle
) sets up your ability to switch the layouts with ALt+Shift, and the last (gb,nl
) specifies the layouts to switch to.To check your settings, you can enter
which results in:
Add the full
setxkbmap
line further above as a startup item to make sure it is activated and available for you to use.More information on
setxkbmap
is available by enteringman setxkbmap
or by viewing the Ubuntu manpages online.