BACKSPACE
→ BACKSPACEThe value standing for the Backspace key — the one that rubs out the character before the cursor.
BACKSPACEYou hand it to taetsiETshwerwe, or compare it against khoutuYaTaetsi.
It is the one you need when typing text onto a canvas: taetsiEKwadilwe never sees BACKSPACE, because it types no character. You have to catch it in taetsiETobeditswe.
The name stays English. Written Setswana has BACKSPACE key as “Taetsi ya BACKSPACE”; the key’s own name is not translated.
Examples
Section titled “Examples”diri mafoko = '';
tiro setaLoeto() {
thalaKanefase(400, 200);
tlhalosa('Mokwalo o o kwalwang le go phimolwa ka taetsi ya BACKSPACE. Tobetsa setshwantsho pele.');
}
tiro tshwantsha() {
bokamorago(242);
tlatsaMmala(40, 60, 90);
bogoloJwaMokwalo(24);
rulaganyaMokwalo(BOGARE);
thalaMokwalo(mafoko, 200, 110);
}
tiro taetsiEKwadilwe() {
mafoko = mafoko + taetsi;
}
tiro taetsiETobeditswe() {
fa (khoutuYaTaetsi === BACKSPACE) {
mafoko = mafoko.slice(0, -1);
}
}