mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
add INFO button support
This commit is contained in:
parent
3fcc177da5
commit
9950c6147a
3 changed files with 22 additions and 0 deletions
|
|
@ -322,6 +322,7 @@ Each character must be one of the following:
|
|||
- 'b': trigger shortcut BACK (or turn screen on if off)
|
||||
- 'h': trigger shortcut HOME
|
||||
- 's': trigger shortcut APP_SWITCH
|
||||
- 'i': trigger shortcut INFO
|
||||
- 'n': trigger shortcut "expand notification panel"
|
||||
|
||||
Default is 'bhsn:++++' for SDK mouse, and '++++:bhsn' for AOA and UHID.
|
||||
|
|
@ -731,6 +732,10 @@ Click on BACK
|
|||
.B MOD+s
|
||||
Click on APP_SWITCH
|
||||
|
||||
.TP
|
||||
.B MOD+i
|
||||
Click on INFO
|
||||
|
||||
.TP
|
||||
.B MOD+m
|
||||
Click on MENU
|
||||
|
|
|
|||
|
|
@ -603,6 +603,7 @@ static const struct sc_option options[] = {
|
|||
" 'b': trigger shortcut BACK (or turn screen on if off)\n"
|
||||
" 'h': trigger shortcut HOME\n"
|
||||
" 's': trigger shortcut APP_SWITCH\n"
|
||||
" 'i': trigger shortcut INFO\n"
|
||||
" 'n': trigger shortcut \"expand notification panel\"\n"
|
||||
"Default is 'bhsn:++++' for SDK mouse, and '++++:bhsn' for AOA "
|
||||
"and UHID.",
|
||||
|
|
@ -1122,6 +1123,10 @@ static const struct sc_shortcut shortcuts[] = {
|
|||
.shortcuts = { "MOD+s", "4th-click" },
|
||||
.text = "Click on APP_SWITCH",
|
||||
},
|
||||
{
|
||||
.shortcuts = { "MOD+i" },
|
||||
.text = "Click on INFO",
|
||||
},
|
||||
{
|
||||
.shortcuts = { "MOD+m" },
|
||||
.text = "Click on MENU",
|
||||
|
|
@ -2297,6 +2302,9 @@ parse_mouse_binding(char c, enum sc_mouse_binding *b) {
|
|||
case 's':
|
||||
*b = SC_MOUSE_BINDING_APP_SWITCH;
|
||||
return true;
|
||||
case 'i':
|
||||
*b = SC_MOUSE_BINDING_INFO;
|
||||
return true;
|
||||
case 'n':
|
||||
*b = SC_MOUSE_BINDING_EXPAND_NOTIFICATION_PANEL;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,11 @@ action_app_switch(struct sc_input_manager *im, enum sc_action action) {
|
|||
send_keycode(im, AKEYCODE_APP_SWITCH, action, "APP_SWITCH");
|
||||
}
|
||||
|
||||
static inline void
|
||||
action_info(struct sc_input_manager *im, enum sc_action action) {
|
||||
send_keycode(im, AKEYCODE_INFO, action, "INFO");
|
||||
}
|
||||
|
||||
static inline void
|
||||
action_power(struct sc_input_manager *im, enum sc_action action) {
|
||||
send_keycode(im, AKEYCODE_POWER, action, "POWER");
|
||||
|
|
@ -417,6 +422,10 @@ sc_input_manager_process_key(struct sc_input_manager *im,
|
|||
if (im->kp && !shift && !repeat && !paused) {
|
||||
action_app_switch(im, action);
|
||||
}
|
||||
case SDLK_i:
|
||||
if (im->kp && !shift && !repeat && !paused) {
|
||||
action_info(im, action);
|
||||
}
|
||||
return;
|
||||
case SDLK_m:
|
||||
if (im->kp && !shift && !repeat && !paused) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue