Modifier keys and mouse events


I’d like to be able to distinguish whether some of my graphical objects are simply clicked or (shift-clicked) or (ctrl-clicked). How can I do that ?



Currently you can distinguish Shift+clicked event by verifyingif (event == 7) { // Shift key is pressed and left mouse button is down }In my knowledge, this is hard coded in TCanvas::HandleEvent method. As a small example please find the modified macro exec3.C from ROOT tutorials.

Cheers, Ilka
exec3.C (901 Bytes)