CesiumGS/cesium

ScreenSpaceEventHandler support for multiple KeyboardEventModifier keys at once

Geschlossen

#13.300 geöffnet am 13.03.2026

 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (3.324 Forks)batch import
category - cameragood first issuetype - enhancement

Repository-Metriken

Stars
 (11.758 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 15T 12h) (23 gemergte PRs in 30 T)

Beschreibung

Feature

Currently the ScreenSpaceEventHandler can only listen for mouse events with either Alt, Shift or Ctrl modifier keys.

It would be nice to be able to add a listener for when multiple modifier keys are held at the same time, like this:

const listener = () => {console.log("SHIFT and ALT are held")}

screenSpaceEventHandler.setInputAction(
  listener, 
  ScreenSpaceEventType.LEFT_DOWN, 
  [KeyboardEventModifier.ALT, KeyboardEventModifier.SHIFT]
)

Contributor Guide