Is it possible to disable physical keyboard and touchpad?

2,015 views
Skip to first unread message

Sadi Yumuşak

unread,
Jan 7, 2018, 6:37:54 AM1/7/18
to Android-x86
My 2-in-1 touchscreen laptop came with pre-installed Windows 10, which I don't use even though they claim much better transition between PC and tablet mode (e.g. much better touchscreen support and automatic disabling of physical keyboard and touchpad by Windows in tablet mode). Instead, I prefer using Linux Mint in PC mode, and Android-x86 in tablet mode.

It seems I now have only one last remaining task to achieve this dual PC and Tablet mode capability:

Toggling the physical keyboard and touchpad on and off (or even permanently disabling if that's not possible) when fold the screen flat and when the keyboard and touchpad is at the bottom where fingers can accidently trigger some undesirable keyboard and/or touchpad activity.

I wonder if this is possible and how...
Any suggestşons please?

Chih-Wei Huang

unread,
Jan 7, 2018, 10:36:01 PM1/7/18
to Android-x86
The android input framework already has the ability
to toogle virtual keyboard depends on whether
a physical keyboard is available.
But you need to grab the toggling events to trigger it.
How to do that depends on your hardware.

Permanently disabling it is easier.
You can just add the input device name
to /etc/excluded-input-devices.xml

Sadi Yumuşak

unread,
Jan 8, 2018, 9:35:30 AM1/8/18
to Android-x86

The android input framework already has the ability
to toogle virtual keyboard depends on whether
a physical keyboard is available.
But you need to grab the toggling events to trigger it.
How to do that depends on your hardware.


It seems this requires some Android developer skills, so I gave up ;-)
 
Permanently disabling it is easier.
You can just add the input device name
to /etc/excluded-input-devices.xml

I added "<device name="AT Translated Set 2 keyboard" />" in the file "/etc/excluded-input-devices.xml" and it worked perfectly, disabling my laptop's physical keyboard after reboot.

But I couldn't disable the Touchpad yet...as I cannot see its name displayed in the Settings, unlike the keyboard. The terminal command input gave me this list of input devices:
keyboard
mouse
joystick
touchnavigation
touchpad
trackball
dpad
stylus
gamepad
touchscreen

But inserting those apparently general/generic device names don't work...

Any suggestions for identifying the specific name of my touchpad to exclude please?

Thank you so much for being so helpful!

Regards,
Sadi

Chih-Wei Huang

unread,
Jan 8, 2018, 9:44:58 PM1/8/18
to Android-x86
2018-01-08 22:35 GMT+08:00 Sadi Yumuşak <sadiy...@gmail.com>:
>
> I added "<device name="AT Translated Set 2 keyboard" />" in the file
> "/etc/excluded-input-devices.xml" and it worked perfectly, disabling my
> laptop's physical keyboard after reboot.
>
> But I couldn't disable the Touchpad yet...as I cannot see its name displayed
> in the Settings, unlike the keyboard. The terminal command input gave me
> this list of input devices:
> keyboard
> mouse
> joystick
> touchnavigation
> touchpad
> trackball
> dpad
> stylus
> gamepad
> touchscreen
>
> But inserting those apparently general/generic device names don't work...
>
> Any suggestions for identifying the specific name of my touchpad to exclude
> please?

Use 'getevent -p' to the list of all input devices.

--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Sadi Yumuşak

unread,
Jan 9, 2018, 7:56:25 AM1/9/18
to Android-x86
The command 'getevent -p' gave me a list like this:

could not open /dev/input/mice, Permission denied
could not open /dev/input/mouse2, Permission denied
could not open /dev/input/mouse1, Permission denied
could not open /dev/input/mouse0, Permission denied
could not open /dev/input/eventXX, Permission denied

(The last line is repeated 19 times starting from 0 to 18)

Connecting a USB mouse adds a line like this:
"could not open /dev/input/mouse3, Permission denied"

So I included "mice", "mouse0", "mouse1" and "mouse2" to the lisbt of devices to be excluded, but unfortunately it didn't have any effect...

It seems disabling the touchpad is not as easy as disabling the keyboard...

Regards,

Sadi

Sadi Yumuşak

unread,
Jan 9, 2018, 9:07:48 AM1/9/18
to Android-x86
Eureka! Another issue resolved fairly quickly !!! :-)
Having seen my laptop's keyboard named as "AT Translated Set 2 keyboard", i.e. the same as Android, I looked at what "xinput --list" calls my laptop's touchpad and chose "ELAN1200:00 04F3:3058 Touchpad", and it worked!

Sadi

Chih-Wei Huang

unread,
Jan 9, 2018, 9:59:13 PM1/9/18
to Android-x86
2018-01-09 20:56 GMT+08:00 Sadi Yumuşak <sadiy...@gmail.com>:
> The command 'getevent -p' gave me a list like this:
> could not open /dev/input/mice, Permission denied
> could not open /dev/input/mouse2, Permission denied
> could not open /dev/input/mouse1, Permission denied
> could not open /dev/input/mouse0, Permission denied
> could not open /dev/input/eventXX, Permission denied

Run it as root.

Sadi Yumuşak

unread,
Jan 10, 2018, 7:30:36 AM1/10/18
to Android-x86
Thanks!

It took me a while to decide what do after I noticed Android doesn't have `sudo`, and then when I gained root access in terminal by entering the command `su root` I was surprised to see that `getevent -p` in fact provides more detailed information that `xinput --list`...

Nice warming up to Android-x86 so far ;-)

Sadi
Reply all
Reply to author
Forward
0 new messages