Skip to content Skip to sidebar Skip to footer

Ho Do I Capture Ctrl + Click On Macos With D3js

I got a report that my script which should trigger on ctrl + click does not work on Mac. Like shown in 'Determine if Shift key is pressed during mousedown event' we can determine i

Solution 1:

You can check this in the following way:

if (d3.event.ctrlKey || d3.event.metaKey) {
    alert("Mouse + Ctrl pressed (or command key for Mac users)");
}

Post a Comment for "Ho Do I Capture Ctrl + Click On Macos With D3js"