score:3

Accepted answer

If you take a look the source code you'll see that it stores the event on event.browserEvent.
It's a fixed bug: https://github.com/highslide-software/highcharts.com/pull/992

So, why you have to use event.browserEvent instead of window.event ?
Simple, because window.event doesn't exist in Firefox.

legendItemClick: function(e) {
    var visibility = this.visible ? 'visible' : 'hidden';

    if (!e.browserEvent.ctrlKey) {
        if (!confirm('The series is currently '+ 
            visibility +'. Do you want to change that?')) {
            return false;
        }
    }
}

demo

Source code - relevant code:

.on('click', function (event) {
    var strLegendItemClick = 'legendItemClick',
        fnLegendItemClick = function () {
            item.setVisible();
        };

    // Pass over the click/touch event. #4.
    event = {
        browserEvent: event                  // < -- here is the magic
    };

    // click the name or symbol
    if (item.firePointEvent) { // point
        item.firePointEvent(strLegendItemClick, event, fnLegendItemClick);
    } else {
        fireEvent(item, strLegendItemClick, event, fnLegendItemClick);
    }
});

score:0

you can use something like this:

                var evtobj = window.event ? event : e;
                if (evtobj.shiftKey) {
                    //do something
                } else {
                   //other things
                }

This will work in Chrome, IE and firefox.


Related Query

More Query from same tag