bit-twiddler 0.1.0

Cross-platform developer toolbox: bit manipulation, hashing, YAML/JSON/SQL, QR, Markdown, cron, and 40+ more tools — Tauri v2, no Node.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  // KEYBOARD SHORTCUTS — Cmd/Ctrl + 1–9 to jump to tools
  // ============================================================
  window.navTargets = window.$navLinks.map(function() { return $(this).data('target'); }).get();

  $(document).on('keydown', function(e) {
    if ((e.metaKey || e.ctrlKey) && !e.shiftKey && !e.altKey) {
      const num = parseInt(e.key);
      if (num >= 1 && num <= 9 && num <= window.navTargets.length) {
        e.preventDefault();
        window.updateActiveNav(window.navTargets[num - 1]);
      }
    }
  });

  // ============================================================