Genymobile / Genymobile/scrcpy
Need shortcut keys on main build for screen density,screen orientation and app specific touches. I made it to work but its not optimized
- Dominant language
- C
- Stars
- 150k
- Forks
- 13.7k
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 2
Description
Well here is a gist of what this is about. I am on ubuntu and run scrcpy on different workspace like this:

I am a newbie on c programming but i found a way to make shortcut key work for changing screen density and screen orientation. But, the code is not optimized to set it up on pull request.
Here is the code that make it work for shortcut keys:
Ctrl+q = Change screen density to 200
Ctrl+w = Reset screen density
Ctrl+e = landscape mode
Ctrl+r = portrait mode
Here the code:
https://files.catbox.moe/c8lz87.c
Place input_manager.c inside project-> app--src folder and build it using
ninja -Cx
./run x
Can someone work on this for making touches specific to apps(the issue is its tapping for every app):
Example in input_manager.c :
```c
case SDLK_a:
// capture ctrl+a and then see if playstore is opened so input is only triggered for that key
const char *const adb_cmdp[] = {
"shell", "input", "pidof", "com.google.playstore"
};//"com.google.playstore" is an example dont want it for playstore but other app
process_t play_store = adb_execute(NULL, adb_cmdp, ARRAY_LEN(adb_cmdp));
if(play_store){
LOGI("Play store is opened")
if (control && cmd && !shift && down) {
LOGI("Touching screeny");
const char *const adb_cmd[] = {
"shell", "input", "tap", "200", "1000"
};
adb_execute(NULL, adb_cmd, ARRAY_LEN(adb_cmd));
}
}
return;
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.