Announcement

Collapse
No announcement yet.

Remap airmouse leftclick to another button ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Remap airmouse leftclick to another button ?

    i bought a airmouse (wechip w1) and using it for my rock64 android tv.

    in Airmouse mode the OK button acts as a leftclick, this is totally fine.

    but when i deactivate Airmouse mode the OK button sends both, leftclick and Return, but it should only send the return command.

    when i navigate with keys through android and press ok to start a app, it first recognize the leftclick, but the mousepointer is anywhere on the screen and starts any app it points at.

    this is really annoying. i tried to modify the keylayout file for the airmouse but i found out that the left click or BTN_TOUCH doenst rely on any .kl file

    the mouse uses the USBHID driver, maybe this driver can be modifyd to remap the left click, but i dont know where it locates and i dont know how to modify it.

    so anyone can help with this problem ?


    edit: also there is no remote.conf in /system/etc/ ,maybe i can write one and set it there ?


    edit: used getevent to detect what OK press doing when airmouse mode enabled or disabled

    Airmouse mode DISABLED :

    (on keypress)
    /dev/input/event3: 0004 0004 00070028
    /dev/input/event3: 0001 001c 00000001
    /dev/input/event3: 0000 0000 00000000

    (on keyrelease)

    /dev/input/event3: 0004 0004 00070028
    /dev/input/event3: 0001 001c 00000000
    /dev/input/event3: 0000 0000 00000000

    Airmouse mode ENABLED :

    (on keypress)
    /dev/input/event3: 0004 0004 00090001
    /dev/input/event3: 0001 0110 00000001
    /dev/input/event3: 0000 0000 00000000

    (on keyrelease)

    /dev/input/event3: 0004 0004 00090001
    /dev/input/event3: 0001 0110 00000000
    /dev/input/event3: 0000 0000 00000000


    i plugged in my usb mouse to see what its doing on pressing leftclick

    (on keypress)
    /dev/input/event4: 0004 0004 00090001
    /dev/input/event4: 0001 0110 00000001
    /dev/input/event4: 0000 0000 00000000

    (on keyrelease)

    /dev/input/event4: 0004 0004 00090001
    /dev/input/event4: 0001 0110 00000000
    /dev/input/event4: 0000 0000 00000000

    plugged in my keyboard and on pressing return it sends

    (on keypress)
    /dev/input/event4: 0004 0004 00070028
    /dev/input/event4: 0001 001c 00000001
    /dev/input/event4: 0000 0000 00000000

    (on keyrelease)

    /dev/input/event4: 0004 0004 00070028
    /dev/input/event4: 0001 001c 00000000
    /dev/input/event4: 0000 0000 00000000



    so the events caused by the airmouse is 100% correct, wtf, but whhyyyyy it makes a leftclick when it shouldnt ???
    Last edited by SynthetikZ; 03-16-2019, 17:20.
Working...
X