Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
¿Cómo abrir el menú desplegable del cuadro de selección en p5.js?

Necesito abrir el menú desplegable del cuadro de selección sin hacer clic en él, por ejemplo, con la tecla presionada. Por alguna razón click() funciona bien con otros elementos como la entrada de archivos, pero no puede abrir la lista desplegable. Aquí hay un ejemplo:

https://openprocessing.org/sketch/1587950

 function setup() { createCanvas(600, 250); background(200); // create canvas sel = createSelect(); sel.position(100,100); sel.id('mySel'); // create select box inp = createFileInput(open); inp.position(300,100); inp.id('myInput'); // create file input for(let i=0; i<5; i++) { sel.option(random()); } // create select box options } function keyPressed() { // open dropdown with left key - doesn't work if (keyCode === LEFT_ARROW) { document.getElementById('mySel').click(); } // open file dialog with right key - works fine else if (keyCode === RIGHT_ARROW) { document.getElementById('myInput').click(); } } function draw() {} // empty function open(file) {} // empty

¿Hay alguna manera de abrir este menú desplegable, tal vez sin click() ?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!