#!/bin/bash # use xinput keyboards=$(xinput --list | grep "slave" | grep "keyboard" | cut -f2 | cut -d'=' -f2) for id in $keyboards; do echo "enabling device #$id" xinput --set-prop $id "Device Enabled" 1 done