Rate This Document
Findability
Accuracy
Completeness
Readability

Example Configuration

  1. Call the setprop method to create a mouse device, and view the result using the getevent method.
    1
    2
    setprop persist.sys.input.mouse.name mouse
    getevent
    

    The following is a command output example:

    1
    2
    3
    4
    5
    6
    add device 1: /dev/input/event4
      name:     "mouse"
    add device 2: /dev/input/event3
      name:     "Touch Pad"
    could not get driver version for /dev/input/event0, Inappropriate ioctl for device
    could not get driver version for /dev/input/event1, Inappropriate ioctl for device
    
  2. Call the setprop method to create the first handle device, and view the result using the getevent method.
    1
    2
    setprop persist.sys.input.gamepad1.name gamepad1
    getevent
    

    The following is a command output example:

    1
    2
    3
    4
    5
    6
    7
    8
    add device 1: /dev/input/event5
      name:     "gamepad1"
    add device 2: /dev/input/event4
      name:     "mouse"
    add device 3: /dev/input/event3
      name:     "Touch Pad"
    could not get driver version for /dev/input/event0, Inappropriate ioctl for device
    could not get driver version for /dev/input/event1, Inappropriate ioctl for device
    
  3. Call the setprop method to create the second handle device, and view the result using the getevent method.
    1
    2
    setprop persist.sys.input.gamepad2.name gamepad2
    getevent
    

    The following is a command output example:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    add device 1: /dev/input/event6
      name:     "gamepad2"
    add device 2: /dev/input/event5
      name:     "gamepad1"
    add device 3: /dev/input/event4
      name:     "mouse"
    add device 4: /dev/input/event3
      name:     "Touch Pad"
    could not get driver version for /dev/input/event0, Inappropriate ioctl for device
    could not get driver version for /dev/input/event1, Inappropriate ioctl for device