mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 10:19:17 +02:00
refactor(scrcpy): rewrite option classes to improve tree-shaking
This commit is contained in:
parent
db8466f6ee
commit
92472007db
218 changed files with 5412 additions and 2380 deletions
23
libraries/scrcpy/src/control/inject-key-code.ts
Normal file
23
libraries/scrcpy/src/control/inject-key-code.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import type { StructInit } from "@yume-chan/struct";
|
||||
import { struct, u32, u8 } from "@yume-chan/struct";
|
||||
|
||||
import type {
|
||||
AndroidKeyCode,
|
||||
AndroidKeyEventAction,
|
||||
AndroidKeyEventMeta,
|
||||
} from "../android/index.js";
|
||||
|
||||
export const ScrcpyInjectKeyCodeControlMessage = struct(
|
||||
{
|
||||
type: u8,
|
||||
action: u8<AndroidKeyEventAction>(),
|
||||
keyCode: u32<AndroidKeyCode>(),
|
||||
repeat: u32,
|
||||
metaState: u32<AndroidKeyEventMeta>(),
|
||||
},
|
||||
{ littleEndian: false },
|
||||
);
|
||||
|
||||
export type ScrcpyInjectKeyCodeControlMessage = StructInit<
|
||||
typeof ScrcpyInjectKeyCodeControlMessage
|
||||
>;
|
Loading…
Add table
Add a link
Reference in a new issue