An interactive web application for visualizing and testing Divvun keyboard layouts across multiple platforms. Built with Fresh (Deno), Preact, and Vite.
- Interactive Keyboard Display: Click keys or use your physical keyboard to test layouts
- Multi-Platform Support: View keyboards for macOS, iOS, Android, Windows, and Chrome OS
- Device Variants: Support for different mobile device types (phones, tablets)
- GitHub Integration: Load keyboard layouts directly from GitHub repositories
- YAML Editor: Paste and test kbdgen YAML layout definitions
- Layer Visualization: See different keyboard layers (default, shift, alt, symbols, etc.)
- Dead Key Support: Full support for dead key combinations
- Embeddable: Generate iframe code to embed keyboards in other sites
- Responsive Design: Works on desktop and mobile devices
- URL Sharing: Share specific keyboard configurations via URL parameters
Make sure to install Deno: https://docs.deno.com/runtime/getting_started/installation
Start the project in development mode:
deno task devThis will start the Vite development server and watch for changes.
deno task dev- Start development serverdeno task build- Build for productiondeno task start- Start production serverdeno task prod- Serve production builddeno task check- Run linting and type checkingdeno task ci- Clean install dependenciesdeno task update- Update Fresh framework
Navigate to the root URL to access the main keyboard viewer interface. The viewer includes:
- Output Area: Displays text as you type on the virtual or physical keyboard
- Virtual Keyboard: Interactive visual representation of the keyboard layout
- Layer Information: Shows the currently active keyboard layer
- Load from GitHub: Select from available Divvun keyboard repositories
- YAML Editor: Paste and test custom kbdgen YAML layouts
- Select a repository from the dropdown (e.g., keyboard-sme, keyboard-fin)
- Choose a layout file
- Select the target platform (macOS, iOS, Android, etc.)
- For mobile platforms, optionally select device variant (phone/tablet)
- Switch to the "YAML Editor" tab
- Paste a kbdgen YAML layout definition
- Select the platform to preview
- The keyboard shows a live preview, making it easy to edit a keyboard definition and see the result in real time.
Click the "Get Embed Code" button to copy an iframe snippet that can be embedded in other websites. The embed URL supports these parameters:
kbd: Repository/keyboard identifierlayout: Layout name (without .yaml extension)platform: Target platform (macOS, iOS, android, windows, chromeOS)variant: Device variant (primary, phone, tablet)interactive: Enable/disable interaction (default: true)
Example embed URL:
/embed?kbd=sme&layout=se&platform=macOS&variant=primary
You can share specific keyboard configurations by including URL parameters:
/?kbd=sme&layout=se&platform=macOS&variant=primary
- Framework: Fresh 2.x (Deno web framework)
- Runtime: Deno
- UI Library: Preact
- State Management: @preact/signals
- Build Tool: Vite 7.x
- Styling: Tailwind-style CSS (not actually Tailwind)
- Data Format: kbdgen YAML layouts
The main interactive keyboard viewer with GitHub loader and YAML editor.
Lightweight embeddable keyboard component for use in iframes.
Renders the visual keyboard layout with key state management.
Custom hook that manages keyboard state, layer switching, and key combinations.
Custom hook that handles responsive scaling of the keyboard display.
- macOS: Desktop keyboard layouts
- iOS: iPhone and iPad virtual keyboards
- Android: Mobile virtual keyboards
- Windows: Desktop keyboard layouts
- Chrome OS: Chromebook keyboard layouts
This viewer supports keyboard layouts defined in the kbdgen YAML format used by Divvun. Each layout can define multiple modes (layers) and supports:
- Dead keys and combining characters
- Multiple keyboard layers (default, shift, alt, caps, symbols)
- Platform-specific layouts
- Device-specific variants
- Transform rules for complex input
This project is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.