1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > MTK6757的OTG线连接鼠标后 鼠标右键改为返回功能

MTK6757的OTG线连接鼠标后 鼠标右键改为返回功能

时间:2024-02-21 19:42:09

相关推荐

MTK6757的OTG线连接鼠标后 鼠标右键改为返回功能

找到如下路径:

\frameworks\native\services\inputflinger\InputReader.cpp

找到如下函数:

uint32_t CursorButtonAccumulator::getButtonState() const {

uint32_t result = 0;

if (mBtnLeft) {

result |= AMOTION_EVENT_BUTTON_PRIMARY;

}

if (mBtnRight) {

//屏蔽如下原有代码

//result |= AMOTION_EVENT_BUTTON_SECONDARY;

//添加如下代码实现鼠标右键返回功能

result |= AMOTION_EVENT_BUTTON_BACK;

}

if (mBtnMiddle) {

result |= AMOTION_EVENT_BUTTON_TERTIARY;

}

if (mBtnBack || mBtnSide) {

result |= AMOTION_EVENT_BUTTON_BACK;

}

if (mBtnForward || mBtnExtra) {

result |= AMOTION_EVENT_BUTTON_FORWARD;

}

return result;

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。