Best way to toggle touchpad "Disable while typing" on and off with keyboard shortcut

I would like to be able to toggle the setting “Disable while typing” on and off with a keyboard shortcut. So far I’ve found that using kwriteconfig5 I can edit the config file for kcminputrc, and while the changes are reflected in the file they don’t seem to take effect until I logout.

kwriteconfig5 --file $HOME/.config/kcminputrc --group "Libinput" --group "2362" --group "628" --group "PIXA3854:00 093A:0274 Touchpad" --key "DisableWhileTyping" "false"

I was hoping to be able to use this command to toggle it on and off with the press of a button, however I can’t figure out how to get it to take effect without logging out. Its obviously possible to change the settings since they can be changed from the system settings GUI after pressing the apply button. So if anyone knows of some way to either have these changes immediately recognized, or even some other way of accomplishing the same goal I’d love to know!

1 Like

I would love to be able to toggle with a hot key myself. Every time my cat jumps on my keyboard he causes the mouse to stay disabled until I toggle Disable while typing off and on again.