// Define keyboard shortcuts for showing and hiding a custom panel.
var { Hotkey } = require("hotkeys");
 
var showHotKey = Hotkey({
  combo: "accel-meta-q",
  onPress: function() {
    console.log("We disbled Meta-Q. You are welcome.");
  }
});

@@ -71,169 +71,592 @@
 r %7B 
-Hotkey %7D = require(%22hotkeys%22);%0A %0Avar showHotKey = Hotkey(%7B%0A  combo: %22accel-meta-q%22,%0A  onPress: function() %7B%0A    console.log(%22We disbled Meta-Q. You are welcome.%22
+Cc, Ci %7D = require(%22chrome%22);%0Avar %7B Hotkey %7D = require(%22hotkeys%22);%0Avar notifications = require(%22notifications%22);%0A%0Avar lastQPress = 0;%0A%0Avar showHotKey = Hotkey(%7B%0A  combo: %22accel-meta-q%22,%0A  onPress: function() %7B%0A    // TODO: Make delay configurable%0A    if (lastQPress && (Date.now() - lastQPress) %3C 1000) %7B%0A        Cc%5B'@mozilla.org/toolkit/app-startup;1'%5D%0A            .getService(Ci.nsIAppStartup)%0A            .quit(Ci.nsIAppStartup.eAttemptQuit)%0A    %7D%0A    else %7B%0A        notifications.notify(%7B%0A            text: %22Press Meta-Q again to quit%22%0A        %7D);%0A    %7D%0A    lastQPress = Date.now(
 );%0A 

Change behavior to quit after two Meta-Q presses in under 1s.