InputEvent记录

  • 鼠标事件的position,以左上角为原点(0,0),右下角为分辨率*缩放
  • 绑定事件的按键,用event.is_action_pressed("move_right")
类型输入log.info(InputEvent)
键盘AInputEventKey: keycode=65 (A), mods=none, physical=false, location=unspecified, pressed=true, echo=false → pressed=false
鼠标左键单击InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((365, 253)), button_mask=1, double_click=false
InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((365, 255)), button_mask=0, double_click=false
左键双击InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((359, 259)), button_mask=1, double_click=false
InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((359, 259)), button_mask=0, double_click=false
InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((359, 259)), button_mask=1, double_click=true
InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((359, 259)), button_mask=0, double_click=false
右键单击InputEventMouseButton: button_index=2, mods=none, pressed=true, canceled=false, position=((409, 292)), button_mask=2, double_click=false
InputEventMouseButton: button_index=2, mods=none, pressed=false, canceled=false, position=((409, 292)), button_mask=0, double_click=false
移动InputEventMouseMotion: button_mask=0, position=((667, 255)), relative=((83, 6)), velocity=((-14.08773, 0)), pressure=0.00, tilt=((0, 0)), pen_inverted=(false)
滚轮上推InputEventMouseButton: button_index=4, mods=none, pressed=true, canceled=false, position=((355, 365)), button_mask=8, double_click=false
InputEventMouseButton: button_index=4, mods=none, pressed=false, canceled=false, position=((355, 365)), button_mask=0, double_click=false
滚轮下推InputEventMouseButton: button_index=5, mods=none, pressed=true, canceled=false, position=((355, 365)), button_mask=8, double_click=false
InputEventMouseButton: button_index=5, mods=none, pressed=false, canceled=false, position=((345, 188)), button_mask=0, double_click=false
触摸屏单指点击InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((154, 272)), button_mask=1, double_click=false
InputEventScreenTouch: index=7, pressed=true, canceled=false, position=((154, 272)), double_tap=false
InputEventScreenDrag: index=7, position=((155, 273)), relative=((1, 1)), velocity=((6.621859, 6.621859)), pressure=0.00, tilt=((0, 0)), pen_inverted=(false)
InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((156, 273)), button_mask=0, double_click=false
InputEventScreenTouch: index=7, pressed=false, canceled=false, position=((156, 273)), double_tap=false
单指双击InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((1130, 727)), button_mask=1, double_click=false
InputEventScreenTouch: index=24, pressed=true, canceled=false, position=((1130, 727)), double_tap=false
InputEventScreenDrag: index=24, position=((1128, 728)), relative=((-2, 1)), velocity=((0, 0)), pressure=0.00, tilt=((0, 0)), pen_inverted=(false)
InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((1119, 729)), button_mask=0, double_click=false
InputEventScreenTouch: index=24, pressed=false, canceled=false, position=((1119, 729)), double_tap=false
InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((1097, 740)), button_mask=1, double_click=false
InputEventScreenTouch: index=25, pressed=true, canceled=false, position=((1097, 740)), double_tap=false
InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((1130, 727)), button_mask=1, double_click=true
InputEventScreenDrag: index=25, position=((1097, 741)), relative=((0, 1)), velocity=((0, 0)), pressure=0.00, tilt=((0, 0)), pen_inverted=(false)
InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((1097, 741)), button_mask=0, double_click=false
InputEventScreenTouch: index=25, pressed=false, canceled=false, position=((1097, 741)), double_tap=false
InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((728, -53)), button_mask=1, double_click=false
InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((728, -53)), button_mask=0, double_click=false
双指单击InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((969, 646)), button_mask=1, double_click=false
InputEventScreenTouch: index=20, pressed=true, canceled=false, position=((969, 646)), double_tap=false
InputEventScreenTouch: index=21, pressed=true, canceled=false, position=((1623, 770)), double_tap=false
InputEventScreenDrag: index=21, position=((1624, 770)), relative=((1, 0)), velocity=((0, 0)), pressure=0.00, tilt=((0, 0)), pen_inverted=(false)
InputEventScreenDrag: index=20, position=((968, 644)), relative=((-1, -2)), velocity=((-7.480215, -14.96043)), pressure=0.00, tilt=((0, 0)), pen_inverted=(false)
InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((967, 642)), button_mask=0, double_click=false
InputEventScreenTouch: index=20, pressed=false, canceled=false, position=((967, 642)), double_tap=false
InputEventScreenTouch: index=21, pressed=false, canceled=false, position=((1623, 768)), double_tap=false
手柄左杆左摇InputEventJoypadMotion: axis=0, axis_value=-1.00,InputEventJoypadMotion: axis=1, axis_value=-0.02
左杆上摇InputEventJoypadMotion: axis=1, axis_value=-1.00,InputEventJoypadMotion: axis=0, axis_value=0.01
左杆下摇InputEventJoypadMotion: axis=1, axis_value=1.00,InputEventJoypadMotion: axis=0, axis_value=0.01
左杆右摇InputEventJoypadMotion: axis=0, axis_value=1.00,InputEventJoypadMotion: axis=-1, axis_value=-0.02
左键InputEventJoypadButton: button_index=13, pressed=true, pressure=0.00 → pressed=false
上键InputEventJoypadButton: button_index=11, pressed=true, pressure=0.00
下键InputEventJoypadButton: button_index=12, pressed=true, pressure=0.00
右键InputEventJoypadButton: button_index=14, pressed=true, pressure=0.00
肩键L1InputEventJoypadButton: button_index=9, pressed=true, pressure=0.00
肩键L2InputEventJoypadMotion: axis=4, axis_value=0.77
右杆左摇InputEventJoypadMotion: axis=2, axis_value=-1.00,InputEventJoypadMotion: axis=3, axis_value=0.03
右杆右摇InputEventJoypadMotion: axis=2, axis_value=0.61,InputEventJoypadMotion: axis=3, axis_value=0.03
右杆上摇InputEventJoypadMotion: axis=3, axis_value=-1.00,InputEventJoypadMotion: axis=2, axis_value=0.00
右杆下摇InputEventJoypadMotion: axis=3, axis_value=0.81,InputEventJoypadMotion: axis=2, axis_value=0.02
X键InputEventJoypadButton: button_index=2, pressed=true, pressure=0.00
Y键InputEventJoypadButton: button_index=3, pressed=true, pressure=0.00
A键InputEventJoypadButton: button_index=0, pressed=true, pressure=0.00
B键InputEventJoypadButton: button_index=1, pressed=true, pressure=0.00
select键InputEventJoypadButton: button_index=4, pressed=true, pressure=0.00
menu键InputEventJoypadButton: button_index=5, pressed=true, pressure=0.00
start键InputEventJoypadButton: button_index=6, pressed=true, pressure=0.00
肩键R1InputEventJoypadButton: button_index=10, pressed=true, pressure=0.00
肩键R2InputEventJoypadMotion: axis=5, axis_value=0.77