Documentation Index
Fetch the complete documentation index at: https://mintlify.com/khaphanspace/gonhanh.org/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Shortcuts (Gõ tắt) allow you to expand abbreviations into full phrases automatically.How It Works
Trigger Modes
Shortcuts can be triggered in two ways:- Word Boundary
- Immediate
Most common mode - triggers when you press Space or punctuation after the trigger word.
This is the default mode and recommended for most use cases.
Smart Case Matching
Shortcuts automatically match the case of your input:| Input | Output | Case Type |
|---|---|---|
vn | Việt Nam | lowercase |
VN | VIỆT NAM | UPPERCASE |
Vn | Việt Nam | Title Case |
ko | không | lowercase |
KO | KHÔNG | UPPERCASE |
Ko | Không | Title Case |
Issue #86: Smart case transformation works for all shortcuts, including Vietnamese diacritics.
Creating Shortcuts
Built-in Shortcuts
Gõ Nhanh comes with these default shortcuts:Default shortcuts are currently disabled in the latest version. You can add them back manually if needed.
Add Custom Shortcuts
- Open Settings → Shortcuts
- Click + Add Shortcut
- Enter:
- Trigger: Short text to type (e.g.,
tphcm) - Replacement: Full text to expand (e.g.,
Thành phố Hồ Chí Minh) - Trigger mode: Word boundary or Immediate
- Input method: All, Telex only, or VNI only
- Trigger: Short text to type (e.g.,
- Click Save
Shortcut Limits
Max Replacement Length
255 characters (UTF-32 codepoints)Each Vietnamese character with diacritics (ồ, ế, ẫ) counts as 1 codepoint.
No Trigger Limit
Trigger can be any length, but keep it short and memorable!
Implementation
Shortcuts are implemented incore/src/engine/shortcut.rs:
Input Method Filtering
Shortcuts can be limited to specific input methods:- All Methods
- Telex Only
- VNI Only
Why filter by input method?Some triggers might conflict with typing in one method but not the other. For example,
7 is a valid shortcut in VNI but would interfere with normal number typing in Telex.Shortcut Matching
Longest Match First
When multiple shortcuts match, the longest trigger wins:Case-Insensitive Matching
Triggers are matched case-insensitively:Examples
Common Abbreviations
Common Abbreviations
Email & Addresses
Email & Addresses
Frequently Used Phrases
Frequently Used Phrases
Technical Terms
Technical Terms
Long Text (Issue #178)
Long Text (Issue #178)
Validation & Limits
Replacement Validation
Vietnamese characters with diacritics (ồ, ế, ẫ, ơ, ư) each count as 1 codepoint, not multiple bytes.
Disabling Shortcuts
To temporarily disable a shortcut without deleting it:- Open Settings → Shortcuts
- Find the shortcut in the list
- Uncheck the Enabled checkbox
- Click Save
Troubleshooting
Shortcut doesn't trigger
Shortcut doesn't trigger
- Check if it’s enabled in Settings
- Make sure you’re using the correct trigger mode (word boundary vs immediate)
- Verify the input method filter (All/Telex/VNI)
- Try toggling Vietnamese mode OFF and ON
Case doesn't match
Case doesn't match
Ensure CaseMode is set to
MatchCase (default). If you want exact output, change it to Exact.Replacement is truncated
Replacement is truncated
Your replacement text exceeds 255 characters. Either shorten it or split it into multiple shortcuts.
Shortcut conflicts with typing
Shortcut conflicts with typing
Change from Immediate to Word Boundary mode, or choose a less common trigger.
Comparison with Other IMEs
| Feature | Gõ Nhanh | UniKey | OpenKey | EVKey |
|---|---|---|---|---|
| Custom shortcuts | ✅ | ✅ | ✅ | ✅ |
| Smart case matching | ✅ | ❌ | ❌ | ❌ |
| Input method filtering | ✅ | ❌ | ❌ | ❌ |
| Max replacement length | 255 | 63 | 128 | 100 |
| Immediate trigger mode | ✅ | ✅ | ❌ | ✅ |
| Word boundary mode | ✅ | ✅ | ✅ | ✅ |
Best Practices
Keep Triggers Short
Use 2-5 character triggers for best usability.Good:
vn, hcm, koBad: vietnamcountry, hochiminhcityAvoid Conflicts
Don’t use triggers that are common word prefixes.Good:
tphcm (unique)Bad: th (conflicts with “thì”, “thế”, “thực”…)Use Word Boundary
Prefer word boundary mode over immediate for most shortcuts.Safer and less intrusive.
Test First
Test new shortcuts in a text editor before using them in important documents.
Related Features
Input Methods
Learn about Telex and VNI
Auto-Restore
Automatic English word restoration