当前位置: 首页 > article >正文

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) {


http://www.kler.cn/a/147247.html

相关文章:

  • 另外一种缓冲式图片组件的用法
  • 华为开源自研AI框架昇思MindSpore应用案例:人体关键点检测模型Lite-HRNet
  • 什么是 C++ 内联函数?它的作用是什么?
  • 【动手学深度学习Pytorch】1. 线性回归代码
  • 基于opencv制作GUI界面
  • docker启动训练容器教程
  • vue中的keep-alive详解与应用场景
  • 【React】useReducer
  • OpenCvSharp从入门到实践-(03)像素
  • 搭建web服务器
  • Android 单元测试初体验
  • shell_exec 和 exec区别
  • 机器学习——多元线性回归升维
  • HarmonyOS 数据持久化 Preferences 如何在页面中对数据进行读写
  • leetcode做题笔记828. 统计子串中的唯一字符
  • C 中的指针 - 数组和字符串
  • 红黑树(万字图文详解)
  • VUE项目部署过程中遇到的错误:POST http://124.60.11.183:9090/test/login 405 (Not Allowed)
  • WSL2编译内核并更改替换内核版本
  • 安陆FPGA调试中遇到的问题总结
  • 过渡曲线的构造之平面PH曲线
  • oracle数据库巡检常见脚本-系列二
  • Ubuntu 23.10 服务器版本 ifconfig 查不到网卡 ip(已解决)
  • 【LeetCode】挑战100天 Day16(热题+面试经典150题)
  • ElasticSearch之虚拟内存
  • c++日志单例实现