Apple keyboard remap keypad comma to dot?

Is there any way to change the key mapping of the apple keyboard?

As programmer I find annoying there's a comma instead a dot in numeric keypad. I would remap this key to have dot ...


Solution 1:

The simplest solution is to create the file DefaultKeyBinding.dict in /Users/[user]/Library/KeyBindings if it does not already exist, and add the remapping:

{
   "#," = ("insertText:", ".");
}

Then logout or restart the mac.

The # indicates the remapping is for the keypad only. More reference for that file: https://gist.github.com/trusktr/1e5e516df4e8032cbc3d

Solution 2:

based on Matías González answer:

Step 1, Add the remapping (paste this command on your console):

mkdir ~/Library/KeyBindings && cd ~/Library/KeyBindings && touch DefaultKeyBinding.dict && echo '{"#," = ("insertText:", ".");}' > DefaultKeyBinding.dict

Step 2, Restart the mac

The # indicates the remapping is for the keypad only. More reference for that file: https://gist.github.com/trusktr/1e5e516df4e8032cbc3d