在kivy中从on_touch_down检查按下的键盘键

时间:2019-03-19 12:45:06

标签: keyboard kivy mouse

我知道有些方法from kivy.app import App from kivy.uix.label import Label from kivy.uix.gridlayout import GridLayout from kivy.uix.textinput import TextInput class MyGrid(GridLayout): def __init__(self, **kwargs): super(MyGrid, self).__init__(**kwargs) self.cols = 2 self.add_widget(Label(text="Name: ")) self.name = TextInput(multiline=False) self.add_widget(self.name) self.add_widget(Label(text="last name : ")) self.lastName = TextInput(multiline=False) self.add_widget(self.lastName) self.add_widget(Label(text="email: ")) self.emailName = TextInput(multiline=False) self.add_widget(self.emailName) class MyApp(App): def build(self): return MyGrid() if __name__ == '__main__': MyApp().run() 报告已按下的键。有没有其他方法可以检查键盘状态?我想区分on_keyboard_down内部的修饰键按下,该键由鼠标调用以使用诸如“ Ctrl +鼠标左键”等事件。

0 个答案:

没有答案