Skip to content

CODED is not supported #209

Open
Open
@gaocegege

Description

@gaocegege

key is a char, and CODED is a int, I don't know how to compare those two things

fillVal <- 126

draw <- function() {
  fill(fillVal)
  rect(25, 25, 50, 50)
}

keyPressed <- function() {
  print(key)
  print(CODED)
  if (key == CODED) {
    if (keyCode == UP) {
      fillVal = 255
    } else if (keyCode == DOWN) {
      fillVal = 0
    } 
  } else {
    fillVal = 126
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions