# Calling simultaneous functions in draw()

**URL:** <https://discourse.processing.org/t/calling-simultaneous-functions-in-draw/39497>\
**Category:** Coding Questions\
**Created:** [October 29, 2022, 11:07pm UTC](https://discourse.processing.org/t/calling-simultaneous-functions-in-draw/39497 "2022-10-29T23:07:21Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [October 30, 2022, 10:59am UTC](https://discourse.processing.org/t/calling-simultaneous-functions-in-draw/39497/7 "2022-10-30T10:59:47Z")

</div>

Hello @bcabc,

Using this example:  
[https://discourse.processing.org/t/customizeable-keyboard-controls-for-games/22003/2](https://discourse.processing.org/t/customizeable-keyboard-controls-for-games/22003/2)

And adding this to `draw()` :

```auto
void draw() 
  {
  // Continue doing your thing
  background(0);
  String s = "";
  for(int i = 0; i<256; i++)
    {
    if (keys[i] == true) 
      {
      //print(char(i));   
      s += str(char(i));
      }
    }
    textSize(24);
    text(s, 20, 50);
    println(); 
    }
  }

```

I only get a maximum of 6 keys on my keyboard!  
And less with numbers along the top but 6 with number keypad.

This may provide some insight:

> **[Rollover (keyboard)](https://en.wikipedia.org/wiki/Rollover_(keyboard))**
>
> Rollover is the ability of a computer keyboard to correctly handle several simultaneous keystrokes. A keyboard with n-key rollover can correctly detect input from each key on the keyboard at the same time, regardless of how many other keys are also being pressed. Keyboards that lack full rollover will register an incorrect keystroke when certain combinations of keys are pressed simultaneously. Rollover has applications for stenotype, electronic music keyboards, gaming, and touch-typing generally....

`:)`

---

_[View the full topic](https://discourse.processing.org/t/calling-simultaneous-functions-in-draw/39497)._
