Developer: Rachhpal Sahota
Keyboard: RomanPunjabi
Keyman Developer Version: 17.0.335
Platform: Windows 11
GOAL:
To map Roman keystrokes such that:
- ‘d’ + ‘h’ → ‘ਧ’ (U+0A27)
- ‘d’ + any other character → ‘ਦ’ (U+0A26), plus the original second character
This should work via deadkey or context-based handling for dynamic fallback logic.
ATTEMPT 1: Unicode Literal on Right-hand Side
group(main) using keys
‘dh’ > U+0A27
‘d’ > U+0A26
Error: KM0200A – Invalid token: U+0A27
Issue: Keyman doesn’t accept bare Unicode code points without wrapping.
ATTEMPT 2: Character Literal Output
group(main) using keys
‘dh’ > ‘ਧ’
‘d’ > ‘ਦ’
Compiles
But doesn’t allow context-based fallback or multiple rule resolution.
ATTEMPT 3: Deadkey and Context-Based Logic (Fails)
store(otherLetterStore) ‘a’ ‘b’ ‘c’ ‘e’ ‘f’ ‘g’ ‘i’ ‘j’ ‘k’ ‘l’ ‘m’ ‘n’ ‘o’ ‘p’ ‘q’ ‘r’ ‘s’ ‘t’ ‘u’ ‘v’ ‘w’ ‘x’ ‘y’ ‘z’
group(main) using keys
‘d’ > deadkey(1)
deadkey(1) + ‘h’ > ‘ਧ’
deadkey(1) + any(otherLetterStore) > ‘ਦ’ + context
Error: KM0200A – Invalid token found character offset: 5 token: >
Even when retyped character-by-character manually
NOTE: Clean UTF-8 file, removed layout/bitmap references, declared store above group,
all syntax rules followed. Suspected compiler bug or undocumented restriction.
REQUEST:
- Is there a limitation in how deadkeys/context must be used when triggered by alphabetic keys like ‘d’?
- What is the recommended way to:
- Prevent output after ‘d’ until ‘h’ or other key is typed?
- Dynamically decide the output based on next keystroke?