npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

keymap-inspector

v0.2.2

Published

Inspect keyboard events and characters across different layouts. Support: https://buymeacoffee.com/moosebro

Readme

🔍 Keymap Inspector

npm version npm downloads

🇺🇸 English | 🇷🇺 Русский | 🇩🇪 Deutsch | 🇫🇷 Français | 🇪🇸 Español | 🇺🇦 Українська | 🇮🇱 עברית


English

Inspect keyboard events and characters across different layouts. Find which physical key corresponds to a character and see what characters are on that key in other keyboard layouts.

🚀 Features

  • 7 keyboard layouts: English, Russian, German, French, Spanish, Ukrainian, Hebrew
  • Bidirectional mapping: Character → Key info, Key code → Characters
  • CLI tool for quick inspections
  • TypeScript support with full type definitions
  • Lightweight: Only 6.5KB package size

📦 Installation

# Install globally for CLI usage
npm install -g keymap-inspector

# Install locally for library usage
npm install keymap-inspector

🖥️ CLI Usage

keymap-inspector a
# Output:
{
  "char": "a",
  "keyDefinition": {
    "key": "a",
    "code": "KeyA",
    "keyCode": 65
  },
  "layouts": {
    "en": "a",
    "ru": "ф",
    "de": "a",
    "fr": "q",
    "es": "a",
    "ua": "ф",
    "he": "ש"
  }
}

📚 Library Usage

Node.js:

import { KeymapInspector, en, ru, de, fr, es, ua, he } from 'keymap-inspector';

const inspector = new KeymapInspector({ en, ru, de, fr, es, ua, he });

// Inspect a character
const result = inspector.inspect('a');
console.log(result);

Browser (ES Modules):

<script type="module">
import { KeymapInspector, en, ru } from 'https://unpkg.com/keymap-inspector@latest/dist/keymap-inspector.browser.js';

const inspector = new KeymapInspector({ en, ru });
const result = inspector.inspect('a');
console.log(result);
</script>

Browser (Script Tag):

<script src="https://unpkg.com/keymap-inspector@latest/dist/keymap-inspector.browser.js"></script>
<script>
const inspector = new KeymapInspector.KeymapInspector({
    en: KeymapInspector.en,
    ru: KeymapInspector.ru
});

// Find by key code
const byCode = inspector.inspectByCode('KeyA');
console.log(byCode);

// Find by keyCode number
const byKeyCode = inspector.inspectByKeyCode(65);
console.log(byKeyCode);
</script>

Русский

Инспектор клавиатурных раскладок. Определяет, какая физическая клавиша соответствует символу, и показывает, какие символы находятся на этой клавише в других раскладках.

🚀 Возможности

  • 7 раскладок клавиатуры: английская, русская, немецкая, французская, испанская, украинская, иврит
  • Двустороннее сопоставление: символ → информация о клавише, код клавиши → символы
  • CLI утилита для быстрых проверок
  • TypeScript поддержка с полными определениями типов
  • Легковесный: размер пакета всего 6.5KB

📦 Установка

# Глобальная установка для CLI
npm install -g keymap-inspector

# Локальная установка для библиотеки
npm install keymap-inspector

🖥️ Использование CLI

keymap-inspector ф
# Вывод:
{
  "char": "ф",
  "keyDefinition": {
    "key": "ф",
    "code": "KeyA",
    "keyCode": 65
  },
  "layouts": {
    "en": "a",
    "ru": "ф",
    "de": "a",
    "fr": "q",
    "es": "a",
    "ua": "ф",
    "he": "ש"
  }
}

Deutsch

Tastaturlayout-Inspektor. Ermittelt, welche physische Taste einem Zeichen entspricht und zeigt, welche Zeichen sich auf dieser Taste in anderen Tastaturlayouts befinden.

🚀 Features

  • 7 Tastaturlayouts: Englisch, Russisch, Deutsch, Französisch, Spanisch, Ukrainisch, Hebräisch
  • Bidirektionale Zuordnung: Zeichen → Tasteninformationen, Tastencode → Zeichen
  • CLI-Tool für schnelle Inspektionen
  • TypeScript Unterstützung mit vollständigen Typdefinitionen
  • Leichtgewichtig: Nur 6.5KB Paketgröße

📦 Installation

# Global installieren für CLI-Nutzung
npm install -g keymap-inspector

# Lokal installieren für Bibliotheksnutzung
npm install keymap-inspector

🖥️ CLI-Nutzung

keymap-inspector ä
# Ausgabe:
{
  "char": "ä",
  "keyDefinition": {
    "key": "ä",
    "code": "Quote",
    "keyCode": 222
  },
  "layouts": {
    "en": "'",
    "ru": "э",
    "de": "ä",
    "fr": "ù",
    "es": "´",
    "ua": "є",
    "he": ","
  }
}

Français

Inspecteur de dispositions de clavier. Détermine quelle touche physique correspond à un caractère et montre quels caractères se trouvent sur cette touche dans d'autres dispositions de clavier.

🚀 Fonctionnalités

  • 7 dispositions de clavier: Anglais, Russe, Allemand, Français, Espagnol, Ukrainien, Hébreu
  • Mappage bidirectionnel: Caractère → Informations de touche, Code de touche → Caractères
  • Outil CLI pour des inspections rapides
  • Support TypeScript avec des définitions de types complètes
  • Léger: Seulement 6.5KB de taille de paquet

📦 Installation

# Installer globalement pour l'usage CLI
npm install -g keymap-inspector

# Installer localement pour l'usage de bibliothèque
npm install keymap-inspector

🖥️ Usage CLI

keymap-inspector é
# Sortie:
{
  "char": "é",
  "keyDefinition": {
    "key": "é",
    "code": "Digit2",
    "keyCode": 50
  },
  "layouts": {
    "en": "2",
    "ru": "2",
    "de": "2",
    "fr": "é",
    "es": "2",
    "ua": "2",
    "he": "2"
  }
}

Español

Inspector de distribuciones de teclado. Determina qué tecla física corresponde a un carácter y muestra qué caracteres están en esa tecla en otras distribuciones de teclado.

🚀 Características

  • 7 distribuciones de teclado: Inglés, Ruso, Alemán, Francés, Español, Ucraniano, Hebreo
  • Mapeo bidireccional: Carácter → Información de tecla, Código de tecla → Caracteres
  • Herramienta CLI para inspecciones rápidas
  • Soporte TypeScript con definiciones de tipos completas
  • Ligero: Solo 6.5KB de tamaño de paquete

📦 Instalación

# Instalar globalmente para uso CLI
npm install -g keymap-inspector

# Instalar localmente para uso de biblioteca
npm install keymap-inspector

🖥️ Uso CLI

keymap-inspector ñ
# Salida:
{
  "char": "ñ",
  "keyDefinition": {
    "key": "ñ",
    "code": "Semicolon",
    "keyCode": 186
  },
  "layouts": {
    "en": ";",
    "ru": "ж",
    "de": "ö",
    "fr": "m",
    "es": "ñ",
    "ua": "ж",
    "he": "ף"
  }
}

Українська

Інспектор клавіатурних розкладок. Визначає, яка фізична клавіша відповідає символу, та показує, які символи знаходяться на цій клавіші в інших розкладках клавіатури.

🚀 Можливості

  • 7 розкладок клавіатури: англійська, російська, німецька, французька, іспанська, українська, іврит
  • Двостороннє зіставлення: символ → інформація про клавішу, код клавіші → символи
  • CLI утиліта для швидких перевірок
  • TypeScript підтримка з повними визначеннями типів
  • Легкий: розмір пакету лише 6.5KB

📦 Встановлення

# Глобальне встановлення для CLI
npm install -g keymap-inspector

# Локальне встановлення для бібліотеки
npm install keymap-inspector

🖥️ Використання CLI

keymap-inspector і
# Вивід:
{
  "char": "і",
  "keyDefinition": {
    "key": "і",
    "code": "KeyS",
    "keyCode": 83
  },
  "layouts": {
    "en": "s",
    "ru": "ы",
    "de": "s",
    "fr": "s",
    "es": "s",
    "ua": "і",
    "he": "ד"
  }
}

עברית

בודק פריסות מקלדת. קובע איזה מקש פיזי מתאים לתו ומראה אילו תווים נמצאים על המקש הזה בפריסות מקלדת אחרות.

🚀 תכונות

  • 7 פריסות מקלדת: אנגלית, רוסית, גרמנית, צרפתית, ספרדית, אוקראינית, עברית
  • מיפוי דו-כיווני: תו ← מידע על מקש, קוד מקש ← תווים
  • כלי CLI לבדיקות מהירות
  • תמיכה ב-TypeScript עם הגדרות טיפוסים מלאות
  • קל משקל: גודל חבילה של 6.5KB בלבד

📦 התקנה

# התקנה גלובלית לשימוש CLI
npm install -g keymap-inspector

# התקנה מקומית לשימוש ספרייה
npm install keymap-inspector

🖥️ שימוש ב-CLI

keymap-inspector ש
# פלט:
{
  "char": "ש",
  "keyDefinition": {
    "key": "ש",
    "code": "KeyA",
    "keyCode": 65
  },
  "layouts": {
    "en": "a",
    "ru": "ф",
    "de": "a",
    "fr": "q",
    "es": "a",
    "ua": "ф",
    "he": "ש"
  }
}

🔧 API Reference

KeymapInspector

interface KeyDefinition {
  key?: string;
  code: string;
  keyCode: number;
  shiftKey?: boolean;
  location?: number;
}

interface InspectionResult {
  char: string;
  keyDefinition: KeyDefinition;
  layouts: {
    [layoutName: string]: string | null;
  };
}

class KeymapInspector {
  constructor(layouts: { [name: string]: Keymap });
  inspect(char: string): InspectionResult | null;
  inspectByCode(code: string): InspectionResult | null;
  inspectByKeyCode(keyCode: number): InspectionResult | null;
}

Available Layouts

  • en - English (QWERTY)
  • ru - Russian (ЙЦУКЕН)
  • de - German (QWERTZ)
  • fr - French (AZERTY)
  • es - Spanish (QWERTY)
  • ua - Ukrainian (ЙЦУКЕН)
  • he - Hebrew

📄 License

MIT © mikyviz

☕ Support

If you find this project helpful, consider buying me a coffee!

Tests & Examples

For testing and development, check out the tests/ directory which contains:

  • Interactive examples and demos
  • Browser compatibility tests
  • Development testing tools
  • Sample implementations

See tests/README.md for detailed descriptions.

�🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🐛 Issues

Found a bug? Please open an issue.