Skip to content

Commit 2093d79

Browse files
committed
DOCS: update usb scripts for macro execution
1 parent e54286d commit 2093d79

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

doc-dev/user-guide.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,16 @@ One way is to use the npm script that is packed with agent source code:
852852
853853
Or, in linux, you can put the following script into your path... and then use it as `uhkcmd "write hello world!"`:
854854
855+
uhk60:
855856
```
856857
#!/bin/bash
857-
hidraw="hidraw`grep 'UHK 60' /sys/class/hidraw/hidraw*/device/uevent | sed -nE 's/.*hidraw([0-9]+)\/.*/\1/p' | sort -rn | head -n 1`"
858-
echo -e "\x14$*\x00" > "/dev/$hidraw"
858+
hidraw=`grep 'UHK 60' /sys/class/hidraw/hidraw*/device/uevent | grep -o 'hidraw[0-9][0-9]*' | grep -o '[0-9][0-9]*' | LC_ALL=C sort -h | head -n 3 | tail -n 1`
859+
echo -e "\x14$*\x00" > "/dev/hidraw$hidraw"
860+
```
861+
862+
#!/bin/bash
863+
hidraw=`grep 'UHK 80 Right' /sys/class/hidraw/hidraw*/device/uevent | grep -o 'hidraw[0-9][0-9]*' | grep -o '[0-9][0-9]*' | LC_ALL=C sort -h | head -n 3 | tail -n 1`
864+
echo -e "\x04\x14$*\x00" > "/dev/hidraw$hidraw"
859865
```
860866

861867

0 commit comments

Comments
 (0)