A JavaScript wrapper for CharaChorder's Serial API.
- Supports modern web browsers with Web Serial API.
- Implements key CharaChorder Serial API commands.
- Provides easy-to-use methods for common operations.
<script src="cc.js"></script>
<script>
document.getElementById('connectButton').addEventListener('click', async () => {
const device = new CharaChorderDevice();
try {
await device.connect();
console.log("Connected to device");
const os = await device.getOperatingSystem();
console.log("Operating System:", os);
const keymap = await device.getKeymap();
console.log("Keymap:", keymap);
const chords = await device.listChords();
console.log("Chords:", chords);
} catch (error) {
console.error("Error:", error);
} finally {
await device.disconnect();
console.log("Disconnected from device");
}
});
</script>- Web browser with Web Serial API support (Chrome 89+, Edge 89+, Opera 76+)
- CharaChorder Official Website
- CharaChorder Serial API Documentation
- CharaChorder Discord Server
- CharaChorder DeviceManager (Source Project)
AGPL-3.0 license
This project is based on the CharaChorder DeviceManager project. We are grateful to the original authors and contributors for their work.