Why doesn't processing recognize the key? (keyReleased)

Hi guys,
why doesn’t Processing recognize the ‘e’ key when the ‘s’ and ‘d’ or ‘w’ and ‘d’ keys are already pressed?

// Click on the image to give it focus,
// and then press any key.

int value = 0;

void draw() {
  rect(25, 25, 50, 50);

void keyReleased() {
  if (value == 0) {
    value = 255;
  } else {
    value = 0;
// processing example


1 Like

The number of simultaneous key press / releases that your system will detect is hardware specific. In general, most consumer keyboards are not designed to signal certain key combinations – in particular, a cluster of two neighboring keys on a row plus a neighbor directly above or below seldom works.

This isn’t a limitation of Processing – your keyboard is literally not generating an “e” signal when you hold down s+d first.

I can test this on macOS by opening my OS keyboard viewer, holding down s and d (they light up) then pressing e (it doesn’t light up). Holding down any two keys on the home row and then typing a key above or below seems to fail.


See also “rollover”: