用按压键盘键检测点击
我正在尝试实现桌面应用程序的列表视图,该应用程序能够多选择项目。在桌面上,我们通过单击项目或单击并持有控制键来做到这一点。要选择一个项目,您只需添加墨水或eSturerocgognizer,但是如何在单击时检测到也有控制键?我找不到任何建议
I am trying to implement a ListView for Desktop applications, which is able to multiselect the items. On Desktop we do this by either clicking an item, or clicking and holding the control key. To select an item, you simply can add an Inkwell or GestureRecognizer, but how do I detect on click that there is also the control key pressed? I couldn't find any suggestions
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以玩这个小部件。确保以桌面模式运行。
我们需要听键盘事件。为此,我正在使用
rawKeyboardListener
。保持跟踪
ctrl
事件通过清除以前的选定项目在正常点击中进行单个选择,但是
_isctrlpressed
不要清除所选项目演示小部件
You can play with this widget. Make sure to run as desktop mode.
we need to listen keyboard event. For that I am using
RawKeyboardListener
.keep track
ctrl
eventsingle selection happen on normal tap by clearing previous selected item, but while
_isCTRLPressed
don't clear the selected itemsDemo widget