The only problem is that it takes about 1s for the touchpad to get enabled back, which is kinda long, and I haven't found no way to make this delay smaller. As soon as I start typing the touchpad is disabled. Subprocess.call('xinput set-prop '+touch+' 142 0', shell=True) P = subprocess.Popen('xinput test '+keyboard, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) Subprocess.call('xinput set-prop '+touch+' 142 1', shell=True) Keyboard = os.popen('xinput list -id-only 'keyboard:SINO WEALTH USB KEYBOARD'').read() Touch = os.popen('xinput list -id-only 'pointer:SINO WEALTH USB KEYBOARD'').read() Reading through lots of related questions here and elsewhere, I've managed to adapt this python script to my problem. Also Ubuntu doesn't recognize it as a touchpad, so I can't use the Ubuntu embedded solution for disabling the touchpad while typing. The libinput property 'Disable-w-typing' is not avaliabe (it has 'n/a' as the value on 'libinput list-devices'). Long story short: I have a keyboard with a touchpad which is recognized as a 'pointer' on xinput, and has 'keyboard pointer' capabilities in libinput (in opposition to being recognized as a touchpad).