Xinput map device as both keyboard and mouse?

Perhaps an odd question… but I have a tablet which has macro keys along one side (F1->F12). It’s an APT6000U.

evtest shows the key events being reported properly:

vent: time 1402497839.730123, -------------- SYN_REPORT ------------
Event: time 1402497839.776152, type 1 (EV_KEY), code 62 (KEY_F4), value 0
Event: time 1402497839.776152, -------------- SYN_REPORT ------------
etc...

however, it does not generate the F-key events within X11.

I suspect it’s because the device is listed as a pointer and the key events are getting ignored? here’s the output of Xinput list:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Aiptek                                    id=10   [slave  pointer  (2)]
⎜   ↳ Logitech Trackball                        id=11   [slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ MSI WMI hotkeys                           id=14   [slave  keyboard (3)]


So… is there a way to “add” the Aiptek device as a child of the core keyboard as well?

here’s my current xorg.conf.d file:

 cat /etc/X11/xorg.conf.d/50-aiptek.conf
Section "InputClass"
        Identifier "Aiptek class"
        MatchProduct "Aiptek|AIPTEK|aiptek"
        MatchDevicePath "/dev/input/event*"
        Driver "aiptek"
        Option "SendCoreEvents" "true"
        Option "USB" "on"
        Option "Type" "stylus"
        Option "Mode" "absolute"
        Option "zMin" "0"
        Option "zMax" "511"
EndSection


there must be a way to do so… I’m just not seeing it.

Update: seems related to “official” driver. evdev handles the KB mappings correctly, but no pointer movement when it is used as the driver.

  4081.693] (II) Using input driver 'evdev' for 'Aiptek'
  4081.693] (**) Aiptek: always reports core events
  4081.693] (**) evdev: Aiptek: Device: "/dev/input/event14"
  4081.693] (--) evdev: Aiptek: Vendor 0x8ca Product 0x20
  4081.693] (--) evdev: Aiptek: Found 3 mouse buttons
  4081.693] (--) evdev: Aiptek: Found scroll wheel(s)
  4081.693] (--) evdev: Aiptek: Found relative axes
  4081.693] (--) evdev: Aiptek: Found x and y relative axes
  4081.693] (--) evdev: Aiptek: Found absolute axes
  4081.693] (--) evdev: Aiptek: Found x and y absolute axes
  4081.693] (--) evdev: Aiptek: Found absolute tablet.
  4081.693] (--) evdev: Aiptek: Found keys
  4081.693] (II) evdev: Aiptek: Configuring as tablet
  4081.693] (II) evdev: Aiptek: Configuring as keyboard
  4081.693] (II) evdev: Aiptek: Adding scrollwheel support
  4081.693] (**) evdev: Aiptek: YAxisMapping: buttons 4 and 5
  4081.693] (**) evdev: Aiptek: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
  4081.693] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input15/event14"
  4081.693] (II) XINPUT: Adding extended input device "Aiptek" (type: KEYBOARD, id 10)
  4081.693] (**) Option "xkb_rules" "evdev"
  4081.693] (**) Option "xkb_model" "pc104"
  4081.693] (**) Option "xkb_layout" "us"
  4081.693] (WW) evdev: Aiptek: touchpads, tablets and touchscreens ignore relative axes.
  4081.693] (II) evdev: Aiptek: initialized for absolute axes.
  4081.693] (**) Aiptek: (accel) keeping acceleration scheme 1
  4081.693] (**) Aiptek: (accel) acceleration profile 0
  4081.693] (**) Aiptek: (accel) acceleration factor: 2.000
  4081.693] (**) Aiptek: (accel) acceleration threshold: 4
  4081.694] (II) config/udev: Adding input device Aiptek (/dev/input/mouse2)
  4081.694] (**) Aiptek: Applying InputClass "LocalKeyboard"


vs


 86017.912] (II) config/udev: Adding input device Aiptek (/dev/input/event13)
 86017.912] (**) Aiptek: Applying InputClass "evdev pointer catchall"
 86017.912] (**) Aiptek: Applying InputClass "evdev keyboard catchall"
 86017.912] (**) Aiptek: Applying InputClass "evdev tablet catchall"
 86017.912] (**) Aiptek: Applying InputClass "evdev pointer catchall"
 86017.912] (**) Aiptek: Applying InputClass "evdev keyboard catchall"
 86017.912] (**) Aiptek: Applying InputClass "evdev tablet catchall"
 86017.912] (**) Aiptek: Applying InputClass "Aiptek class"
 86017.912] (**) Aiptek: Applying InputClass "LocalKeyboard"
 86017.912] (II) LoadModule: "aiptek"
 86017.912] (II) Loading /usr/lib64/xorg/modules/input/aiptek_drv.so
 86017.912] (II) Module aiptek: vendor="X.Org Foundation"
 86017.912]    compiled for 1.14.3.901, module version = 1.4.1
 86017.912]    Module class: X.Org XInput Driver
 86017.912]    ABI class: X.Org XInput driver, version 19.1
 86017.912] (II) Using input driver 'aiptek' for 'Aiptek'
 86017.912] (**) Option "SendCoreEvents" "true"
 86017.912] (**) Aiptek: always reports core events
 86017.912] (II) xf86AiptekInit(): begins
 86017.912] (**) xf86AiptekConfig: device not shared btw Aiptek and Power Button
 86017.912] (**) xf86AiptekConfig: device not shared btw Aiptek and Video Bus
 86017.912] (**) xf86AiptekConfig: device not shared btw Aiptek and Video Bus
 86017.912] (**) xf86AiptekConfig: device not shared btw Aiptek and Power Button
 86017.912] (**) xf86AiptekConfig: device not shared btw Aiptek and Aiptek
 86017.912] (**) Aiptek: always reports core events
 86017.912] (**) Option "Device" "/dev/input/event13"
 86017.912] (--) HID Device name: "Aiptek"
 86017.912] (--) HID Driver Version: 1.0.1
 86017.912] (--) HID Driver knows it has 1 devices configured
 86017.912] (--) HID Driver is using 20 as the fd
 86017.912] (EE) From ioctl() xCapacity=2999
 86017.912] (EE) From ioctl() yCapacity=2249
 86017.927] (**) Aiptek device is /dev/input/event13
 86017.927] (**) Aiptek is in absolute mode 
 86017.927] (**) Option "USB" "on"
 86017.927] (**) Aiptek: reading USB link
 86017.927] (**) Option "ZMax" "511"  
 86017.927] (**) Aiptek: ZMax/MaxZ = 511
 86017.927] (**) Option "ZMin" "0"
 86017.927] (**) Aiptek: ZMin/MinZ = 0
 86017.927] (**) Option "BaudRate" "9600"
 86017.927] (**) Aiptek: BaudRate 9600
 86017.927] (**) Aiptek: xf86AiptekInit() finished
 86017.927] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input45/event13"
 86017.927] (II) XINPUT: Adding extended input device "Aiptek" (type: Stylus, id 10)
 86017.927] (**) xTop invalid; adjusted to 0
 86017.927] (**) yTop invalid; adjusted to 0
 86017.927] (**) xBottom invalid; adjusted to 2999
 86017.927] (**) yBottom invalid; adjusted to 2249
 86017.927] (**) ScreenNo invalid; adjusted to 0
 86017.927] (**) Aiptek: (accel) keeping acceleration scheme 1
 86017.927] (**) Aiptek: (accel) acceleration profile 0
 86017.927] (**) Aiptek: (accel) acceleration factor: 2.000
 86017.927] (**) Aiptek: (accel) acceleration threshold: 4
 86017.927] (--) HID Device name: "Aiptek"
 86017.927] (--) HID Driver Version: 1.0.1
 86017.927] (--) HID Driver knows it has 1 devices configured
 86017.927] (--) HID Driver is using 20 as the fd
 86017.927] (EE) From ioctl() xCapacity=2999
 86017.927] (EE) From ioctl() yCapacity=2249
 86017.927] (II) Able to open aiptek device
 86017.927] (II) config/udev: Adding input device Aiptek (/dev/input/mouse1)
 86017.927] (**) Aiptek: Applying InputClass "LocalKeyboard"
 86017.927] (II) No input driver specified, ignoring this device.
 86017.927] (II) This device may have been added with another device file.




aaand another update: evdev working properly except it maps pressure to axis 4. Is there a way to swap axes 3 and 4?

That sort of remapping is normally done in the /etc/X11/xorg.conf file at lest for normal mice