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

211
Views
How can I make some arrow keys that can manipulate a js-tray-slider?

I am using this tutorial:
https://tympanus.net/codrops/2019/09/17/how-to-build-a-color-customizer-app-for-a-3d-model-with-three-js/

to create a similar concept.
However, in the color selection area (the swatches), I don't want only to be able to use the mouse to "scroll" back and forth. I also want to be able to use some arrow keys similar to these ones: Arrow keys to controls back and forth

However, I am having a hard time figuring out how this can be done, so I would appreciate some help.

Is this something that can be done?

Also, there is problem when you use the mouse or even use touch devices, that it will select colors while trying to slide back and forth, which is quite annoying because you can't scroll without hitting every color you touch on the way.

How can this be fixed as well?

You can try out the whole site (the tutorial) on codepen here:

'https://codepen.io/kylewetton/pen/jONpxpa'

But I have also made a version with more colors, that is a little more simple:
js fiddle

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!