- you press key — fake virtual finger touches virtual touchscreen
- you unpress key — fake virtual finger untouches virtual touchscreen
- make sure you have android studio
- make sure you have
wish
(packagetk
in opensuse tumbleweed and debian) installed - download
k2t_key_map_table_editor.tcl
- make
k2t_key_map_table_editor.tcl
executable (chmod +x '/path/to/k2t_key_map_table_editor.tcl'
) - run
k2t_key_map_table_editor.tcl
- click
save as
button - click
enable
checkbox - save
maps.k2t
(you can use other file name) to somewhere download libk2t_preload.so
from latest releaseor - create empty directory (I will name it
/tmp/asd
) - download zig-linux-x86_64-*.tar.xz ("*" means any text here) using first link that looks like zig-linux-x86_64-*.tar.xz in https://ziglang.org/download/ into
/tmp/asd
(you can use other directory) - open terminal
cd '/tmp/asd'
- extract zig-linux-x86_64-*.tar.xz:
tar -xJf zig-linux-x86_64-*.tar.xz
- download this repo:
git clone --depth=1 https://github.com/xBZZZZ/k2t.git
cd k2t
- compile
libk2t_preload.so
:./build.sh ../zig-linux-x86_64-*/zig
you now havelibk2t_preload.so
in/tmp/asd/k2t
!- create empty directory (I will name it
- open terminal
cd '/path/to/android sdk directory/emulator/qemu/linux-x86_64'
- rename
qemu-system-x86_64
toqemu-system-x86_64.real
mv qemu-system-x86_64 qemu-system-x86_64.real
- create file
qemu-system-x86_64
:(don't forget to replaceecho -n '#!/usr/bin/sh k2t_key_map_table="/path/to/maps.k2t" \ LD_PRELOAD="/path/to/libk2t_preload.so${LD_PRELOAD:+" $LD_PRELOAD"}" \ exec "$0.real" "$@" ' > qemu-system-x86_64
/path/to
s) - make
qemu-system-x86_64
executable:chmod +x qemu-system-x86_64
- start android virtual device as usual
- press A key, it should simulate touching top left (↖) corner
writing to
maps.k2t
file affects running emulator (exiting and opening emulator not needed)