MCPcopy Create free account
hub / github.com/brain-workshop/brainworkshop / on_mouse_press

Function on_mouse_press

brainworkshop.py:4415–4427  ·  view source on GitHub ↗
(x, y, button, modifiers)

Source from the content-addressed store, hash-verified

4413# this is where the keyboard keys are defined.
4414@window.event
4415def on_mouse_press(x, y, button, modifiers):
4416 Flag = True
4417 if mode.started:
4418 if len(mode.modalities[mode.mode])==2:
4419 for k in mode.modalities[mode.mode]:
4420 if k == 'arithmetic':
4421 Flag = False
4422 if Flag:
4423 if (button == pyglet.window.mouse.LEFT):
4424 mode.inputs[mode.modalities[mode.mode][0]] = True
4425 elif (button == pyglet.window.mouse.RIGHT):
4426 mode.inputs[mode.modalities[mode.mode][1]] = True
4427 update_input_labels()
4428
4429@window.event
4430def on_key_press(symbol, modifiers):

Callers

nothing calls this directly

Calls 1

update_input_labelsFunction · 0.85

Tested by

no test coverage detected