# Text is added twice

**URL:** <https://discourse.processing.org/t/text-is-added-twice/33527>\
**Category:** Coding Questions\
**Created:** [November 15, 2021, 9:34am UTC](https://discourse.processing.org/t/text-is-added-twice/33527 "2021-11-15T09:34:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Post date:** [November 15, 2021, 9:34am UTC](https://discourse.processing.org/t/text-is-added-twice/33527/1 "2021-11-15T09:34:27Z")

</div>

in the kill screen, there is a textbox. when you click on it you can type, but the letters you type show up twice. how do i fix this?  
https://openprocessing.org/sketch/1333291/embed/?

---

<div class="post-metadata">

**Author:** ![hotfooted](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hotfooted/32/3670_2.png) [@hotfooted](https://discourse.processing.org/u/hotfooted)\
**Post date:** [November 15, 2021, 10:29am UTC](https://discourse.processing.org/t/text-is-added-twice/33527/2 "2021-11-15T10:29:25Z")

</div>

in void keyTyped() you have

```auto
		else if (k >= ' ') tbox.txt += str(k);
		tbox.txt += str(k);

```

you could add an else and fix it i believe but i only had a quick glance

```auto
		else if (k >= ' ') tbox.txt += str(k);
		else tbox.txt += str(k);

```
