google / android-emulator-webrtc

Apache License 2.0
121 stars 27 forks source link

Support for paste keyevent input #34

Open scottjasso opened 1 year ago

scottjasso commented 1 year ago

We're trying to add some functionality to support pasting into the emulator. We can get and set the clipboard via the existing gRPC APIs, but I can't figure out how to get the device to actually paste the clipboard content. With adb, this works with adb shell input keyevent 279, but using the sendKey(KeyboardEvent) api, neither key: "Paste" or keycode: 279 work. (https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#editing_keys)

Is there some way we can force the device to paste (and cut and copy) via the existing gRPC interface?