android-keyboard-gadget
android-keyboard-gadget copied to clipboard
hid-gadget-test qwerty azerty
Hello, I have a bug with hid-gadget-test utility, when I run : echo a | /data/local/tmp/hid-gadget-test /dev/hidg0 keyboard, it's print "q" and vice versa
I think to a qwerty azerty conversion... Can you help me with that?
It's definitely because of AZERTY layout.
You can use some commandline conversion of characters, like
echo a | /data/local/tmp/busybox tr qwaz azqw | /data/local/tmp/hid-gadget-test /dev/hidg0 keyboard
You will also need to copy busybox to /data/local/tmp On Jun 24, 2015 3:58 PM, "Julien Quiévreux" [email protected] wrote:
Hello, I have a bug with hid-gadget-test utility, when I run : echo a | /data/local/tmp/hid-gadget-test /dev/hidg0 keyboard, it's print "q" and vice versa
I think to a qwerty azerty conversion... Can you help me with that?
— Reply to this email directly or view it on GitHub https://github.com/pelya/android-keyboard-gadget/issues/29.
Is it possible that I compile HID-gadget-test only with the azerty layout? If Yes can you help to do that, (the compilation part, not the layout change)
Yes, here they are: https://github.com/pelya/android-keyboard-gadget/tree/master/hid-gadget-test/jni Run ndk-build from hid-gadget-test directory to recompile it. On Jun 25, 2015 12:35 PM, "Julien Quiévreux" [email protected] wrote:
Is it possible that I compile HID-gadget-test with the azerty layout? sources are available?
— Reply to this email directly or view it on GitHub https://github.com/pelya/android-keyboard-gadget/issues/29#issuecomment-115185763 .
Thanks a lot I can create my own hid-gadget now, but another 2 another questions now, in the following code:
{.opt = "a", .val = 0x04},
{.opt = "b", .val = 0x05},
{.opt = "c", .val = 0x06},
{.opt = "d", .val = 0x07},
{.opt = "e", .val = 0x08},
how do you choose the val ? Arbitary way? I can other key like '@'?
.val is scancode returned by keyboard hardware. There is a list of USB keyboard scancodes here: http://hg.libsdl.org/SDL/file/tip/include/SDL_scancode.h When you have non-QWERTY layout, you just have different key labels, but the key themselves usually return same scancodes - upper-left key has scancode 20, where would be 'Q' key on QWERTY keyboard, the next key has scancode 26 etc.