tags:

views:

39

answers:

1

How can I make emacs accept the period/dot from the keypad and insert a "." into the current buffer? I've managed to set-up all the numbers on the keypad using the following:

(global-set-key (kbd "<kp-0>") "0")
(global-set-key (kbd "<kp-1>") "1")
...

But the code that emacs tells me is registered when pressing the dot key is M-O n rather than a <kp-?> key.

Any ideas?

+1  A: 

The . character on the keypad is normally associated to <kp-decimal> when NumLock is on. If NumLock is off, it corresponds to the Del key associated to <kp-delete>. In this mode, the . corresponds to <S-kp-delete>.

But, normally <kp-0>, <kp-1>, ... are already translated by default to 0, 1...

Check C-h i m Emacs i keypad RET

Jérôme Radix