Detect double Ctrl keypress in JS
This should work. Maybe add some further checking if not some other key like Alt or Shift are pressed at the same time. Hope it is self explanatory, if not just ask and I provide clarification.
var dblCtrlKey = 0;
Event.observe(document, 'keydown', function(event) {
if (dblCtrlKey != 0 && event.keyCode == 17) {
alert("Ok double ctrl");
} else {
dblCtrlKey = setTimeout('dblCtrlKey = 0;', 300);
}
});