20231124给RK3399的挖掘机开发板在Andorid10下加鼠标右键返回

20231124给RK3399的挖掘机开发板在Andorid10下加鼠标右键返回

2023/11/24 12:19

百度:RK3399 Android10 右键返回

https://blog.csdn.net/danhu/article/details/122467256

android9/android10 鼠标右键返回(已验证)

danhu 于 2022-01-13 09:46:42 发布

android10 鼠标右键返回

基于RK3399 官方SDK验证。

android9和android10的修改方法一致,和android11的修改位置不同。

具体修改如下:

Z:\10\frameworks\native\services\inputflinger\InputReader.cpp

frameworks/native/services/inputflinger/InputReader.cpp

diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp

index 8a66fc735a..d5e69289da 100755

--- a/services/inputflinger/InputReader.cpp

+++ b/services/inputflinger/InputReader.cpp

@@ -1377,7 +1377,7 @@ uint32_t CursorButtonAccumulator::getButtonState() const {

if (mBtnRight) {

char targetProduct[PROPERTY_VALUE_MAX] = {0};

property_get("ro.target.product", targetProduct, "");

  • if (strcmp(targetProduct, "box") == 0 || strcmp(targetProduct, "atv") == 0) {
  • if (strcmp(targetProduct, "box") == 0 || strcmp(targetProduct, "atv") == 0 || strcmp(targetProduct,"tablet") == 0) {

result |= AMOTION_EVENT_BUTTON_BACK;

} else {

result |= AMOTION_EVENT_BUTTON_SECONDARY;

参考:

https://blog.csdn.net/danhu/article/details/122454155

android11 鼠标右键返回

参考资料:

https://codeleading.com/article/91592662978/

android9 3288 鼠标右键返回

技术标签: rk3288

--- a/frameworks/native/services/inputflinger/InputReader.cpp

+++ b/frameworks/native/services/inputflinger/InputReader.cpp

@@ -1433,13 +1433,7 @@ uint32_t CursorButtonAccumulator::getButtonState() const {

result |= AMOTION_EVENT_BUTTON_PRIMARY;

}

if (mBtnRight) {

  • char targetProduct[PROPERTY_VALUE_MAX] = {0};

  • property_get("ro.target.product", targetProduct, "");

  • if (strcmp(targetProduct, "box") == 0 || strcmp(targetProduct, "atv") == 0) {

result |= AMOTION_EVENT_BUTTON_BACK;

  • } else {

  • result |= AMOTION_EVENT_BUTTON_SECONDARY;

  • }

}

if (mBtnMiddle) {

result |= AMOTION_EVENT_BUTTON_TERTIARY;

https://blog.csdn.net/qq_38312843/article/details/125234114

RK3588-android12《鼠标右键改为返回功能》

要不要买菜!

于 2022-06-11 14:07:58 发布

修改:frameworks/native/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp

1

diff --git a/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp b/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp

index 168b0a7..01be174 100644

--- a/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp

+++ b/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp

@@ -110,7 +110,7 @@ uint32_t CursorButtonAccumulator::getButtonState() const {

if (strcmp(targetProduct, "box") == 0 || strcmp(targetProduct, "atv") == 0) {

result |= AMOTION_EVENT_BUTTON_BACK;

} else {

  • result |= AMOTION_EVENT_BUTTON_SECONDARY;
  • result |= AMOTION_EVENT_BUTTON_BACK;

}

}

if (mBtnMiddle) {

相关推荐
南棱笑笑生4 天前
20241107给荣品PRO-RK3566开发板刷Rockchip原厂的Android13并配置永不休眠
杂质
南棱笑笑生7 天前
20241105编译荣品的Android13并给荣品PRO-RK3566开发板刷机
杂质
南棱笑笑生7 天前
20241102在荣品PRO-RK3566开发板使用荣品预编译的buildroot通过iperf2测试AP6256的WIFI网速
杂质
南棱笑笑生12 天前
20241028在荣品PRO-RK3566开发板的预置Android13下用iperf3测试AP6256的WIFI网速
杂质
南棱笑笑生14 天前
20241029在荣品PRO-RK3566开发板的预置Android13下用iperf3测试以太网eth0的网速【RTL8211F-CG】
杂质
南棱笑笑生22 天前
20241021给荣品RD-RK3588-AHD开发板刷荣品预编译的Android12之后使用GPStest测试板载GPS
杂质
南棱笑笑生1 个月前
20241004给荣品RD-RK3588-AHD开发板刷Rockchip原厂的Android12【HDMI0显示】
杂质
南棱笑笑生2 个月前
20240921在友善之臂的NanoPC-T6开发板上使用Rockchip原厂的Android12适配宸芯的数传模块CX6602N
杂质
南棱笑笑生2 个月前
20240907在友善之臂的NanoPC-T6开发板使用Rockchip原厂的Buildroot点亮imx415
杂质
南棱笑笑生3 个月前
20240731在WIN10下数框框的方法【CPU】
杂质