# numpad keys as the same non numpad keys



## freethread (Oct 31, 2011)

Is there a way to use numpad keys as the related non-numpad keys? That is, the ARROWS, PGUP, PGDN, HOME, END, INS, DEL on a desktop keyboard.

My desktop env is Xfce and I prefer stick with it. I know ther's an option in Gnome keyboard that do this trik, but never tested if it really works. In Xorg configuration there is an option

```
Option "XkbOption" "numpad:microsoft"
```
I found it somewhere on the Net and inserted it in xorg.conf, it seem doesn't works.

I installed Xorg without Hal, but some port use it (gnome-mount, Thunar and few others, I'm working for remove it), anyways Xorg doesn't depend on it so the option should works, or perhaps it's wrong typed.

Anyone know if there is a solution? I run in troubles editing text, some habits are hard to die.


----------



## ikreos (Oct 31, 2011)

Is there any reason you can't turn NumLock off?


----------



## freethread (Oct 31, 2011)

ikreos said:
			
		

> Is there any reason you can't turn NumLock off?



lol, I don't know how you can see the numlock led on my keyboard, anyways it's turned off.
I will explain the problem in more detail.

For 'cut', 'copy' and 'paste' command I use respectively 'shift+del', 'ctrl+ins', 'shift+ins', I use them from about 25 years, moreover X Windows is not the graphic environment I usually use. The numeric pad always work as cursor movement and not numeric keys (so nuklock is turned off). If you try to type 'ctrl+ins' (INSERT on numpad), nothing happens in Xfce and in more general all X desktop envs. When you type 'shift+ins' (INSERT on numeric pad) a '0' (zero) will be printed. I prefer the 'ctrl-ins', 'shift-ins' and 'shift-del' on numpad behave the same as on the non-numpad 'ins' and 'del'.

The same happens with selection 'shift+(arrows|home|end|pgup|pgdn)' and 'shift+ctrl+(home|end|pgup|pgdn)' in this case I use the 4 arrow keys and it works, but for home, end, pgup, pgdn I use the numpad keys. Anyhow, if there is a solution for one of the key on numpad it works for all.

As an example, some editors like Geany, Eclipse IDE and, if I remember SciTE, that key combinations are configurable.


----------



## wblock@ (Oct 31, 2011)

This could be due to a keymap setting.  On a US keyboard, the numpad keys type cursor movements unless Numlock is on.

In xfce, the Settings/Keyboard control panel will recognize numpad shift-0 as separate from shift-0.  Offhand I can't recall how you can send a fake input character in 
X, but I'm pretty sure it's possible.  There's xkbcomp(1) and a little searching turns up x11/xdotool.  (Untested.)


----------



## ikreos (Oct 31, 2011)

wblock@ said:
			
		

> This could be due to a keymap setting.  On a US keyboard, the numpad keys type cursor movements unless Numlock is on.



Hence why I asked. Just thought it might be something you missed. If you use a different keymap, I apologize for the slightly rude(?) post.



			
				freethread said:
			
		

> lol, I don't know how you can see the numlock led on my keyboard, anyways it's turned off.



Well I am stuck between subatomic particles in quantum space.


----------



## freethread (Nov 1, 2011)

Thanks *ikreos* and *wblock* for your advices, after a deep search on the web without success and after many test and Xfce restarts, I found a solution that works for me, perhaps it's not elegant but block a lot of swearwords.

First thing, the line I had in xorg.conf was wrong, this is the right one

```
Section "InputDevice"
    Identifier     "Keyboard0"
    ...
    Option         "XkbOption[B]s[/B]" "numpad:microsoft"
EndSection
```
with this line the numpad behave as expected except fot INS and DEL, they do nothing with modifiers (alt, ctrl and shift).To correct this I remapped them to the non-numpad twins insering the following lines in .xinitrc before starting Xfce

```
xmodmap -e "keysym KP_Insert = Insert"
xmodmap -e "keysym KP_Delete = Delete"
exec startxfce4
```

Now I try to set [solved] to this thread


----------

