Get started with keymage CDN

ISC licensed

Keymage is a lightweight library for handling keyboard shortcuts in web applications.

Tags:
  • keymage
  • key-binding

Stable version

Copied!

How to start using keymage CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with keymage CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/keymage/1.1.3/keymage.min.js"></script>
  <style>
    #myInput { width: 300px; }
  </style>
</head>
<body>
  <input id="myInput" type="text" autocomplete="off" />

  <script>
    const input = document.getElementById('myInput');

    keymage(input, {
      list: ['apple', 'banana', 'cherry', 'date', 'elderberry'],
      onSelect: function(item) {
        input.value = item;
      }
    });
  </script>
</body>
</html>
Copied!
Copied!

All versions