Skip to content

input_sync()

Purpose

Synchronizes an input event frame and notifies user space that a complete set of input events is ready.

#include <linux/input.h>

Prototype

void input_sync(struct input_dev *dev);

Parameters

  • dev: input device.

Return Value

None.

Minimal Example

input_report_key(input, KEY_ENTER, pressed);
input_sync(input);

Common Pitfalls

  • Forgetting input_sync() can make user-space tools such as evtest appear not to receive complete events.
  • Group related event reports before one sync when reporting a logical frame.