You can use the contextmenu event to detect right-clicks, as described in an earlier answer. Another way to detect right clicks is with jquery event.which :
clickTree: function(e) { if (event.which === 3) {
For long clicks that also measure click duration, use mouseup and mousedown :
events: { 'mousedown .measure-click-duration': 'clickStarted', 'mouseup .measure-click-duration': 'clickEnded' }, clickStarted: function(e) { this.clickStartTime = e.timeStamp; }, clickEnded: function(e) { var clickDuration = e.timeStamp - this.clickStarted; if (clickDuration > 1000) { this.longClick(e); } }
I did a fiddle , demonstrating contextmenu for right clicks and the duration of the click described above.
jakee source share