# User Type Input

**URL:** <https://discourse.processing.org/t/user-type-input/33101>\
**Category:** Coding Questions\
**Created:** [October 26, 2021, 6:44pm UTC](https://discourse.processing.org/t/user-type-input/33101 "2021-10-26T18:44:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![MiguelSanches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/miguelsanches/32/11172_2.png) [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Post date:** [October 29, 2021, 8:35am UTC](https://discourse.processing.org/t/user-type-input/33101/2 "2021-10-29T08:35:23Z")

</div>

Hello @Ethanation ,

The problem is the noLoop(). The code does not get updated to place the strings.  
So the ENTER key should take you to another “page” and then just keep updating that “page” as you type things  
Here is part of the code working:

```auto
//sets up all of the inputs
String x1 = "";

//sets up indents
int indent1 = 10;
int indent2 = 150;
int type1 = 0;
void setup() {
  size(600, 600);
  background(255);
}

void draw() {
  textSize(20);
  fill(0);

  if (type1 == 1) {
    stroke(255);
    fill(255);
    rect(0, 0, 600, 600);
    fill(0);
    text("X =" + x1, indent2, 200);
  } else {
    text("Hello, when we get there please enter each number"+"\n"+"in its coresponding space.", indent1, 160);
    text("If you dont have a number for the space, leave it blank.", indent1, 270);
    text("Press enter to accept the number"+"\n"+"so, please press enter now.", indent1, 350);
  }
}

//key inputs
void keyPressed() {
  if (key == ENTER) {
    type1 = 1;
  } else if (key == BACKSPACE) {
    x1 = x1.substring(0, max(0, x1.length()-1));
  } else {
    x1 = x1 + key;
    //DEBUG
    //println(x1);
  }
}

```

Hope it helps!

---

_[View the full topic](https://discourse.processing.org/t/user-type-input/33101)._
