使用evtest工具测试输入事件时,我无法获得鼠标移动事件.
我刚刚得到三个鼠标事件:
left click event: type = EV_KEY, code = 272 (LeftBtn), value=1/0
right click event: type = EV_KEY, code = 273 (RightBtn), value = 1/0
mouse wheel event: type = EV_REL, code = 8 (Wheel), value = -1
Run Code Online (Sandbox Code Playgroud)
没有鼠标移动事件.那么我的鼠标移动事件以及如何捕获它?
PS:测试上Ubuntu 11.04,并Gentoo在VirtualBox中,除了在VirtualBox中-4安装.
我无法使用NDK工具链调试本机程序.以下是我的详细步骤和输出.
环境设定:
NDK_ROOT=/opt/android/ndk
SYSROOT=$NDK_ROOT/platforms/android-8/arch-arm
TOOLCHAIN=$NDK_ROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
PATH=$TOOLCHAIN:$NDK_ROOT:$PATH
Run Code Online (Sandbox Code Playgroud)
来源:hello.c
1 #include <stdio.h>
2
3 int main() {
4 printf("Hello World!\n");
5 return 0;
6 }
Run Code Online (Sandbox Code Playgroud)
由NDK提供的独立工具链构建.
#arm-linux-androideabi-gcc -g hello.c -o hello --sysroot $SYSROOT
Run Code Online (Sandbox Code Playgroud)
推送到模拟器并启动gdbserver(我已转发端口)
#adb push hello /data/hello
#adb shell gdbserver 10.0.2.15:10000 /data/hello
Run Code Online (Sandbox Code Playgroud)
在另一个终端远程调试:
#arm-linux-androideabi-gdb
#(gdb) target remote localhost:10000
Remote debugging using :10000
0xb0001000 in ?? () ------------------------------------what is this?
#(gdb) symbol-file hello
Reading symbols from hello...done.
#(gdb) l
1 #include <stdio.h>
2
3 int main() {
4 printf("Hello World!\n");
5 return …Run Code Online (Sandbox Code Playgroud)