# Multimedia Keyboard Problem

## Holysword

Hi there

I got a KBS-2680-RP ( a kit with a RFKBS26 keyboard and a RFSOP-80 mouse, both wireless) but I couldn't configure it propertly;

I'm trying to use it with evdev driver, the lastest (~amd64 keyword for xorg-server, xorg-x11, input-evdev, hal, etc), but I'm not sure of how to configure it :S.

 The problem is that this kit comes with only one receptor. Then at /dev/input I got:

```
localhost input # ls

by-id  by-path  event0  event1  event2  event3  mice  mouse0

localhost input # 
```

With a "evtest /dev/input/event2" I got all "common" keys from keyboard. From "evtest /dev/input/event3" I got all multimedia keys from keyboard(it comes with 33 keys) and all mouse events, including common buttons and special mouse buttons ( 8 buttons, the 3 standard and 5 extra)

I don't know how to tell to xorg.conf which device is for which input. My xorg.conf is:

```
Section "ServerLayout"

    Identifier     "X.org Configured"

    Screen      0  "Screen0" 0 0

    InputDevice    "A4Mouse" "CorePointer"

    InputDevice    "A4Mouse" "SendCoreEvents"

    InputDevice    "A4Keyboard" "CoreKeyboard"

EndSection

Section "Files"

    FontPath        "/usr/share/fonts/misc/"

    FontPath        "/usr/share/fonts/Type1/"

    FontPath        "/usr/share/fonts/100dpi/"

    FontPath        "/usr/share/fonts/75dpi/"

EndSection

Section "Module"

    Load           "glx"

    Load           "extmod"

    Load           "wfb"

    Load           "xtrap"

    Load           "record"

    Load           "dbe"

    Load           "freetype"

    Load           "type1"

EndSection

Section "ServerFlags"

    Option         "Xinerama" "0"

EndSection

Section "InputDevice"

    Identifier     "A4Keyboard"

    Driver         "evdev"

#    Option         "XkbModel" "a4_rfkb23"

    Option      "Device" "/dev/input/event2"

    Option         "XkbModel" "abnt2"

    Option         "XkbLayout" "br"

EndSection

Section "InputDevice"

    Identifier     "A4Mouse"

    Driver         "evdev"

    Option         "Protocol" "Auto"

    Option         "Device" "/dev/input/event3"

    Option         "ZAxisMapping" "4 5 6 7"

EndSection

Section "Monitor"

    Identifier     "931BW"

    VendorName     "Samsung"

    ModelName      "SyncMaster931BW"

    HorizSync       30.0 - 81.0

    VertRefresh     56.0 - 75.0

    Modeline "1440x900"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync

EndSection

Section "Device"

    Identifier     "8600GT"

    Driver         "nvidia"

    VendorName     "nVidia Corporation"

    BoardName      "GeForce 8600GT"

    Option         "UseEDID" "False"

    Option      "UseEvents"         "false"

    Option      "AddARGBGLXVisuals" "true"

    Option      "RenderAccel"       "true"

    Option      "FlatPanelProperties" "Scaling = aspect-scaled"

    Option      "backingstore" "true"

    BusID       "PCI:1:0:0"

EndSection

Section "Extensions"

        Option      "Composite"   "enable"

EndSection

Section "Screen"

    Identifier     "Screen0"

    Device         "8600GT"

    Monitor        "931BW"

    DefaultDepth    24

    Option         "TwinView" "0"

#    Option         "metamodes" "1280x1024 +0+0; 1400x1050_60 +0+0"

    SubSection     "Display"

        Depth       24

   Modes  "1440x900"

    EndSubSection

EndSection
```

With this configuration the keyboard works but with a lot of limitation ( delete and movement keys don't work, no slash, no home, no end, and etc). Mouse works fine, but I couldn't test the extra buttons. Anyway, evtest don't work neither with mouse neither keyboard with this configuration.

There's another problem... there are 3 keys that don't have keycode nor scancode. With showkey -s they display a "Sync", but no scancode...

Any clue (sry, interrogation point not working XD)

----------

## Holysword

O.o

No one, really?

Please, can someone at least give me some clue?

I keep wondering if its a evdev issue or a HID issue. Is common for keyboard and mouse events stay together at the same event handler??

----------

## LJM9000

I have a wireless keyboard and mouse as well. My multifunction buttons never worked until I switched to the newest 2.6.24-zen3 kernel (zen-sources).

Here is my xorg.conf it might help you a bit. Also from what I understand you dont want to use the evdev driver, I can't remember why and I may be wrong but I'm pretty sure I read that somewhere.

```

Section "ServerLayout"

    Identifier     "X.org Configured"

    Screen      0  "Screen0" 0 0

    InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

    FontPath        "/usr/share/fonts/misc/"

    FontPath        "/usr/share/fonts/TTF/"

    FontPath        "/usr/share/fonts/OTF"

    FontPath        "/usr/share/fonts/Type1/"

    FontPath        "/usr/share/fonts/100dpi/"

    FontPath        "/usr/share/fonts/75dpi/"

EndSection

Section "Module"

    Load           "extmod"

    Load           "record"

    Load           "dbe"

    Load           "xtrap"

    Load           "glx"

    Load           "freetype"

    Load           "type1"

EndSection

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"

    option "AutoRepeat" "250 50"

    option "CoreKeyboard"

    option "XkbRules" "xorg"

    option "XkbLayout" "en_US"

    option "XkbModel" "microsoftnek4k"

    option "XkbOptions" "caps:internal_nocancel+lv3(switch)+compose(me nu)"

EndSection

Section "InputDevice"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option      "CorePointer"

    Option      "Device" "/dev/input/mice"

    Option      "Buttons" "9"

    Option      "ZAxisMapping" "4 5"

    Option      "DialRelativeAxisButtons" "6 7"

EndSection

Section "Monitor"

    Identifier     "Monitor0"

    VendorName     "WDE"

    ModelName      "LCM-19w4"

    HorizSync       30.0 - 82.0

    VertRefresh     56.0 - 76.0

    Option         "DPMS"

EndSection

Section "Device"

   Option         "AddARGBGLXVisuals" "true"

   Option          "UseEvents"      "false"

   Option          "RenderAccel"       "true"

   Option         "NoLogo"            "true"

   Option          "NvAGP"             "true"

       Identifier     "Card0" 

   Driver         "nvidia"

   VendorName     "nVidia Corporation"

   BoardName      "GeForce4 Ti 4600"

EndSection

Section "Screen"

    Identifier     "Screen0"

    Device         "Card0"

    Monitor        "Monitor0"

    DefaultDepth    24

    Option         "TwinView" "1"

    Option         "metamodes" "CRT: 1440x900 +1440+0, DFP: nvidia-auto-select +0+0"

    SubSection     "Display"

        Viewport    0 0

        Depth       24

   Modes       "1440x900"

    EndSubSection

    SubSection "Display"

   Depth 1

   Modes "1440x900" "1280x1024" "1280x800" "1280x768" "1200x800" "1024x768" "800x600" "640x480"

   EndSubSection

   SubSection "Display"

   Depth 4

   Modes "1440x900" "1280x1024" "1280x800" "1280x768" "1200x800" "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection "Display"

   Depth 8

   Modes "1440x900" "1280x1024" "1280x800" "1280x768" "1200x800" "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection "Display"

   Depth 15

   Modes "1440x900" "1280x1024" "1280x800" "1280x768" "1200x800" "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection "Display"

   Depth 16

   Modes "1440x900" "1280x1024" "1280x800" "1280x768" "1200x800" "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection "Display"

   Depth 24

   Modes "1440x900" "1280x1024" "1280x800" "1280x768" "1200x800" "1024x768" "800x600" "640x480"

    EndSubSection

EndSection

Section "ServerFlags"

    Option         "Xinerama" "0"

EndSection

Section "Extensions"

   Option      "Composite"   "enable"

EndSection

```

----------

## Holysword

LJM9000, very thank you for the clue!

zen-sources seems great, and I don't know if its my imagination, but I can see a performance increase  :Razz: 

Well, seems that nothing changed. I tried a evtest and now it just don't recognizes 4 instead of 6 keys. But seems that X don't see those keys at all, exaclty as it was before ><

About the evdev driver thing, I'm using it 'cause its the only driver that can give me all my 8 mouse buttons.

----------

## chaonis

Put the Option         "SendCoreEvents" in your mouse section and give it a try. Also, try using input-events instead of evtest (emerge -av input-utils). Use it **NOT** in X environment but in the terminal mode (Ctrl-Alt-F1)

```
Section "InputDevice"

    Identifier     "A4Mouse"

    Driver         "evdev"

    Option         "Protocol" "Auto"

    Option         "Device" "/dev/input/event3"

    Option         "ZAxisMapping" "4 5 6 7"

    [b]Option         "SendCoreEvents"[/b]

EndSection 
```

----------

## Holysword

input-events don't work here.

I have 4 input event. If I try "input-events /dev/input/event3" it recognizes as the event0. Actually, if I try any of the 4 input devices it acts as I selected event0. Probably because all 4 input events come from the same physical port. Remember, its one unique RF receptor for mouse and keyboard.

To put SendCoreEvents in xorg.conf don't solve the problem too.

Any other idea?

----------

## VoidMage

Try:

adding `Option "AllowEmptyInput"` to `Section "ServerLayout"`,

removing all `Section "InputDevice"` and

configuring your keyboard properly with hal (setting layout to br only, changing model should not be needed.

You'll see if it's configured correctly by doing `hal-find-by-capability --capability input.keys` and reading

`hal-device <device name>` on listed device(s).

One warning: desktop environment may override those settings with invalid values, make sure it's set to something

like `Evdev managed`

----------

## Holysword

VoidMage, thanks for your reply, bu I must confess that I'm confused about what you just told. If I took off the InputSection, where should I put the "Option XkbLayout "br" "??

Anyway, I tried what you told, without the layout thing. The hal-device output was:

```
udi = '/org/freedesktop/Hal/devices/usb_device_9da_119_noserial_if1_logicaldev_input'

  input.xkb.layout = 'us'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.1/input/input3/event3'  (string)

  info.category = 'input'  (string)

  info.subsystem = 'input'  (string)

  input.xkb.variant = ''  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_9da_119_noserial_if1'  (string)

  info.capabilities = { 'input', 'input.keys', 'input.mouse', 'button' } (string list)

  info.product = 'A4Tech RF USB Receiver'  (string)

  input.x11_driver = 'evdev'  (string)

  info.udi = '/org/freedesktop/Hal/devices/usb_device_9da_119_noserial_if1_logicaldev_input'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_9da_119_noserial_if1'  (string)

  linux.subsystem = 'input'  (string)

  input.device = '/dev/input/event3'  (string)

  linux.device_file = '/dev/input/event3'  (string)

  input.product = 'A4Tech RF USB Receiver'  (string)

  info.addons.singleton = { 'hald-addon-input' } (string list)

  input.xkb.rules = 'base'  (string)

  input.xkb.model = 'evdev'  (string)
```

```
udi = '/org/freedesktop/Hal/devices/usb_device_9da_119_noserial_if0_logicaldev_input'

  input.xkb.layout = 'us'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.0/input/input2/event2'  (string)

  info.category = 'input'  (string)

  info.subsystem = 'input'  (string)

  input.xkb.variant = ''  (string)

  info.parent = '/org/freedesktop/Hal/devices/usb_device_9da_119_noserial_if0'  (string)

  info.capabilities = { 'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button' } (string list)

  info.product = 'A4Tech RF USB Receiver'  (string)

  input.x11_driver = 'evdev'  (string)

  info.udi = '/org/freedesktop/Hal/devices/usb_device_9da_119_noserial_if0_logicaldev_input'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_9da_119_noserial_if0'  (string)

  linux.subsystem = 'input'  (string)

  input.device = '/dev/input/event2'  (string)

  linux.device_file = '/dev/input/event2'  (string)

  input.product = 'A4Tech RF USB Receiver'  (string)

  info.addons.singleton = { 'hald-addon-input' } (string list)

  input.xkb.rules = 'base'  (string)

  input.xkb.model = 'evdev'  (string)
```

I don't think the problem is in the way I configure it in xorg.conf, since evtest is completly independent of X, and still don't get some scancodes. Anyway, what informations this hal-device give to us?

----------

## VoidMage

Why, in the fdi file, of course.

Search the forum for hal/evdev topics.

A lot of my posts are there.

BTW, I hope you ARE using xorg-server 1.4.2.

----------

## Holysword

It is "of course" only if you know the existance of a fdi file, and its not an obvious things. I used gentoo tutorials up to here, and barely heard about hal. You can me more clear in your explanations.

Your suggestion didn't fixed the problem. Actually, some aditional keys are missing, like the slash key.

The problem isn't in the way that X uses the device, since the problem exist even without X. evtest is used in console, BEFORE X loading, so, how could any xorg.conf configuration affect it ?? Do hal affect the initial loading??

----------

