does anyone know how to make a modal do something different if i have a key held? This is what i have at the moment:
if event.type == 'MOUSEMOVE':
if event.type == 'LEFT_SHIFT' and event.value == 'PRESS':
self.value = (event.mouse_region_x - self.mouse_x_initial)
print(self.value)
self.value = event.mouse_region_x - self.mouse_x_initial
The
eventparameter has boolean properties forctrl,alt,shiftandoskey. Test these to know if one of the keys is being held at the time of the event.As the boolean properties don't distinguish between left and right keys, you would need to keep a record of the previous event and also check that to know which action to take if you wanted them to work differently.