https://github.com/masaki39/keymap-fetcher
A Vercel API that returns an SVG diagram of a MacBook Air 13" Japanese (JIS) keyboard with specified keys highlighted.
https://github.com/masaki39/keymap-fetcher
svg-api vercel-api
Last synced: about 2 months ago
JSON representation
A Vercel API that returns an SVG diagram of a MacBook Air 13" Japanese (JIS) keyboard with specified keys highlighted.
- Host: GitHub
- URL: https://github.com/masaki39/keymap-fetcher
- Owner: masaki39
- License: mit
- Created: 2026-03-04T13:50:12.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-05T13:58:20.000Z (4 months ago)
- Last Synced: 2026-03-05T15:37:56.198Z (4 months ago)
- Topics: svg-api, vercel-api
- Language: TypeScript
- Homepage: https://keymap-fetcher.vercel.app
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keymap-fetcher
A Vercel API that returns an SVG diagram of a MacBook Air 13" Japanese (JIS) keyboard with specified keys highlighted. Primary use case: embedding keybinding diagrams in Markdown (GitHub READMEs, blogs).
## Demo
Base keyboard (no highlights):

Vim motion keys (hjkl):

Modifier keys:

## Usage
Embed in Markdown:
```markdown

```
Or with curl:
```sh
curl "https://keymap-fetcher.vercel.app/api/keymap?keys=h,j,k,l" -o keymap.svg
```
### Parameters
| Parameter | Description | Example |
|-----------|-------------|---------|
| `keys` | Comma-separated Vim key notation | `h,j,k,l` or `,` |
## Key Notation
Keys follow Vim conventions:
| Notation | Key |
|----------|-----|
| `a`–`z` | Letter keys |
| `1`–`0` | Number keys |
| `` | Escape |
| ``, ``, `` | Return/Enter |
| ``, ``, `` | Delete |
| `` | Tab |
| ``, `space` | Space bar |
| ``, `comma` | , (comma) |
| ``, ``, ``, `` | Arrow keys |
| ``–`` | Function keys |
| `` | Ctrl + x |
| `` | Shift + x |
| `` | Command (⌘) + x |
| ``, `` | Option (⌥) + x |
| `ctrl`, `shift`, `cmd`, `opt`, `alt`, `fn`, `caps` | Modifier keys alone |
| `shift-l`, `shift-r`, `cmd-l`, `cmd-r` | Shift/Command with side |
| `-`, `^`, `¥`, `@`, `[`, `;`, `:`, `]`, `.`, `/`, `_` | Symbol keys |
## Self-hosting on Vercel
```sh
git clone https://github.com/masaki39/keymap-fetcher.git
cd keymap-fetcher
npm install
vercel deploy
```
## Feedback
Please report issues at [GitHub Issues](https://github.com/masaki39/keymap-fetcher/issues).