CesiumGS/cesium

ScreenSpaceEventHandler support for multiple KeyboardEventModifier keys at once

Open

#13,300 opened on 2026年3月13日

GitHub で見る
 (3 comments) (0 reactions) (0 assignees)JavaScript (11,758 stars) (3,324 forks)batch import
category - cameragood first issuetype - enhancement

説明

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]
)

コントリビューターガイド