Skip to content
ExamplesOpen editor ↗

taetsiEGolotswe

→ keyReleased()

Runs once when any key is released.

tiro taetsiEGolotswe() { ... }

Declare taetsiEGolotswe as a function with tiro. It runs when a key is let go, and taetsi tells you which one.

Use it when something should stop when a key is released — a shape that only moves while a key is held, for instance.

Click the sketch first. Like taetsiETobeditswe, it reaches the sketch only while the preview pane holds the keyboard focus.

A circle that shows only while a key is held
diri bonala = maaka;

tiro setaLoeto() {
  thalaKanefase(400, 240);
  tlhalosa('Sediko se se bonalang fela fa taetsi e ntse e tshwerwe. Tobetsa setshwantsho pele.');
}

tiro tshwantsha() {
  bokamorago(240);
  tlogelaMothalo();
  fa (bonala) {
    tlatsaMmala(220, 100, 90);
    thalaSediko(200, 120, 140);
  }
}

tiro taetsiETobeditswe() {
  bonala = nnete;
}

tiro taetsiEGolotswe() {
  bonala = maaka;
}

taetsiETobeditswe, taetsiEKwadilwe, taetsiETshwerwe