HTMLAccentMapper is a Python script designed to improve the usability of QWERTY keyboards by seamlessly integrating HTML accent encoding patterns. This tool simplifies the input of accented characters by recognizing and mapping HTML accent entities. Whether you're a multilingual writer, developer, or someone looking to enhance their keyboard experience, HTMLAccentMapper streamlines the process of accent input. the script use the pynut python library
To test the script on other plateform, launch the provided gui.py. Follow these steps:
# Clone this repository
git clone https://github.com/freemanlovelace/HTMLAccentMapper.git
# create a virtual environment
python3 -m venv ./HTMLAccentMapperEnv
# activate the virtual environment
source ./HTMLAccentMapperEnv/bin/activate (on windows : HTMLAccentMapperEnv\Scripts\activate)
# Install requirements
pip install -r requirements.txt
# Launch gui.py
python3 gui.py (Use python instead of python3 on Windows)
You can build the app for your platform using pyInstaller : pyinstaller gui.py
This script utilizes HTML entities to enable QWERTY (or other keyboard types) to input accents. Instead of using the &
character to initialize the entity, it uses the ;
character.
;eacute;
will produce the following output: é
.
Inserting a ;
character initializes a table (named key_tab in the script), and all subsequent characters will be added to the table. Inserting another ;
stops the gathering process and checks whether the content of key_tab is a valid HTML entity, replacing it with its corresponding accent.
If Space or Enter key is pressed, then key_tab is reinitialized.
Entity | Corresponding Accent |
---|---|
aacute | á |
eacute | é |
iacute | í |
oacute | ó |
uacute | ú |
agrave | à |
egrave | è |
igrave | ì |
ograve | ò |
ugrave | ù |
acirc | â |
ecirc | ê |
icirc | î |
ocirc | ô |
ucirc | û |
atilde | ã |
etilde | ẽ |
itilde | ĩ |
otilde | õ |
utilde | ũ |
auml | ä |
euml | ë |
iuml | ï |
ouml | ö |
uuml | ü |
ccedil | ç |
nbsp | tabulation |
If you want to contribute open an issue then feel free to submit pull request