hid icon indicating copy to clipboard operation
hid copied to clipboard

Question: USB HID Keyboard scan codes / ascii

Open tobearlabs opened this issue 6 years ago • 1 comments

Thanks for this nice golang package. I use it to connect to a second usb keyboard. I receive the bytes from the connected keyboard representing the scancodes. (like 4 for "a").

Do u know an easy way to map/convert the incoming scancodes to runes or characters to receive a string in the end (even using the current operating system keyboard layout). I have a loop reading all inputs only from the second keyboard, which works fine, until enter is pressed. But now i have only the "scancodes" but need to get an ascii string.

Thanks in advance.

tobearlabs avatar Sep 09 '19 11:09 tobearlabs

https://github.com/yakshaveinc/go-keycodes/blob/master/keycodes.go

fimdomeio avatar Sep 17 '19 23:09 fimdomeio