Not sure if there is an existing app for extra / non-standard hardware buttons. I wonder if driver is needed or some sort of magic to listen to input?
Gathering info on Stock Jelly to diff against Lineage:
adb shell dumpsys input
says:
INPUT MANAGER (dumpsys input)
Input properties:
persist.input.velocitytracker.strategy = default
Input Manager State:
Interactive: true
System UI Lights Out: false
Pointer Speed: 0
Pointer Acceleration: 3.000
Pointer Gestures Enabled: true
Show Touches: true
Pointer Capture: Disabled, seq=0
Event Hub State:
BuiltInKeyboardId: -2
Devices:
1: mt6789-mt6366 Headset Jack
Classes: KEYBOARD | SWITCH
Path: /dev/input/event4
Enabled: true
Descriptor: 51b48df63a82026f1e5f8d2da317285e6cf2d6fc
Location: ALSA
ControllerNumber: 0
UniqueId:
Identifier: bus=0x0019, vendor=0x0000, product=0x0000, version=0x0000
KeyLayoutFile: /system/usr/keylayout/Generic.kl
KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
ConfigurationFile:
VideoDevice: <none>
2: fingerprint_key
Classes: KEYBOARD
Path: /dev/input/event3
Enabled: true
Descriptor: 7c5a7d970b87e09497143238aa4085d015b51f1c
Location:
ControllerNumber: 0
UniqueId:
Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
KeyLayoutFile: /system/usr/keylayout/Generic.kl
KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
ConfigurationFile:
VideoDevice: <none>
3: mtk-pmic-keys
Classes: KEYBOARD
Path: /dev/input/event0
Enabled: true
Descriptor: 485d69228e24f5e46da1598745890b214130dbc4
Location:
ControllerNumber: 0
UniqueId:
Identifier: bus=0x0019, vendor=0x0001, product=0x0001, version=0x0001
KeyLayoutFile: /system/usr/keylayout/Generic.kl
KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
ConfigurationFile:
VideoDevice: <none>
-1: Virtual
Classes: KEYBOARD | ALPHAKEY | DPAD | VIRTUAL
Path: <virtual>
Enabled: true
Descriptor: a718a782d34bc767f4689c232d64d527998ea7fd
Location:
ControllerNumber: 0
UniqueId: <virtual>
Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
KeyLayoutFile: /system/usr/keylayout/Generic.kl
KeyCharacterMapFile: /system/usr/keychars/Virtual.kcm
ConfigurationFile:
VideoDevice: <none>
4: mtk-kpd
Classes: KEYBOARD
Path: /dev/input/event1
Enabled: true
Descriptor: 9a244e01c90550ca2eb2798ffe20d8731e811765
Location:
ControllerNumber: 0
UniqueId:
Identifier: bus=0x0019, vendor=0x0000, product=0x0000, version=0x0000
KeyLayoutFile: /system/usr/keylayout/Generic.kl
KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
ConfigurationFile:
VideoDevice: <none>
5: cap_touch
Classes: KEYBOARD | TOUCH | TOUCH_MT
Path: /dev/input/event2
Enabled: true
Descriptor: 4bb8a2435dba96ad6c532f44922c30bce0d5d849
Location:
ControllerNumber: 0
UniqueId:
Identifier: bus=0x0018, vendor=0x0000, product=0x0000, version=0x0000
KeyLayoutFile: /system/usr/keylayout/Generic.kl
KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
ConfigurationFile:
VideoDevice: <none>
Unattached video devices:
<none>
Input Reader State (Nums of device: 6):
Device 5: fingerprint_key
EventHub Devices: [ 2 ]
Generation: 15
IsExternal: false
AssociatedDisplayPort: <none>
AssociatedDisplayUniqueId: <none>
HasMic: false
Sources: 0x00000101
KeyboardType: 1
ControllerNum: 0
Keyboard Input Mapper:
Parameters:
OrientationAware: false
HandlesKeyRepeat: false
KeyboardType: 1
Orientation: 0
KeyDowns: 0 keys currently down
MetaState: 0x0
DownTime: 34843798213000
Device 3: mtk-kpd
EventHub Devices: [ 4 ]
Generation: 9
IsExternal: false
AssociatedDisplayPort: <none>
AssociatedDisplayUniqueId: <none>
HasMic: false
Sources: 0x00000101
KeyboardType: 1
ControllerNum: 0
Keyboard Input Mapper:
Parameters:
OrientationAware: false
HandlesKeyRepeat: false
KeyboardType: 1
Orientation: 0
KeyDowns: 0 keys currently down
MetaState: 0x0
DownTime: 140483289181000
Device 6: mt6789-mt6366 Headset Jack
EventHub Devices: [ 1 ]
Generation: 18
IsExternal: false
AssociatedDisplayPort: <none>
AssociatedDisplayUniqueId: <none>
HasMic: false
Sources: 0x80000101
KeyboardType: 1
ControllerNum: 0
Switch Input Mapper:
SwitchValues: 0
Keyboard Input Mapper:
Parameters:
OrientationAware: false
HandlesKeyRepeat: false
KeyboardType: 1
Orientation: 0
KeyDowns: 0 keys currently down
MetaState: 0x0
DownTime: 0
Device 4: mtk-pmic-keys
EventHub Devices: [ 3 ]
Generation: 12
IsExternal: false
AssociatedDisplayPort: <none>
AssociatedDisplayUniqueId: <none>
HasMic: false
Sources: 0x00000101
KeyboardType: 1
ControllerNum: 0
Keyboard Input Mapper:
Parameters:
OrientationAware: false
HandlesKeyRepeat: false
KeyboardType: 1
Orientation: 0
KeyDowns: 0 keys currently down
MetaState: 0x0
DownTime: 140200404961000
Device 2: cap_touch
EventHub Devices: [ 5 ]
Generation: 100
IsExternal: false
AssociatedDisplayPort: <none>
AssociatedDisplayUniqueId: <none>
HasMic: false
Sources: 0x00001103
KeyboardType: 1
ControllerNum: 0
Motion Ranges:
X: source=0x00001002, min=0.000, max=479.000, flat=0.000, fuzz=0.000, resolution=0.000
Y: source=0x00001002, min=0.000, max=853.000, flat=0.000, fuzz=0.000, resolution=0.000
PRESSURE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000
SIZE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000
TOUCH_MAJOR: source=0x00001002, min=0.000, max=979.651, flat=0.000, fuzz=0.000, resolution=0.000
TOUCH_MINOR: source=0x00001002, min=0.000, max=979.651, flat=0.000, fuzz=0.000, resolution=0.000
TOOL_MAJOR: source=0x00001002, min=0.000, max=979.651, flat=0.000, fuzz=0.000, resolution=0.000
TOOL_MINOR: source=0x00001002, min=0.000, max=979.651, flat=0.000, fuzz=0.000, resolution=0.000
Keyboard Input Mapper:
Parameters:
OrientationAware: false
HandlesKeyRepeat: false
KeyboardType: 1
Orientation: 0
KeyDowns: 0 keys currently down
MetaState: 0x0
DownTime: 140478462270000
Touch Input Mapper (mode - DIRECT):
Parameters:
GestureMode: MULTI_TOUCH
DeviceType: TOUCH_SCREEN
AssociatedDisplay: hasAssociatedDisplay=true, isExternal=false, displayId=''
OrientationAware: true
Orientation: ORIENTATION_0
Raw Touch Axes:
X: min=0, max=480, flat=0, fuzz=0, resolution=0
Y: min=0, max=854, flat=0, fuzz=0, resolution=0
Pressure: unknown range
TouchMajor: min=0, max=255, flat=0, fuzz=0, resolution=0
TouchMinor: unknown range
ToolMajor: min=0, max=255, flat=0, fuzz=0, resolution=0
ToolMinor: unknown range
Orientation: unknown range
Distance: unknown range
TiltX: unknown range
TiltY: unknown range
TrackingId: min=0, max=65535, flat=0, fuzz=0, resolution=0
Slot: min=0, max=4, flat=0, fuzz=0, resolution=0
Calibration:
touch.size.calibration: GEOMETRIC
touch.pressure.calibration: none
touch.orientation.calibration: none
touch.distance.calibration: none
touch.coverage.calibration: none
Affine Transformation:
X scale: 1.000
X ymix: 0.000
X offset: 0.000
Y xmix: 0.000
Y scale: 1.000
Y offset: 0.000
Viewport INTERNAL: displayId=0, uniqueId=local:0, port=0, orientation=0, logicalFrame=[0, 0, 480, 854], physicalFrame=[0, 0, 480, 854], deviceSize=[480, 854], isActive=[1]
DisplayWidth: 480px
DisplayHeight: 854px
PhysicalWidth: 480px
PhysicalHeight: 854px
PhysicalLeft: 0
PhysicalTop: 0
InputDeviceOrientation: 0
Translation and Scaling Factors:
XScale: 0.998
YScale: 0.999
XPrecision: 1.002
YPrecision: 1.001
GeometricScale: 0.998
PressureScale: 0.000
SizeScale: 0.004
OrientationScale: 0.000
DistanceScale: 0.000
HaveTilt: false
TiltXCenter: 0.000
TiltXScale: 0.000
TiltYCenter: 0.000
TiltYScale: 0.000
Last Raw Button State: 0x00000000
Last Raw Touch: pointerCount=0
Last Cooked Button State: 0x00000000
Last Cooked Touch: pointerCount=0
Stylus Fusion:
ExternalStylusConnected: false
External Stylus ID: -1
External Stylus Data Timeout: 9223372036854775807
External Stylus State:
When: 9223372036854775807
Pressure: 0.000000
Button State: 0x00000000
Tool Type: 0
Device -1: Virtual
EventHub Devices: [ -1 ]
Generation: 3
IsExternal: false
AssociatedDisplayPort: <none>
AssociatedDisplayUniqueId: <none>
HasMic: false
Sources: 0x00000301
KeyboardType: 2
ControllerNum: 0
Keyboard Input Mapper:
Parameters:
OrientationAware: false
HandlesKeyRepeat: false
KeyboardType: 2
Orientation: 0
KeyDowns: 0 keys currently down
MetaState: 0x0
DownTime: 0
Configuration:
ExcludedDeviceNames: []
VirtualKeyQuietTime: 0.0ms
PointerVelocityControlParameters: scale=1.000, lowThreshold=500.000, highThreshold=3000.000, acceleration=3.000
WheelVelocityControlParameters: scale=1.000, lowThreshold=15.000, highThreshold=50.000, acceleration=4.000
PointerGesture:
Enabled: true
QuietInterval: 100.0ms
DragMinSwitchSpeed: 50.0px/s
TapInterval: 150.0ms
TapDragInterval: 300.0ms
TapSlop: 20.0px
MultitouchSettleInterval: 100.0ms
MultitouchMinDistance: 15.0px
SwipeTransitionAngleCosine: 0.3
SwipeMaxWidthRatio: 0.2
MovementSpeedRatio: 0.8
ZoomSpeedRatio: 0.3
Viewports:
Viewport INTERNAL: displayId=0, uniqueId=local:0, port=0, orientation=0, logicalFrame=[0, 0, 480, 854], physicalFrame=[0, 0, 480, 854], deviceSize=[480, 854], isActive=[1]
UnwantedInteractionBlocker:
mPreferStylusOverTouchBlocker:
mActiveStyli: {}
mLastTouchEvents:
mDevicesWithMixedToolType: {}
mCanceledDevices: {}
mEnablePalmRejection: false
isPalmRejectionEnabled (flag value): false
mPalmRejectors: None
Input Classifier State:
Motion Classifier:
<nullptr>
Input Dispatcher State:
DispatchEnabled: true
DispatchFrozen: false
InputFilterEnabled: false
FocusedDisplayId: 0
FocusedApplications:
displayId=0, name='ActivityRecord{e6fd6b7 u0 com.android.launcher3/com.android.searchlauncher.SearchLauncher} t8}', dispatchingTimeout=50000ms
FocusedWindows:
displayId=0, name='40a6841 com.android.launcher3/com.android.searchlauncher.SearchLauncher'
FocusRequests:
displayId=0, name='40a6841 com.android.launcher3/com.android.searchlauncher.SearchLauncher' result='OK'
Pointer Capture Requested: false
Current Window with Pointer Capture: None
TouchStates: <no displays touched>
Display: 0
logicalSize=480x854
transform (ROT_0) (IDENTITY)
Windows:
0: name='[Gesture Monitor] swipe-up', id=98, displayId=0, inputConfig=NOT_FOCUSABLE | TRUSTED_OVERLAY | SPY, alpha=1.00, frame=[0,0][0,0], globalScale=1.000000, applicationInfo.name=[Gesture Monitor] swipe-up, applicationInfo.token=<null>, touchableRegion=[-4799,-8539][4800,8540], ownerPid=2209, ownerUid=10177, dispatchingTimeout=50000ms, hasToken=true, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
1: name='[Gesture Monitor] edge-swipe', id=80, displayId=0, inputConfig=NOT_FOCUSABLE | TRUSTED_OVERLAY | SPY, alpha=1.00, frame=[0,0][0,0], globalScale=1.000000, applicationInfo.name=[Gesture Monitor] edge-swipe, applicationInfo.token=<null>, touchableRegion=[-4799,-8539][4800,8540], ownerPid=1762, ownerUid=10176, dispatchingTimeout=50000ms, hasToken=true, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
2: name='stylus-handwriting-event-receiver-0', id=95, displayId=0, inputConfig=NOT_FOCUSABLE | NOT_TOUCHABLE | TRUSTED_OVERLAY | SPY | INTERCEPTS_STYLUS, alpha=1.00, frame=[0,0][0,0], globalScale=1.000000, applicationInfo.name=stylus-handwriting-event-receiver-0, applicationInfo.token=<null>, touchableRegion=[-4799,-8539][4800,8540], ownerPid=1491, ownerUid=1000, dispatchingTimeout=50000ms, hasToken=true, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
3: name='f613433 NavigationBar0', id=85, displayId=0, inputConfig=NOT_FOCUSABLE | TRUSTED_OVERLAY | WATCH_OUTSIDE_TOUCH, alpha=1.00, frame=[0,854][0,854], globalScale=1.000000, applicationInfo.name=, applicationInfo.token=<null>, touchableRegion=<empty>, ownerPid=1762, ownerUid=10176, dispatchingTimeout=50000ms, hasToken=true, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (TRANSLATE)
1.0000 -0.0000 0.0000
-0.0000 1.0000 -854.0000
0.0000 0.0000 1.0000
4: name='2e7e91d StatusBar', id=86, displayId=0, inputConfig=NOT_FOCUSABLE | TRUSTED_OVERLAY, alpha=1.00, frame=[0,0][480,33], globalScale=1.000000, applicationInfo.name=, applicationInfo.token=<null>, touchableRegion=[0,0][480,33], ownerPid=1762, ownerUid=10176, dispatchingTimeout=50000ms, hasToken=true, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
5: name='recents_animation_input_consumer', id=96, displayId=0, inputConfig=NOT_VISIBLE | TRUSTED_OVERLAY, alpha=1.00, frame=[0,0][480,854], globalScale=1.000000, applicationInfo.name=recents_animation_input_consumer, applicationInfo.token=0xb400007b358f5e30, touchableRegion=[0,0][480,854], ownerPid=1491, ownerUid=1000, dispatchingTimeout=50000ms, hasToken=true, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
6: name='40a6841 com.android.launcher3/com.android.searchlauncher.SearchLauncher', id=6578, displayId=0, inputConfig=DUPLICATE_TOUCH_TO_WALLPAPER, alpha=1.00, frame=[0,0][480,854], globalScale=1.000000, applicationInfo.name=ActivityRecord{e6fd6b7 u0 com.android.launcher3/com.android.searchlauncher.SearchLauncher} t8}, applicationInfo.token=0xb400007b358f7630, touchableRegion=[0,0][480,854], ownerPid=2209, ownerUid=10177, dispatchingTimeout=50000ms, hasToken=true, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
7: name='589c8d5 ActivityRecordInputSink com.android.launcher3/com.android.searchlauncher.SearchLauncher', id=6603, displayId=0, inputConfig=NO_INPUT_CHANNEL | NOT_FOCUSABLE, alpha=1.00, frame=[0,0][0,0], globalScale=0.000000, applicationInfo.name=, applicationInfo.token=<null>, touchableRegion=[-4799,-8539][4800,8540], ownerPid=1491, ownerUid=1000, dispatchingTimeout=0ms, hasToken=false, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
8: name='Wallpaper BBQ wrapper#78', id=78, displayId=0, inputConfig=NO_INPUT_CHANNEL, alpha=1.00, frame=[0,0][480,854], globalScale=1.000000, applicationInfo.name=, applicationInfo.token=<null>, touchableRegion=<empty>, ownerPid=1762, ownerUid=10176, dispatchingTimeout=5000ms, hasToken=false, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
9: name='4e16b7d com.android.systemui.ImageWallpaper', id=77, displayId=0, inputConfig=NOT_FOCUSABLE | NOT_TOUCHABLE | PREVENT_SPLITTING | IS_WALLPAPER, alpha=1.00, frame=[0,0][0,0], globalScale=1.000000, applicationInfo.name=, applicationInfo.token=<null>, touchableRegion=<empty>, ownerPid=1762, ownerUid=10176, dispatchingTimeout=50000ms, hasToken=true, touchOcclusionMode=BLOCK_UNTRUSTED
transform (ROT_0) (IDENTITY)
Global monitors on display 0:
0: 'PointerEventDispatcher0 (server)',
RecentQueue: length=10
KeyEvent, age=19127ms
KeyEvent, age=18526ms
KeyEvent, age=18123ms
KeyEvent, age=18073ms
KeyEvent, age=18023ms
KeyEvent, age=17973ms
KeyEvent, age=17922ms
KeyEvent, age=17871ms
KeyEvent, age=17821ms
KeyEvent, age=17798ms
PendingEvent: <none>
InboundQueue: <empty>
ReplacedKeys: <empty>
CommandQueue: <empty>
Connections:
707: channelName='bc3751f com.agui.studentmodel/com.agui.studentmodel.StudentModelActivity (server)', windowName='bc3751f com.agui.studentmodel/com.agui.studentmodel.StudentModelActivity (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
644: channelName='6de57 com.android.settings/com.android.settings.Settings (server)', windowName='6de57 com.android.settings/com.android.settings.Settings (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
524: channelName='ec6b485 pip-dismiss-overlay (server)', windowName='ec6b485 pip-dismiss-overlay (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
446: channelName='40a6841 com.android.launcher3/com.android.searchlauncher.SearchLauncher (server)', windowName='40a6841 com.android.launcher3/com.android.searchlauncher.SearchLauncher (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
501: channelName='[Gesture Monitor] edge-swipe (server)', windowName='[Gesture Monitor] edge-swipe (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
506: channelName='[Gesture Monitor] swipe-up (server)', windowName='[Gesture Monitor] swipe-up (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
504: channelName='4e16b7d com.android.systemui.ImageWallpaper (server)', windowName='4e16b7d com.android.systemui.ImageWallpaper (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
577: channelName='707d4fd InputMethod (server)', windowName='707d4fd InputMethod (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
480: channelName='9add76e ScreenDecorOverlay (server)', windowName='9add76e ScreenDecorOverlay (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
402: channelName='recents_animation_input_consumer (server)', windowName='recents_animation_input_consumer (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
570: channelName='stylus-handwriting-event-receiver-0 (server)', windowName='stylus-handwriting-event-receiver-0 (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
684: channelName='583c747 com.google.android.dialer/com.google.android.dialer.extensions.GoogleDialtactsActivity (server)', windowName='583c747 com.google.android.dialer/com.google.android.dialer.extensions.GoogleDialtactsActivity (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
510: channelName='861911e SecondaryHomeHandle0 (server)', windowName='861911e SecondaryHomeHandle0 (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
694: channelName='dbd5cfe com.agui.toolbox/com.agui.toolbox.EntryActivity (server)', windowName='dbd5cfe com.agui.toolbox/com.agui.toolbox.EntryActivity (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
215: channelName='PointerEventDispatcher0 (server)', windowName='PointerEventDispatcher0 (server)', status=NORMAL, monitor=true, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
508: channelName='cc1ff21 EdgeBackGestureHandler0 (server)', windowName='cc1ff21 EdgeBackGestureHandler0 (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
246: channelName='c9a24ae NotificationShade (server)', windowName='c9a24ae NotificationShade (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
489: channelName='ab0dca9 ScreenDecorOverlayBottom (server)', windowName='ab0dca9 ScreenDecorOverlayBottom (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
728: channelName='789d34d com.android.settings/com.android.settings.SubSettings (server)', windowName='789d34d com.android.settings/com.android.settings.SubSettings (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
502: channelName='2e7e91d StatusBar (server)', windowName='2e7e91d StatusBar (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
421: channelName='c3b4a25 ShellDropTarget (server)', windowName='c3b4a25 ShellDropTarget (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
494: channelName='f613433 NavigationBar0 (server)', windowName='f613433 NavigationBar0 (server)', status=NORMAL, monitor=false, responsive=true
OutboundQueue: <empty>
WaitQueue: <empty>
AppSwitch: not pending
Configuration:
KeyRepeatDelay: 50ms
KeyRepeatTimeout: 400ms
LatencyTracker:
mTimelines.size() = 4
mEventTimes.size() = 4
LatencyAggregator:
Sketches:
mDownSketches[0]->num_values = 774 size = 0.6KB mMoveSketches[0]->num_values = 19226 size = 1.4KB
mDownSketches[1]->num_values = 491 size = 0.5KB mMoveSketches[1]->num_values = 7461 size = 1.2KB
mDownSketches[2]->num_values = 491 size = 0.5KB mMoveSketches[2]->num_values = 7461 size = 1.2KB
mDownSketches[3]->num_values = 491 size = 0.5KB mMoveSketches[3]->num_values = 7461 size = 2.2KB
mDownSketches[4]->num_values = 491 size = 1.0KB mMoveSketches[4]->num_values = 7461 size = 2.4KB
mDownSketches[5]->num_values = 491 size = 1.0KB mMoveSketches[5]->num_values = 7461 size = 2.4KB
mDownSketches[6]->num_values = 491 size = 1.0KB mMoveSketches[6]->num_values = 7461 size = 2.4KB
mNumSketchEventsProcessed=20000
mLastSlowEventTime=34494957241748
mNumEventsSinceLastSlowEventReport = 409
mNumSkippedSlowEvents = 0
Input Manager Service (Java) State:
Gesture Monitors (implemented as spy windows):
0: name='[Gesture Monitor] swipe-up', inputChannelToken=android.os.BinderProxy@f2d329f displayId=0
1: name='[Gesture Monitor] edge-swipe', inputChannelToken=android.os.BinderProxy@674e57a displayId=0
adb shell getevent -p
says:
add device 1: /dev/input/event4
name: "mt6789-mt6366 Headset Jack"
events:
KEY (0001): 0072 0073 00a4 0246
SW (0005): 0002 0004 0006 0007
input props:
<none>
add device 2: /dev/input/event3
name: "fingerprint_key"
events:
KEY (0001): 001c 0057 0066 0067 0069 006a 006c 008b
008f 009e
input props:
<none>
add device 3: /dev/input/event0
name: "mtk-pmic-keys"
events:
KEY (0001): 0074 00fa
input props:
<none>
add device 4: /dev/input/event1
name: "mtk-kpd"
events:
KEY (0001): 0072 0073 00f9
input props:
<none>
add device 5: /dev/input/event2
name: "cap_touch"
events:
KEY (0001): 0011 0012 0016 0018 001f 0020 002c 002e
002f 0032 0067 0069 006a 006c 0074 009e
00ac 014a 0244
ABS (0003): 0000 : value 0, min 0, max 1080, fuzz 0, flat 0, resolution 0
0001 : value 0, min 0, max 2160, fuzz 0, flat 0, resolution 0
002f : value 0, min 0, max 4, fuzz 0, flat 0, resolution 0
0030 : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
0032 : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
0035 : value 0, min 0, max 480, fuzz 0, flat 0, resolution 0
0036 : value 0, min 0, max 854, fuzz 0, flat 0, resolution 0
0039 : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0
input props:
INPUT_PROP_DIRECT
We can also watch live events when pressing buttons!:
adb shell getevent -t
red button down:
[ 156285.015560] /dev/input/event1: 0001 00f9 00000001
[ 156285.015560] /dev/input/event1: 0000 0000 00000000
red button up:
[ 156288.382032] /dev/input/event1: 0001 00f9 00000000
[ 156288.382032] /dev/input/event1: 0000 0000 00000000
power button down:
[ 156322.526845] /dev/input/event0: 0001 0074 00000001
[ 156322.526845] /dev/input/event0: 0000 0000 00000000
power button up:
[ 156323.449230] /dev/input/event0: 0001 0074 00000000
[ 156323.449230] /dev/input/event0: 0000 0000 00000000
Volume
volume up, down (pressed):
[ 157086.520492] /dev/input/event1: 0001 0073 00000001
[ 157086.520492] /dev/input/event1: 0000 0000 00000000
volume up, up (unpress):
[ 157087.418918] /dev/input/event1: 0001 0073 00000000
[ 157087.418918] /dev/input/event1: 0000 0000 00000000
volume down, down (pressed):
[ 157179.229100] /dev/input/event1: 0001 0072 00000001
[ 157179.229100] /dev/input/event1: 0000 0000 00000000
volume down, up (unpressed):
[ 157179.788719] /dev/input/event1: 0001 0072 00000000
[ 157179.788719] /dev/input/event1: 0000 0000 00000000
Navigation Bar
left (back), down:
[ 158102.649798] /dev/input/event2: 0001 009e 00000001
[ 158102.649798] /dev/input/event2: 0000 0000 00000000
left (back), up:
[ 158103.379826] /dev/input/event2: 0001 009e 00000000
[ 158103.379826] /dev/input/event2: 0000 0000 00000000
right (recents), down:
[ 157921.306021] /dev/input/event2: 0001 0244 00000001
[ 157921.306021] /dev/input/event2: 0000 0000 00000000
right (recents), up:
[ 157922.860953] /dev/input/event2: 0001 0244 00000000
[ 157922.860953] /dev/input/event2: 0000 0000 00000000
middle (home), down:
[ 158163.454097] /dev/input/event2: 0001 00ac 00000001
[ 158163.454097] /dev/input/event2: 0000 0000 00000000
middle (home), up:
[ 158164.560478] /dev/input/event2: 0001 00ac 00000000
[ 158164.560478] /dev/input/event2: 0000 0000 00000000
Observations:
- Looks like
00000001 is on and 00000000 is off, classic.
- Not sure why it sends 2 events per action. First the ID and on or off, then all 0’s… Is the second event with all 0 meant to clear something?
- The volume up, volume down button, and red button appear to all be same path:
/dev/input/event1
EDIT: re #2, found -l arg: adb shell getevent -l and it lists the second event as SYN_REPORT. whatever that means…
/dev/input/event1: EV_KEY 00f9 DOWN
/dev/input/event1: EV_SYN SYN_REPORT 00000000
/dev/input/event1: EV_KEY 00f9 UP
/dev/input/event1: EV_SYN SYN_REPORT 00000000
So we are most interested in getting input from the red programmable button which appears to be: /dev/input/event1 with ID: 00f9 and device name: mtk-kpd:
4: mtk-kpd
Classes: KEYBOARD
Path: /dev/input/event1
Enabled: true
Descriptor: 9a244e01c90550ca2eb2798ffe20d8731e811765
Location:
ControllerNumber: 0
UniqueId:
Identifier: bus=0x0019, vendor=0x0000, product=0x0000, version=0x0000
KeyLayoutFile: /system/usr/keylayout/Generic.kl
KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
ConfigurationFile:
VideoDevice: <none>
messing around more, looks like we can perfrom keypresses through adb via: adb shell input keyevent <id>
adb shell input keyevent 3 presses home.
not sure how these ID’s map to the ones above
Can someone on LineageOS run these ‘getevent’ commands to check if the red button is detected, check if the pressing the red button produces any output?
My end goal / win-state is to be able to enable/disable the ledbelt with the red programmable button on Lineage, just like you can on stock.