[Xiaomi DT2W] Call sendevent on any touchscreen
On Redmi Go, there is no gesture_mask or wake_gesture, no /proc/touchpanel/wakeup_gesture, no /proc/tp_wakeup_gesture, no /proc/tp_gesture However sendevent works. FWIW it does have /proc/gesture/onoff, and /proc/gesture/data
This commit is contained in:
parent
62dcebdd7f
commit
3371719f20
@ -31,8 +31,13 @@ xiaomi_toggle_dt2w_event_node() {
|
||||
cd /sys/class/input || return
|
||||
echo event*
|
||||
); do
|
||||
isTouchscreen=false
|
||||
if getevent -p /dev/input/$ev |grep -e 0035 -e 0036|wc -l |grep -q 2;then
|
||||
isTouchscreen=true
|
||||
fi
|
||||
[ ! -f "/sys/class/input/${ev}/device/device/gesture_mask" ] &&
|
||||
[ ! -f "/sys/class/input/${ev}/device/wake_gesture" ] && continue
|
||||
[ ! -f "/sys/class/input/${ev}/device/wake_gesture" ] &&
|
||||
! $isTouchscreen && continue
|
||||
echo "Trying to set dt2w mode with event node: /dev/input/${ev}"
|
||||
if [ "$1" -eq 1 ]; then
|
||||
# Enable
|
||||
|
Loading…
Reference in New Issue
Block a user