Skip to content

Add accent-letters package - #243

Merged
smeech merged 1 commit into
espanso:mainfrom
roshanti1:accent-letters
Sep 26, 2026
Merged

smeech merged 1 commit into
espanso:mainfrom
roshanti1:accent-letters

Conversation

@roshanti1

Copy link
Copy Markdown
Contributor

Type any accented letter by its shape.

Type Get Type Get
;e' é ;a* å
;e` è ;z. ż
;e^ ê ;a- ā
;e" ë ;c< č
;n~ ñ ;a( ă
;c, ç ;a; ą
;o= ő ;o/ ø

257 triggers, covering the accented letters of 55 languages. Capitals work the same way — ;E' gives É.

The symbol looks like the mark it adds: ' rises like an acute, ` falls like a grave, ^ is the circumflex's hat, " is the two dots of a diaeresis, ~ is a tilde. It is the same grammar as the accent keyboard at accentletters.wiki, so a trigger learned in one works in the other.

Why a leading ; — it is an escape, so the triggers cannot fire while writing ordinary prose: a semicolon is followed by a space, not by a letter and a punctuation mark.

How it was built. Generated from Unicode 16.0.0 and CLDR 48.2.0, the same data behind the Accent Letters website and apps. A trigger exists only where the base letter and the mark genuinely compose into a single character under NFC — which is why there is no ;q', since no such letter exists. Letters where the stroke goes through the letter rather than sitting on it (ø ł đ and their capitals) are reached with /.

The generator refuses to emit the package if two letters ever want the same trigger, since the second would be silently unreachable. A validator then re-reads the generated file and checks 278 assertions: every declared match parses, every trigger is unique and well-formed, every replacement is exactly one character, and every letter is one of the 682 the rest of the project knows. The diaeresis triggers get their own checks, because the symbol there is a double quote and a quoting mistake would still parse as valid YAML while producing the wrong trigger.

How it differs from what is already in the hub — accented-words fixes English words that should carry an accent, albanian-accents covers four Albanian characters, and alt-codes exposes Windows Alt codes. This is a general letter-by-shape scheme across languages, so it does not overlap with any of them.

Relevant to ;a; in the table above: the ogonek's symbol is itself the prefix character, and that case is covered by a test.

Type any accented letter by its shape: ;e' gives é, ;n~ gives ñ, ;c, gives ç,
;o/ gives ø. 257 triggers covering the accented letters of 55 languages.

The grammar matches the accent keyboard at accentletters.wiki, so a trigger
learned in one works in the other. A leading ; keeps the triggers from firing
in ordinary prose.

Generated from Unicode 16.0.0 and CLDR 48.2.0, so a trigger exists only where
the base letter and the mark really compose into one character.

Co-Authored-By: Claude Opus 5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Resolve the two trigger collisions before shipping.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds an Espanso package for typing 257 accented letters with shape-based triggers.

Changes:

  • Adds generated accent-letter mappings.
  • Documents trigger grammar and data sources.
  • Adds package metadata and manifest.
File Summary
packages/​accent-letters/​0.1.0/​README.md Documents usage and trigger mappings.
packages/​accent-letters/​0.1.0/​package.yml Defines 257 replacements; ;a; and ;o; collide with github-emojis-latest.
packages/​accent-letters/​0.1.0/​_manifest.yml Provides package metadata and version information.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

replace: "Ŏ"
- trigger: ";U("
replace: "Ŭ"
- trigger: ";a;"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think expecting you to avoid pre-existing trigger combinations is asking bit much. If a user has both packages and types this trigger a disambiguation search box will pop up offering the choice of output.

Feel free to ignore.

replace: "ę"
- trigger: ";i;"
replace: "į"
- trigger: ";o;"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to ignore.

@smeech smeech left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A straightforward package of trigger/replace pairs. No shell, script or potentially malicious code.

Copilot has made a couple of suggestion which I'm happy for you to ignore.

I'll run the automated checks and merge, if that's OK?

replace: "Ŏ"
- trigger: ";U("
replace: "Ŭ"
- trigger: ";a;"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think expecting you to avoid pre-existing trigger combinations is asking bit much. If a user has both packages and types this trigger a disambiguation search box will pop up offering the choice of output.

Feel free to ignore.

replace: "ę"
- trigger: ";i;"
replace: "į"
- trigger: ";o;"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to ignore.

@roshanti1

roshanti1 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Yes please, go ahead — and thank you for reviewing it.

Agreed on leaving the two collisions. One extra reason to, beyond the disambiguation box: ;a; is part of a ten-trigger ogonek series — ;a; ;e; ;i; ;o; ;u; and their capitals — and Copilot's two flagged triggers are ;a; and ;o;. Changing just those would leave ;e; ;i; ;u; on one pattern and two others on something else, so the grammar would stop being guessable. ;a; is only memorable because the other four work the same way.

The whole package is generated from the site's own quick-accent grammar, so the shapes are consistent by construction — the symbol after the letter is the accent it draws:

;e' → é acute ;e` → è grave ;e" → ë diaeresis ;e^ → ê circumflex
;e~ → ẽ tilde ;e- → ē macron ;e( → ĕ breve ;e; → ę ogonek

The build refuses to emit the package at all if any two of the 257 triggers collide with each other, which is what keeps that true.

(Edited to fix a typo: I first wrote the diaeresis trigger as ;e: — it is ;e", as in the file.)

@smeech
smeech merged commit ecee98b into espanso:main Sep 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants