bcf5a9750f
This will allow to provide alternative key processors.
30 lines
724 B
C
30 lines
724 B
C
#ifndef SC_KEYBOARD_INJECT_H
|
|
#define SC_KEYBOARD_INJECT_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "controller.h"
|
|
#include "scrcpy.h"
|
|
#include "trait/key_processor.h"
|
|
|
|
struct sc_keyboard_inject {
|
|
struct sc_key_processor key_processor; // key processor trait
|
|
|
|
struct controller *controller;
|
|
|
|
// SDL reports repeated events as a boolean, but Android expects the actual
|
|
// number of repetitions. This variable keeps track of the count.
|
|
unsigned repeat;
|
|
|
|
bool prefer_text;
|
|
bool forward_key_repeat;
|
|
};
|
|
|
|
void
|
|
sc_keyboard_inject_init(struct sc_keyboard_inject *ki,
|
|
struct controller *controller,
|
|
const struct scrcpy_options *options);
|
|
|
|
#endif
|