Skip to content

Commit

Permalink
clipboard bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
BHznJNs committed Nov 15, 2024
1 parent 2e7913a commit bb59907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scrcpy_client/clipboard_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ class SetClipboardEvent:
msg_type: ControlMsgType = ControlMsgType.MSG_TYPE_SET_CLIPBOARD
sequence: int = 0 # 8
paste: int = 0 # 1
text: bytes
text: bytes # length: 4

def __init__(self, text: str) -> None:
self.text = bytes(text, encoding="utf-8")

def serialize(self) -> bytes:
buf = struct.pack(
">BQIB",
">BQBI",
self.msg_type.value,
self.sequence,
self.paste,
Expand Down

0 comments on commit bb59907

Please sign in to comment.