0

I have a noname tablet with 12 buttons. I made it work by digimend driver. Pointer works good, but tablet buttons generate mouse_btn events. I'd like these buttons generate custom keyboard events. How can I remap buttons or input events? Tried xbindkeys + xte, but it remaps mouse buttons too and this is unacceptable.

Device in xinput list

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ KYE 4D device Ergomedia                   id=11   [slave  pointer  (2)]
⎜   ↳ HID 256c:006e Pad                         id=17   [slave  pointer  (2)]
⎜   ↳ HID 256c:006e Pen                         id=18   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=15   [slave  pointer  (2)]
⎜   ↳ BM30X mouse                               id=16   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]

... Pad and ... Pen

evtest Pad with all buttons pressed.

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x256c product 0x6e version 0x111
Input device name: "HID 256c:006e Pad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 256 (BTN_0)
    Event code 257 (BTN_1)
    Event code 258 (BTN_2)
    Event code 259 (BTN_3)
    Event code 260 (BTN_4)
    Event code 261 (BTN_5)
    Event code 262 (BTN_6)
    Event code 263 (BTN_7)
    Event code 264 (BTN_8)
    Event code 265 (BTN_9)
    Event code 304 (BTN_SOUTH)
    Event code 305 (BTN_EAST)
    Event code 331 (BTN_STYLUS)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max        1
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max        1
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1546525069.255304, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1546525069.255304, type 1 (EV_KEY), code 256 (BTN_0), value 1
Event: time 1546525069.255304, -------------- SYN_REPORT ------------
Event: time 1546525069.471264, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1546525069.471264, type 1 (EV_KEY), code 256 (BTN_0), value 0
Event: time 1546525069.471264, -------------- SYN_REPORT ------------
Event: time 1546525074.817368, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time 1546525074.817368, type 1 (EV_KEY), code 257 (BTN_1), value 1
Event: time 1546525074.817368, -------------- SYN_REPORT ------------
Event: time 1546525074.971312, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time 1546525074.971312, type 1 (EV_KEY), code 257 (BTN_1), value 0
Event: time 1546525074.971312, -------------- SYN_REPORT ------------
Event: time 1546525082.853419, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
Event: time 1546525082.853419, type 1 (EV_KEY), code 258 (BTN_2), value 1
Event: time 1546525082.853419, -------------- SYN_REPORT ------------
Event: time 1546525083.041430, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90003
Event: time 1546525083.041430, type 1 (EV_KEY), code 258 (BTN_2), value 0
Event: time 1546525083.041430, -------------- SYN_REPORT ------------
Event: time 1546525087.097476, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1546525087.097476, type 1 (EV_KEY), code 259 (BTN_3), value 1
Event: time 1546525087.097476, -------------- SYN_REPORT ------------
Event: time 1546525087.273466, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1546525087.273466, type 1 (EV_KEY), code 259 (BTN_3), value 0
Event: time 1546525087.273466, -------------- SYN_REPORT ------------
Event: time 1546525087.821480, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90005
Event: time 1546525087.821480, type 1 (EV_KEY), code 260 (BTN_4), value 1
Event: time 1546525087.821480, -------------- SYN_REPORT ------------
Event: time 1546525087.979435, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90005
Event: time 1546525087.979435, type 1 (EV_KEY), code 260 (BTN_4), value 0
Event: time 1546525087.979435, -------------- SYN_REPORT ------------
Event: time 1546525088.407438, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
Event: time 1546525088.407438, type 1 (EV_KEY), code 261 (BTN_5), value 1
Event: time 1546525088.407438, -------------- SYN_REPORT ------------
Event: time 1546525088.585433, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90006
Event: time 1546525088.585433, type 1 (EV_KEY), code 261 (BTN_5), value 0
Event: time 1546525088.585433, -------------- SYN_REPORT ------------
Event: time 1546525089.275435, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90007
Event: time 1546525089.275435, type 1 (EV_KEY), code 262 (BTN_6), value 1
Event: time 1546525089.275435, -------------- SYN_REPORT ------------
Event: time 1546525089.443482, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90007
Event: time 1546525089.443482, type 1 (EV_KEY), code 262 (BTN_6), value 0
Event: time 1546525089.443482, -------------- SYN_REPORT ------------
Event: time 1546525089.827441, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90008
Event: time 1546525089.827441, type 1 (EV_KEY), code 263 (BTN_7), value 1
Event: time 1546525089.827441, -------------- SYN_REPORT ------------
Event: time 1546525090.005445, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90008
Event: time 1546525090.005445, type 1 (EV_KEY), code 263 (BTN_7), value 0
Event: time 1546525090.005445, -------------- SYN_REPORT ------------
Event: time 1546525090.337504, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
Event: time 1546525090.337504, type 1 (EV_KEY), code 264 (BTN_8), value 1
Event: time 1546525090.337504, -------------- SYN_REPORT ------------
Event: time 1546525090.533503, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90009
Event: time 1546525090.533503, type 1 (EV_KEY), code 264 (BTN_8), value 0
Event: time 1546525090.533503, -------------- SYN_REPORT ------------
Event: time 1546525090.893507, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
Event: time 1546525090.893507, type 1 (EV_KEY), code 265 (BTN_9), value 1
Event: time 1546525090.893507, -------------- SYN_REPORT ------------
Event: time 1546525091.055496, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9000a
Event: time 1546525091.055496, type 1 (EV_KEY), code 265 (BTN_9), value 0
Event: time 1546525091.055496, -------------- SYN_REPORT ------------
Event: time 1546525091.343458, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1546525091.343458, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1
Event: time 1546525091.343458, -------------- SYN_REPORT ------------
Event: time 1546525091.545460, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1546525091.545460, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0
Event: time 1546525091.545460, -------------- SYN_REPORT ------------
Event: time 1546525091.949519, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time 1546525091.949519, type 1 (EV_KEY), code 305 (BTN_EAST), value 1
Event: time 1546525091.949519, -------------- SYN_REPORT ------------
Event: time 1546525092.087472, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90002
Event: time 1546525092.087472, type 1 (EV_KEY), code 305 (BTN_EAST), value 0
Event: time 1546525092.087472, -------------- SYN_REPORT ------------

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.