Perspective Table onRowClick AND onKeyDown

Anyone know of a way to detect if a key is being held down when clicking a table row? I want to perform different actions based on whether the row was clicked with the ctrl button held down or not.

Not directly within the context of the Event, but you could configure a separate OnKeyDown Event to write to a custom property, and then reference that custom property within the onRowClick Event.

if self.custom.ctrlKeyIsHeld:
    # do something

Just make sure that you include an appropriate onKeyUp Event to “reset” the custom property.

2 Likes

I like that! Thank you.

1 Like

Hi. Is this still working on version 8.1.39 (b2024040909)? i couldn't manage to get neither the onKeyDown nor the onKeyUp triggered.
They seems to be triggered only when editing a cell value; Not quit helpfull for the scenario.
For me, information if keys like ctrl, shift ,Alt were hold when clicking or not, should have been part of the OnRowClick event object.