This won't work for every keystrokes, I mainly use as a D-pad for Android devices. While developing Android TV Apps. I'm sick of using the remote control or laggy virtual D-pad on the screen. -_-
- C Compiler
- adb
And of course, you need to connect your Android device to your computer via adb first.
Key | Keycode |
---|---|
Left Arrow |
KEYCODE_DPAD_LEFT |
Right Arrow |
KEYCODE_DPAD_RIGHT |
Up Arrow |
KEYCODE_DPAD_UP |
Down Arrow |
KEYCODE_DPAD_DOWN |
Enter |
KEYCODE_ENTER |
Space |
KEYCODE_SPACE |
Backspace |
KEYCODE_DEL |
Back Tick |
KEYCODE_BACK |
Compile with your favorite C compiler and run the binary.
This is a quick and dirty hack, so don't expect too much. I spent less than 10 minutes on this. :3