Skip to content

Instantly share code, notes, and snippets.

@Davidblkx
Davidblkx / keyboard.sh
Created May 18, 2020 22:43
Enable/Disable laptop keyboard using XINPUT
#/bin/bash
#######################################
# Enables or disables laptop keyboard #
#######################################
# Keyboard name to work with
KB_NAME="AT Translated Set 2 keyboard"
# Grab keyboard ID
KB_ID=$(xinput list | grep "$KB_NAME" | awk '{ print $7 }' | sed -r 's/id=//g')