Encontrei uma solução para o problema e escrevi um script para alternar a divisão do mouse e do teclado:
#!/bin/bash
xinput list | grep "main keyboard" -c > /dev/null
if [ $? -ne 0 ]; then
echo "Splitting laptop leyboard and touchpad..."
echo "Creating xinput main"
xinput create-master "main"
echo "Reattaching laptop touchpad and keyboard to main"
xinput reattach "SynPS/2 Synaptics TouchPad" "main pointer"
xinput reattach "AT Translated Set 2 keyboard" "main keyboard"
else
echo "Merging laptop keyboard and touchpad..."
echo "Reattaching laptop touchpad and keyboard to core"
xinput reattach "SynPS/2 Synaptics TouchPad" "Virtual core pointer"
xinput reattach "AT Translated Set 2 keyboard" "Virtual core keyboard"
echo "Removing xinput main"
xinput remove-master "main keyboard"
fi