MOLEMA_MOTSWI
→ LEFT_ARROWThe value standing for the left arrow key.
MOLEMA_MOTSWIYou hand it to taetsiETshwerwe:
fa (taetsiETshwerwe(MOLEMA_MOTSWI)) { x = x - 3; }
You can also compare it against khoutuYaTaetsi: fa (khoutuYaTaetsi === MOLEMA_MOTSWI).
It is a string, not a number.
MOLEMA_MOTSWIis'ArrowLeft'. This is why Bopa has no numeric key-code keyword: comparing it against this value compares a number with a string, and is alwaysmaaka.
The four arrows translate and the other keys do not — and the reason is simple: a SHIFT key has the word Shift printed on it, while an arrow key has an arrow, not a word. An arrow is a thing, and the thing has a Setswana name.
MOLEMA(LEFT) andMOTSWI(ARROW) are both already in Bopa, so no new word was needed.
Examples
Section titled “Examples”diri x = 200;
tiro setaLoeto() {
thalaKanefase(400, 200);
tlhalosa('Sekwere se se sutang go ya ka molema fa taetsi ya motswi wa molema e tshwerwe. Tobetsa setshwantsho pele.');
}
tiro tshwantsha() {
bokamorago(238);
tlogelaMothalo();
tlatsaMmala(200, 120, 90);
fa (taetsiETshwerwe(MOLEMA_MOTSWI)) {
x = thibela(x - 3, 20, 340);
}
thalaSekwere(x, 80, 40);
}See also
Section titled “See also”MOJA_MOTSWI, GODIMO_MOTSWI, TLASE_MOTSWI, taetsiETshwerwe, khoutuYaTaetsi