Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

组合键如何实现呢? #12

Open
zhangxichao opened this issue Apr 16, 2020 · 2 comments
Open

组合键如何实现呢? #12

zhangxichao opened this issue Apr 16, 2020 · 2 comments

Comments

@zhangxichao
Copy link

No description provided.

@Michael-Cui-Han
Copy link

可以试着把所有按键当成是一个按键,用一个32位的数值作为按键值,每一位表示一个按键,1代表按下,0代表松开,比如0x3就代表只有1,2两个按键被按下。这样组合键,独立按键就可以统一起来了。数据结构要重新定义下,不过逻辑没变。

@cctv180
Copy link

cctv180 commented Dec 1, 2021

我给hal_button_Level按键读取函数加了个指针这样就方便处理组合按键了,读取函数是统一的入口,在读取到带有组合键是判断下另外一个是不是按下就行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants