Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I just bought a Keyboard with a builtin embedded trackball together with two buttons which act as the left and right mouse button. The keyboard connects to a USB ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    2

    Builtin Keyboard Trackball button not recognized


    Hi, I just bought a Keyboard with a builtin embedded trackball together with two buttons which act as the left and right mouse button. The keyboard connects to a USB infrared receiver. The manufacturer is a Chinese company Jing Mold.

    The contraption works when I plug it into Windows XP.

    In Linux, however, I can only get the pointer portion of the trackball to work but not the buttons. The keyboard also works perfectly.

    I am a newbie when it comes to understanding how the kernel drivers and devices work over the various layers. I just do not know if I am looking at all the wrong places and some directions will help. I tried reading whatever I could get my hands on but got more lost.

    From this point, I will just focus on the trackball portion.
    What I've managed to do are :
    - to have the devices recognized by the kernel : when connected, it shows up in dmesg and also in /proc/bus/input/devices
    - to use it in X by using the evdev driver pointing to the event input device.

    The pointer works but not the buttons.

    /proc/bus/input/devices shows it as having the event handler but something I noticed is that there are no KEYBITs. That is probably why the buttons did not come through. Are these capabilities reported by the USB device on hotplug or are they set by the kernel driver? (and if so, which one, usb, usb-hid, event, input, ...)? I have also tried looking at hal and udev but was not able to navigate through it.

    PS I've also tried evtest on the device and the pointer events came through but not the button clicks.

    I have attached outputs from the various procfs and sysfs records and outputs from lsusb and lshal.

    Thanks in advance.

    Cheech.
    Attached Files Attached Files

  2. #2
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,049
    Welcome to the forums!

    Can you open up a terminal and type
    Code:
    xev
    There will appear a little window in your screen, and your terminal will fill with output every movement you make with the mouse or key you press.

    Move your mouse pointer to hoover over the little window that just appeared. Now click one of your mouse buttons. Does it give a code in your terminal? Look for keycode, similar like this:

    KeyRelease event, serial 32, synthetic NO, window 0x1600001,
    root 0x66, subw 0x0, time 769741, (88,80), root448,133),
    state 0x0, keycode 178 (keysym 0x1008ff18, XF86HomePage), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    Do this for both buttons, and post the keycodes here. If this doesn't work there is another approach, but it's a bit more complicated.
    Can't tell an OS by it's GUI

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    2
    I tried running xev and there are no events reported when either of the two buttons were pressed and released. I get neither the ButtonPressed nor ButtonReleased events.

    This because no events were sent by the kernel drivers.

    When I ran
    Code:
    evtest /dev/input/event2
    , and I clicked on either button all I get are Sync messages without the button code.

    Code:
    Input driver version is 1.0.0
    Input device ID: bus 0x3 vendor 0x5af product 0x8005 version 0x100
    Input device name: "JME Co., Ltd. USB Wireless Controller"
    Supported events:
      Event type 0 (Sync)
      Event type 2 (Relative)
        Event code 0 (X)
        Event code 1 (Y)
    Testing ... (interrupt to exit)
    Event: time 1208184853.712117, ------------- Report Sync -------------
    Event: time 1208184853.888112, ------------- Report Sync -------------
    The /proc/bus/input/devices entry for the device is missing something like the B:KEY=30000 0 0 0 0 for bit positions
    272 - 0x110 - left button
    273 - 0x111 - right button

    See below.
    Code:
    I: Bus=0003 Vendor=05af Product=8005 Version=0100
    N: Name="JME Co., Ltd. USB Wireless Controller"
    P: Phys=usb-0000:00:03.0-1/input1
    S: Sysfs=/class/input/input2
    U: Uniq=001
    H: Handlers=event2
    B: EV=5
    B: REL=3
    Cheech.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •