mortenjust / androidtool-mac

One-click screenshots, video recordings, app installation for iOS and Android
Apache License 2.0
5.43k stars 325 forks source link

Feature request: Keyboard input #83

Open capnfabs opened 8 years ago

capnfabs commented 8 years ago

Is there any interest in implementing keyboard input support? i.e. typing on the mac and having the equivalent keystrokes run on the Android device?

adb supports this using adb shell input keyevent. I'd be happy to do the implementation work on this at some stage in the future if there's interest.

mortenjust commented 8 years ago

That's interesting. What's an example of a use case where you which you had this?

capnfabs commented 8 years ago

I'm testing an Android tablet app that requires a lot of form filling. It's a lot easier to continue typing on my laptop than switch to tapping away on a touchscreen, to then switch back and make code changes if something's not working. Admittedly, it does sound like a bit of a niche use case :)

mortenjust commented 8 years ago

Niche use case just might be fine as long as we can find a niche place for it in the UI. Any ideas? Could this be solved with a user script in the plus menu?

capnfabs commented 8 years ago

I thought about a userscript, but I think we'd actually need UI in order to capture the keystrokes, right? I haven't thought of an elegant way to do that yet.

Partysun commented 8 years ago

@mortenjust It's an awesome feature for react-native workflow. 👍

capnfabs commented 8 years ago

@Partysun what makes it an awesome feature when working with react-native?

Partysun commented 8 years ago

React-native gives a fast preview of UI changes. And if you use react-native you can reload your view. You can see this in react-native docs: link

You can also install FrappĂ©, a tool for OS X, which allows you to emulate shaking of devices remotely. You can use ⌘ + Shift + R as a shortcut to trigger a shake from FrappĂ©.

I have connected two emulators and one real device in my developing workflow. Sometimes I want to reload view, and I shake the phone and click the button, or use adb, or use Frappe to trigger a shake and click button action.