Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches

Control messages for screen management and connection maintenance. More...

Collaboration diagram for Command Messages:

Variables

const char *const kMsgCNoop
 No operation command.
const char *const kMsgCClose
 Close connection command.
const char *const kMsgCEnter
 Enter screen command.
const char *const kMsgCLeave
 Leave screen command.
const char *const kMsgCClipboard
 Clipboard grab notification.
const char *const kMsgCScreenSaver
 Screensaver state change.
const char *const kMsgCResetOptions
 Reset options command.
const char *const kMsgCInfoAck
 Screen information acknowledgment.
const char *const kMsgCKeepAlive
 Keep-alive message.

Detailed Description

Control messages for screen management and connection maintenance.

Variable Documentation

◆ kMsgCClipboard

const char* const kMsgCClipboard
extern

Clipboard grab notification.

Message Code: "CCLP" Direction: Primary ↔ Secondary Format: "CCLP%1i%4i" Parameters:

  • $1: Clipboard identifier (1 byte)
  • $2: Sequence number (4 bytes)

Example:

Primary clipboard grabbed, sequence 1

"CCLP\x00\x00\x00\x00\x01"

Sent when an application grabs a clipboard on either screen. This notifies the other screen that clipboard ownership has changed. Secondary screens must use the sequence number from the most recent kMsgCEnter. The primary always sends sequence number 0.

Clipboard Identifiers:

  • 0: Primary clipboard (Ctrl+C/Ctrl+V)
  • 1: Selection clipboard (middle-click on X11)
See also
kMsgDClipboard
Since
Protocol version 1.0

◆ kMsgCClose

const char* const kMsgCClose
extern

Close connection command.

Message Code: "CBYE" Direction: Primary → Secondary Format: No parameters

Instructs the client to close the connection gracefully. The client should clean up resources and disconnect.

Since
Protocol version 1.0

◆ kMsgCEnter

const char* const kMsgCEnter
extern

Enter screen command.

Message Code: "CINN" Direction: Primary → Secondary Format: "CINN%2i%2i%4i%2i" Parameters:

  • $1: Entry X coordinate (2 bytes, signed)
  • $2: Entry Y coordinate (2 bytes, signed)
  • $3: Sequence number (4 bytes, unsigned)
  • $4: Modifier key mask (2 bytes, unsigned)

Example:

Enter at (400, 300), sequence 1, no modifiers

"CINN\x01\x90\x01\x2C\x00\x00\x00\x01\x00\x00"

Sent when the mouse cursor enters the secondary screen from the primary. The coordinates specify the exact entry point. The sequence number is used to order messages and must be returned in subsequent messages from the client. The modifier mask indicates which toggle keys (Caps Lock, Num Lock, etc.) are active and should be synchronized on the secondary screen.

See also
kMsgCLeave
Since
Protocol version 1.0

◆ kMsgCInfoAck

const char* const kMsgCInfoAck
extern

Screen information acknowledgment.

Message Code: "CIAK" Direction: Primary → Secondary Format: No parameters

Sent by the primary in response to a secondary screen's kMsgDInfo message. This acknowledgment is sent for every kMsgDInfo, whether or not the primary had previously sent a kMsgQInfo query.

See also
kMsgDInfo, kMsgQInfo
Since
Protocol version 1.0

◆ kMsgCKeepAlive

const char* const kMsgCKeepAlive
extern

Keep-alive message.

Message Code: "CALV" Direction: Primary ↔ Secondary Format: No parameters

Sent periodically by the server to verify that connections are still active. Clients must reply with the same message upon receipt.

Timing:

  • Default interval: 3 seconds (configurable)
  • Timeout: 3 missed messages trigger disconnection

Behavior:

  • Server sends keep-alive to client
  • Client immediately responds with keep-alive back to server
  • If server doesn't receive response within timeout, it disconnects client
  • If client doesn't receive keep-alives, it should disconnect from server
See also
kKeepAliveRate, kKeepAlivesUntilDeath
Since
Protocol version 1.3

◆ kMsgCLeave

const char* const kMsgCLeave
extern

Leave screen command.

Message Code: "COUT" Direction: Primary → Secondary Format: No parameters

Sent when the mouse cursor leaves the secondary screen and returns to the primary. Upon receiving this message, the secondary screen should:

  1. Send clipboard data for any clipboards it has grabbed
  2. Only send clipboards that have changed since the last leave
  3. Use the sequence number from the most recent kMsgCEnter
See also
kMsgCEnter, kMsgCClipboard
Since
Protocol version 1.0

◆ kMsgCNoop

const char* const kMsgCNoop
extern

No operation command.

Message Code: "CNOP" Direction: Secondary → Primary Format: No parameters

A no-operation message that can be used for testing connectivity or as a placeholder. Has no effect on the receiving end.

Since
Protocol version 1.0

◆ kMsgCResetOptions

const char* const kMsgCResetOptions
extern

Reset options command.

Message Code: "CROP" Direction: Primary → Secondary Format: No parameters

Instructs the client to reset all of its options to their default values. This is typically sent when the server configuration changes.

See also
kMsgDSetOptions
Since
Protocol version 1.0

◆ kMsgCScreenSaver

const char* const kMsgCScreenSaver
extern

Screensaver state change.

Message Code: "CSEC" Direction: Primary → Secondary Format: "CSEC%1i" Parameters:

  • $1: Screensaver state (1 byte): 1 = started, 0 = stopped Examples:

Screensaver started

"CSEC\x01"

Screensaver stopped

"CSEC\x00"

Notifies the secondary screen when the primary's screensaver starts or stops. The secondary can use this to synchronize its own screensaver state.

Since
Protocol version 1.0