komo

Komo is a simple and lightweight utility for creating a Spotlight style popup on your website. Hello World.

try this:

1. Press CMD + K or CTRL + K

2. Type in "magic" and press ENTER.

3. Now type in "stop" and press ENTER.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>komo</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jskull/komo@1.x/src/komo.css" />
  </head>
  <body>
    <script src="https://cdn.jsdelivr.net/gh/jskull/komo@1.x/src/komo.min.js"></script>
    <script>
      // Komo({
      //   dark: false, // (Boolean) Dark Mode 
      //   openKey: 75, // (Integer) Key Code (https://keycode.info/)
      //   openKeyModifier: "META||CTRL", // (String) Modifier Key: "CTRL", "SHIFT", "META", "META||CTRL", ""
      // }, callback);
      Komo({}, (command) => {
        switch (command) {
          case "magic":
            setTimeout(function () {
              alert(command);
            }, 1);
            break;
          case "stop":
            setTimeout(function () {
              alert(command);
            }, 1);
            break;
        }
      });
    </script>
  </body>
</html>

github.com/jskull/komo

Created by Johny Rokita