rohingya-keyboard
v0.1.0
Published
A free, predictable on-screen and physical keyboard for typing the Hanifi Rohingya script (RTL, tonal) — plus the raw keymap data for building your own UI.
Maintainers
Readme
rohingya-keyboard
A free, predictable on-screen and physical keyboard for typing the Hanifi Rohingya script (right-to-left, tonal, Unicode block U+10D00–U+10D3F) in any React app.
- On-screen QWERTY-shaped keyboard — every key shows both its plain and Shift-revealed character at once, so the whole layout is guessable without ever pressing Shift first.
- Physical keyboard support, driven by the exact same keymap.
- A lockable right-hand Shift key for typing a run of tone marks without re-tapping each time.
- Built-in language toggle to hand typing back to the device's normal keyboard for English.
- The raw keymap data and helper functions are also exported, if you'd rather build your own UI on top instead of using the bundled component.
Install
npm install rohingya-keyboardreact and react-dom (18+) are peer dependencies — this package doesn't
bundle its own copy.
Two things you need to set up
1. Tailwind must see this package's files. The component is styled
with Tailwind utility classes directly (no separate CSS file is shipped),
so your tailwind.config needs to include this package in its content
array or the classes will get purged:
// tailwind.config.js
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx}",
"./node_modules/rohingya-keyboard/dist/**/*.{js,mjs}",
],
// ...
};2. Load the Hanifi Rohingya font. The component references
'Noto Sans Hanifi Rohingya' — without it loaded, the glyphs will render
as empty boxes on most systems. Easiest is Google Fonts, e.g. in
app/layout.tsx with next/font/google, or a plain <link> tag.
Usage
import { HanifiKeyboard } from "rohingya-keyboard";
export default function Page() {
return <HanifiKeyboard />;
}The component is self-contained (its own text field, on-screen keyboard, language switch, and copy button) — no props required.
Building your own UI
If you want the keymap without the bundled component:
import {
PHYSICAL_KEYMAP,
KEYBOARD_ROWS,
CHAR_INFO,
charForKey,
physicalKeyLookup,
} from "rohingya-keyboard";See the exported types (KeyDef, KeyId) for shapes.
License
MIT
