INPUT_PULLUP — works exactly like the Shift key on a standard keyboard: hold it while pressing a Braille chord, and the firmware routes that chord through a different set of output tables. A single Shift layer handles uppercase English letters, the digits 0–9, common punctuation, math operators, and Bangla dependent vowel signs (কার/মাত্রা) — all without adding a single extra key to the hardware.
How Shift works
When the firmware reads the SHIFT pin asLOW (pressed), it sets shiftActive = true before any chord is processed. Inside processChord(), the firmware checks shiftActive first. A shifted chord skips the main Braille dictionary entirely and instead checks, in order:
- Number table — the ten chords for A–J produce digits 1–0.
- Shift symbols table — specific chords produce punctuation and math operators (language-independent).
- Uppercase English (if English mode) — any base letter chord produces its capital.
- Bangla vowel signs (if Bangla mode) — any vowel chord produces its dependent vowel sign (মাত্রা).
Numbers (Shift + A–J)
Hold Shift and press the chord for any of the first ten Braille letters (A through J) to produce the digits 1 through 0. This follows the standard Braille number convention:
The firmware stores these as a
numberChords[] array paired with a numberMap[] string array, so the lookup is a straight index match — constant time regardless of which digit you type.
Punctuation
Hold Shift and press one of the following chords to produce common punctuation marks. These work in both English and Bangla modes:Math operators
Hold Shift and press one of the following chords to produce a math operator. Like punctuation, math operators are language-independent and available in both English and Bangla modes:
The firmware processes math symbols before punctuation in the
shiftSymbols[] table, so in any chord conflict between the two categories, the math symbol takes priority.
Uppercase letters (English mode)
When the device is in English mode andshiftActive is true, any chord that maps to a lowercase letter in the base dictionary instead produces its uppercase equivalent. The firmware retrieves the lowercase character from lookupChord(chord, false), verifies the result is in the range 'a'–'z', and subtracts 32 to get the ASCII uppercase code before calling sendChar().
For example: hold Shift and press dot 1 (the chord for a) → the device sends A.
Bangla vowel signs / কার (Bangla mode)
When the device is in Bangla mode andshiftActive is true, pressing a vowel chord produces the corresponding dependent vowel sign (মাত্রা / কার) rather than the independent vowel letter. This lets you write full Bangla syllables naturally — type the consonant unshifted, then add the vowel sign with Shift:
The firmware consults the
banglaShiftMap[] array first. If the chord matches a vowel entry with a non-null kar field, it sends the vowel sign. If the chord is অ (which has no dependent form), the firmware falls through and outputs the normal Bangla character for that chord instead. Any non-vowel chord in Bangla Shift mode is handled like a normal shifted chord — checked against numbers and symbols first, then the Bangla dictionary.