A web-based tool designed to help users practice and learn the Cangjie input method, a popular Chinese character input system. This project supports both traditional and simplified Chinese characters, with customizable difficulty levels based on character frequency.
- Interactive Practice: Type Cangjie codes to match displayed Chinese characters.
- Difficulty Settings: Choose character frequency ranges (1-7072) to adjust practice difficulty.
- Simplified/Traditional Toggle: Switch between simplified and traditional Chinese characters.
- Answer Display: Show Cangjie codes and graphical breakdowns (for traditional characters) with a button or Enter key.
- Progress Navigation: Go back to the previous character using a button or Shift + Backspace.
- Mobile-Friendly: Responsive design with adjustments for mobile devices.
- Local Storage: Saves your difficulty and character set preferences.
-
Clone the Repository:
git clone https://github.com/ikwbb/cangjie-practice-tool.git
-
Navigate to the Project Directory:
cd cangjie-practice
-
Open in Browser: Simply open
index.html
in a web browser. No server setup is required as it runs entirely client-side.Alternatively, use a local server for better performance:
npx http-server
Then visit
http://localhost:8080
in your browser.
-
Select Difficulty:
- Check the boxes in the "Settings and Help" panel to choose character frequency ranges (e.g., 1-500 for beginners, up to 7001-7072 for advanced).
- At least one range must be selected.
-
Choose Character Set:
- Toggle the "Use Simplified Characters" checkbox to switch between traditional (default) and simplified Chinese.
-
Practice:
- A Chinese character appears in the center.
- Type its Cangjie code in the input box. Correct input advances to the next character automatically.
- Press
Enter
or click "Ans" to reveal the code and (for traditional characters) a graphical breakdown.
-
Navigation:
- Click the
<
button or pressShift + Backspace
to return to the previous character.
- Click the
-
Tips:
- Click the
···
button to open the settings and help panel.
- Click the
cangjie-practice/
├── index.html # Main HTML file
├── style.css # Styling for the interface
├── script.js # Core logic and event handling
├── cangjie5.js # Cangjie code mappings
├── cangjieToKeyboard.js # Conversion utilities
└── README.md # Project documentation
- No external libraries are required; the project uses vanilla JavaScript and HTML/CSS.
- Data sources:
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit (
git commit -m "Add feature"
). - Push to your branch (
git push origin feature-branch
). - Open a pull request.
Please ensure your code follows the existing style and includes appropriate comments.
This project is licensed under the MIT License. See the LICENSE file for details.