mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-28 11:49:10 +00:00
Customize shortcut modifier
Add --shortcut-mod, and use Alt as default modifier. This paves the way to forward the Ctrl key to the device.
This commit is contained in:
parent
63cb93d7d7
commit
1b76d9fd78
10 changed files with 392 additions and 109 deletions
|
@ -3,12 +3,15 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
#include "controller.h"
|
||||
#include "fps_counter.h"
|
||||
#include "video_buffer.h"
|
||||
#include "scrcpy.h"
|
||||
#include "screen.h"
|
||||
#include "video_buffer.h"
|
||||
|
||||
struct input_manager {
|
||||
struct controller *controller;
|
||||
|
@ -20,8 +23,17 @@ struct input_manager {
|
|||
unsigned repeat;
|
||||
|
||||
bool prefer_text;
|
||||
|
||||
struct {
|
||||
unsigned data[SC_MAX_SHORTCUT_MODS];
|
||||
unsigned count;
|
||||
} sdl_shortcut_mods;
|
||||
};
|
||||
|
||||
void
|
||||
input_manager_init(struct input_manager *im, bool prefer_text,
|
||||
const struct sc_shortcut_mods *shortcut_mods);
|
||||
|
||||
void
|
||||
input_manager_process_text_input(struct input_manager *im,
|
||||
const SDL_TextInputEvent *event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue