# External num pad (laptop) working in addition?

## nabla²

Hi,

I would like to use an external num pad with my laptop (something like this). Do they work without problems?

I found here that it is likely that activating the actual num pad (no arrows but numbers) activates the num pad on the laptop as well. This is definitly not what I need because letters like j k l are not available then. Do you agree with that webpage?

Thx

----------

## nabla²

Noone using an external Num pad? Any idea where else to ask?

----------

## desultory

Have you tried connecting an ordinary keyboard to determine whether or not the unwanted behaviour is evident? If the unwanted behaviour is not evident with a full keyboard it should not appear with a keyboard which presents a subset of the standard set. Also, you do realize that the mailing list archive you linked to was discussing FreeBSD, not Linux, right?

----------

## nabla²

 *desultory wrote:*   

> Have you tried connecting an ordinary keyboard to determine whether or not the unwanted behaviour is evident? If the unwanted behaviour is not evident with a full keyboard it should not appear with a keyboard which presents a subset of the standard set. Also, you do realize that the mailing list archive you linked to was discussing FreeBSD, not Linux, right?

 The problem is that my laptop only has usb ports while my keyboard is PS2, but maybe some of my friends can help... I posted this link to the FreeBSD list because of second reply after my link:

 *Quote:*   

> > Thanks much for clarifying that and what PITA.  Anybody know if this is
> 
> > standard OS behavior (lets say on Linux, Solaris, or windows) or just a
> 
> > FBSD annoyance.
> ...

  Ohhh   :Embarassed:   :Embarassed:   there is a not in the reply. I somehow missed it when I read it.   :Embarassed:   :Embarassed: 

So I give it a try.

----------

## nabla²

I tried it and, unfortunately, it is as suspected: activating num lock on the external keyboard activates it on the laptop too.   :Crying or Very sad: 

Any idea how to hack something to prevent it?

----------

## desultory

Are you concerned with how Num Lock operates on a tty? If not it might work to do something like:

```
Section "ServerLayout"

   ...

   InputDevice "keyboard0" "CoreKeyboard"

   InputDevice "keyboard1" "SendCoreEvents" "1"

   ...

EndSection

Section "InputDevice"

   Identifier "keyboard0"

   Driver "kbd"

EndSection

Section "InputDevice"

   Identifier "keyboard1"

   Driver "kbd"

EndSection
```

Perhaps changing 'InputDevice "keyboard1" "SendCoreEvents" "1"' to 'InputDevice "keyboard1" "SendCoreEvents" "0"' if this does not work as you want it to. I suspect that "0" would be more likely to behave as you want.

This obviously will not induce the behavior you want outside of X, even if it works inside of X.

----------

## nabla²

It does not work.   :Crying or Very sad:  AFAICS activating the num lock does something on the computer and not on the keyboard. There is probably only one place where the num lock can be set.

----------

## desultory

 *nabla² wrote:*   

> AFAICS activating the num lock does something on the computer and not on the keyboard. 

 

Quite so. There is nothing intrinsically special about the Num Lock key, it is processed as any other key is, the indicator lights (if present) are activated and deactivated by the computer, they are not actually directly bound to the keys to which they are nomenclaturally bound.

 *nabla² wrote:*   

> There is probably only one place where the num lock can be set.

 

So it would, from this attempt, seem. The expectation which I had was that if the keyboards were listed separately they would have independant Num Lock, Caps Lock and Scroll Lock flags.

One more thing to try before I run out of ideas which do not require modifying something a little more compiled than xorg.conf. In the InputDevice sections specify the /dev/input entry for each of the keyboards. If that works you might want to put a udev rule in place to maintain a specific name for the keypad.

----------

## nabla²

 *desultory wrote:*   

> One more thing to try before I run out of ideas which do not require modifying something a little more compiled than xorg.conf. In the InputDevice sections specify the /dev/input entry for each of the keyboards. If that works you might want to put a udev rule in place to maintain a specific name for the keypad.

 It works, in a bit strange way.  :Smile: 

My settings:

```
Section "InputDevice"

    Identifier  "Keyboard1"

    Driver      "kbd"

    Option "XkbModel"   "pc105"

    Option "XkbLayout"  "de"

    Option "device" "/dev/input/event1"

EndSection

Section "InputDevice"

    Identifier "OtherKeyboards"

    Driver "kbd"

#    Option "device" "/dev/input/event3"

EndSection

Section "ServerLayout"

    Identifier  "Simple Layout"

    Screen "Screen 1"

    InputDevice "OtherMice" "SendCoreEvents" "1"

    InputDevice "Synaptics Touchpad"  "CorePointer"

    InputDevice "Keyboard1" "CoreKeyboard"

    InputDevice "OtherKeyboards" "SendCoreEvents" "0"

EndSection
```

I suppose the device entry which shows the right characters with cat is the correct one. It only works, if the device is set with the keyboard on the laptop. If only the device for the external keyboard is set then there is no difference to not setting them at all, and if I set both devices both keyboards do not work at all.   :Shocked:  AFAICS SendCoreEvents do not change anything.

One drawback: the caps lock and num lock lights in my laptop do not work now. I suppose one cannot have everything. :Wink: 

Thx for your help!

----------

## nabla²

Just a remark: the number pad I posted in the top post needs extra driver which are not, AFAIK, available for linux. I found another one which works. A good sign is probably when the number pad can be used on a usb and a PS2 port (just "normal" keyboard) (or, of course, when there are linux driver  :Cool: ).

----------

## nabla²

Strange: When changing from X to console and back again, the system gets characters and mouse movement which I do not do. I have to press some buttons and then it is normal again. This does not happen when I remove the device part in xorg.conf. In addition, I cannot set the XkbVariant option. If I did, the keyboard does not work. Somehow I get the feeling that the way I found to use the num pad is rather a strange bug then a feature.

EDIT: Spelling and grammar.

----------

## desultory

One might consider it a bug which needs to be made into a feature.

----------

