Skip to content

ArcballControls steals ctrl-C/V keyboard shortcuts #23023

@mgroeneweg

Description

@mgroeneweg

Describe the bug

ArcballControls has the ability to copy/paste state. It also allows ctrl-C/V keyboard shortcuts to be used for that purpose.

We have a business app that shows a model on the right and a treeview of that model and other details on the left. Having the ArcballControls active prevents regular copy/paste actions on the input elements that are on the same page.

This can also be seen in the example.
https://threejs.org/examples/?q=arcb#misc_controls_arcball

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://threejs.org/examples/?q=arcb#misc_controls_arcball
  2. Click on Scale factor in the Controls UI.
  3. Use ctrl-C to attempt to copy the value
  4. Use ctrl-V in any text editor
  5. You will get the controls state rather than the scale factor value

Code

// code goes here

Live example

Expected behavior

One of:

  • The Arcball state functionality should not interfere with other elements on the page
  • Provide a property to turn off the keyboard shortcuts so ArcballControls does not capture the keystrokes.

Screenshots
image
Scale factor selected for copying.

Platform:

  • Device: Desktop
  • OS: Windows
  • Browser: Chrome
  • Three.js version: [0.135.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions