- Notifications
You must be signed in to change notification settings - Fork1
Send keystrokes from the terminal to an Android device. Requires adb.
License
androbility/keydroid
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
KeyDroid lets you interact with your Android device from the terminalusing adb, the Android Debug Bridge.
It enables control of your Android devices, like the Fire TV Playerand Google's Nexus player, from your cli. A decent analogy is:
kodikeys:kodi::keydroid:android
In contrast to kodikeys, which lets you communicate with kodi,keydroid lets you control the entire Android system; it also attemptsto reconnect when the adb connection is lost.
pre-1.0, the initial keybindings will be in flux and all debugmessages will be shown. At 0.4, all keybindings should beconfigurable.
On a final note, I would like to create an organiation to house thisproject and all of the keymaps for different devices. The keydroidaccount already exists on GitHub, so I am open to suggestions for newnames.
I createdTightPants as a Firefly reference, with a tp subrepo, buttp
as a command to supervise connections to Android devices?Something better must exist. If you can come up with a goodalternative, I will link you (or your company/organization) in thisREADME file forever.
$ go get github.com/stephenwithav/keydroid$ glide update$ go install github.com/stephenwithav/keydroid
Installadb.
The keybindinds that should work on all Android devices are:
<bcksp> - Send Backspace key.<tab> - Send Tab key.<space> - Select item; also, pause.<enter> - Select item; also, pause. - - Turn volume down. = - Turn volume up. + - Turn volume up. h - Move selection left. j - Move selection down. k - Move selection up. l - Move selection right. s - Stop.
The full, non-final list of default keybindings is:
<bcksp> - Send Backspace key.<tab> - Send Tab key.<space> - Select item; also, pause.<enter> - Select item; also, pause. - - Turn volume down. = - Turn volume up. + - Turn volume up. 1 - Switch TV input to HDMI1. 2 - Switch TV input to HDMI2. 3 - Switch TV input to HDMI3. 4 - Switch TV input to HDMI4. a - Trigger voice assistant. b - Return to prevous screen. c - Press center button. f - Fast-forward. h - Move selection left. i - Change TV inputs. j - Move selection down. k - Move selection up. l - Move selection right. m - Mute volume. o - Return to Home screen. q - Quit KeyDroid. r - Rewind. s - Stop. t - TV timer button. u - Menu. v - Voice assistant. w - Wakeup Android device.
You can create custom keybindings by creating the$HOME/.keydroid
directory and creating aconfig.json
file. The format is asfollows:
{"keybindings": {"\b":"KEYCODE_BACK","\t":"KEYCODE_TAB","\r":"KEYCODE_ENTER"," ":"KEYCODE_SPACE","-":"KEYCODE_VOLUME_DOWN","=":"KEYCODE_VOLUME_UP","+":"KEYCODE_VOLUME_UP","1":"KEYCODE_TV_INPUT_HDMI_1","2":"KEYCODE_TV_INPUT_HDMI_2","3":"KEYCODE_TV_INPUT_HDMI_3","4":"KEYCODE_TV_INPUT_HDMI_4","a":"KEYCODE_ASSIST","b":"KEYCODE_BACK","c":"KEYCODE_DPAD_CENTER","f":"KEYCODE_MEDIA_FAST_FORWARD","h":"KEYCODE_DPAD_LEFT","i":"KEYCODE_TV_INPUT","j":"KEYCODE_DPAD_DOWN","k":"KEYCODE_DPAD_UP","l":"KEYCODE_DPAD_RIGHT","m":"KEYCODE_MUTE","o":"KEYCODE_HOME","r":"KEYCODE_MEDIA_REWIND","s":"KEYCODE_MEDIA_STOP","t":"KEYCODE_TV_TIMER_PROGRAMMING","u":"KEYCODE_MENU","v":"KEYCODE_VOICE_ASSIST","w":"KEYCODE_WAKEUP"}}
AllKEYCODE
names listed at theKeyEvent page are supported.
stephenwithav - Steven Edwards
About
Send keystrokes from the terminal to an Android device. Requires adb.