Support USB HID over AoAv2 mode for keyboard input
This provides a better input experience via simulate physical keyboard, it converts SDL_KeyboardEvent to proper HID events and send it via HID over AoAv2. This is a rewriting and bugfix of the origin code from [@amosbird](https://github.com/amosbird). Make sdl_keymod_to_hid_modifiers() more readable Support MOD keys in HID mode Enable Ctrl+V on HID mode Support to send media events from hid_keyboard Use existing --serial to replace --usb Use explict option for input mode Move HID keyboard setup code into functions Send HID events in separated thread Let libusb handle max package size Fix HID keyboard report desc
This commit is contained in:
committed by
Romain Vimont
parent
a52779ae6b
commit
874a4967a4
18
app/scrcpy.1
18
app/scrcpy.1
@@ -82,6 +82,24 @@ Start in fullscreen.
|
||||
.B \-h, \-\-help
|
||||
Print this help.
|
||||
|
||||
.TP
|
||||
.B \-K, \-\-keyboard\-hid
|
||||
Simulate a physical keyboard by using HID over AOAv2.
|
||||
|
||||
This provides a better experience for IME users, and allows to generate non-ASCII characters, contrary to the default injection method.
|
||||
|
||||
It may only work over USB, and is currently only supported on Linux.
|
||||
|
||||
.TP
|
||||
.B \-i, \-\-input\-mode mode
|
||||
Select input mode for keyboard events.
|
||||
|
||||
Possible values are "hid" and "inject".
|
||||
|
||||
"hid" uses Android's USB HID over AOAv2 feature to simulate physical keyboard's events, which provides better experience for IME users if supported by you device.
|
||||
|
||||
"inject" is the legacy scrcpy way by injecting keycode events on Android, works on most devices and is the default.
|
||||
|
||||
.TP
|
||||
.B \-\-legacy\-paste
|
||||
Inject computer clipboard text as a sequence of key events on Ctrl+v (like MOD+Shift+v).
|
||||
|
||||
Reference in New Issue
Block a user