Tested against some Android emulators and Kali Linux (on Virtual Box)
https://android.googlesource.com/platform/system/core.git/+/android-4.2.2_r1/toolbox/getevent.c
g++ -std=c++2a -O3 -g0 ./geteventall.cpp
./a.out 1920 1080 # exe screen_width screen_height