F5F Stay Refreshed Software Operating Systems Turn off the touchscreen when a pen or stylus comes close to the screen.

Turn off the touchscreen when a pen or stylus comes close to the screen.

Turn off the touchscreen when a pen or stylus comes close to the screen.

L
Lenn_craft
Member
63
03-26-2023, 06:14 AM
#1
You can adjust the touch sensitivity settings to disable touch input when the pen is detected. Check your system preferences or use a script to modify the Wayland settings accordingly.
L
Lenn_craft
03-26-2023, 06:14 AM #1

You can adjust the touch sensitivity settings to disable touch input when the pen is detected. Check your system preferences or use a script to modify the Wayland settings accordingly.

A
AthenasLight
Posting Freak
781
04-03-2023, 01:23 AM
#2
Right, I can't write the solution to this here, but I can tell you where too look. This detection is going to show up in udev if your laptop is configured correctly, so udevadm monitor run in a terminal is going to show what udev knows about "seeing the pen above the screen" or not. At this point I'd start scripting /usr/bin/xinput to find, identify, and disable the touchpad, but you are using wayland, so you'll need someone familiar with wayland to help with that. Once you have a script(s) to switch the touchpad on and off you just need to tie it to the events generated in udev when you move them pen in/out of range by adding custom rules in /etc/udev/rules.d/ This isn't newbie stuff, but it's totally doable (assuming wayland is capable of disabling/re-enabling the touchpad), and a worthy endeavour.
A
AthenasLight
04-03-2023, 01:23 AM #2

Right, I can't write the solution to this here, but I can tell you where too look. This detection is going to show up in udev if your laptop is configured correctly, so udevadm monitor run in a terminal is going to show what udev knows about "seeing the pen above the screen" or not. At this point I'd start scripting /usr/bin/xinput to find, identify, and disable the touchpad, but you are using wayland, so you'll need someone familiar with wayland to help with that. Once you have a script(s) to switch the touchpad on and off you just need to tie it to the events generated in udev when you move them pen in/out of range by adding custom rules in /etc/udev/rules.d/ This isn't newbie stuff, but it's totally doable (assuming wayland is capable of disabling/re-enabling the touchpad), and a worthy endeavour.

P
PianoPlayr88
Junior Member
13
04-03-2023, 01:42 AM
#3
Udev appears to be the best approach for recognizing the pen above the display. The main challenge now is figuring out how to turn off the touchscreen using Wayland.
P
PianoPlayr88
04-03-2023, 01:42 AM #3

Udev appears to be the best approach for recognizing the pen above the display. The main challenge now is figuring out how to turn off the touchscreen using Wayland.

T
tornado5
Junior Member
42
04-03-2023, 02:08 AM
#4
I discovered a script that lets you switch touch input on Wayland, which I can adapt for my needs. I tried udevadm monitor but it only displays brightness changes, not any other functionality. This is unexpected since I previously used udevadm to detect tablet mode. Do you know how to fix udevadm monitor so it works correctly? @Ralphred
T
tornado5
04-03-2023, 02:08 AM #4

I discovered a script that lets you switch touch input on Wayland, which I can adapt for my needs. I tried udevadm monitor but it only displays brightness changes, not any other functionality. This is unexpected since I previously used udevadm to detect tablet mode. Do you know how to fix udevadm monitor so it works correctly? @Ralphred

A
AbmnA
Junior Member
3
04-07-2023, 02:27 AM
#5
The only option is to test it by inserting or removing a device. If it isn't a hotplug event, you should search for Wayland's version of `xev` (X Event Viewer) to see if the proximity event is logged there. Unless you're familiar with a tool that automates scripting on specific events, you'll likely need to create background scripts yourself.
A
AbmnA
04-07-2023, 02:27 AM #5

The only option is to test it by inserting or removing a device. If it isn't a hotplug event, you should search for Wayland's version of `xev` (X Event Viewer) to see if the proximity event is logged there. Unless you're familiar with a tool that automates scripting on specific events, you'll likely need to create background scripts yourself.