Better laptop keyboard enable/disable scripts
This commit is contained in:
parent
e7271bf0b2
commit
27b4b40dc5
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sudo xinput float 15
|
||||
KEYBOARD_SEARCH_STRING="AT Translated.*keyboard"
|
||||
BUILTIN_KEYBOARD_ID=$(xinput list | grep "$KEYBOARD_SEARCH_STRING" | sed -ne 's/^.*id\=\([0-9]*\).*/\1/p')
|
||||
sudo xinput float "$BUILTIN_KEYBOARD_ID"
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sudo xinput reattach 15 3
|
||||
KEYBOARD_PARENT_SEARCH_STRING="Virtual core keyboard.*master keyboard"
|
||||
PARENT_KEYBOARD_ID=$(xinput list | grep "$KEYBOARD_PARENT_SEARCH_STRING" | sed -ne 's/^.*id\=\([0-9]*\).*/\1/p')
|
||||
|
||||
KEYBOARD_SEARCH_STRING="AT Translated.*keyboard"
|
||||
BUILTIN_KEYBOARD_ID=$(xinput list | grep "$KEYBOARD_SEARCH_STRING" | sed -ne 's/^.*id\=\([0-9]*\).*/\1/p')
|
||||
sudo xinput reattach "$BUILTIN_KEYBOARD_ID" "$PARENT_KEYBOARD_ID"
|
||||
|
|
Reference in a new issue