Created
April 3, 2026 17:54
-
-
Save tripurari001/4088c35b54a84ad381d664f9f2f7606a to your computer and use it in GitHub Desktop.
Give permission for WebHiD to modify keyboard using usevia.app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # can change the device name here | |
| HID_NAME='Keychron Keychron K2 Pro' | |
| # loop over possible devices | |
| for f in /dev/hidraw* | |
| do | |
| DEVICE_NAME=$(basename ${f}) | |
| if grep "$HID_NAME" "/sys/class/hidraw/${DEVICE_NAME}/device/uevent"; | |
| then | |
| # device matches product name | |
| echo Running sudo chmod a+rw "$f" | |
| sudo chmod a+rw "$f" | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment