CesiumGS/cesium

ScreenSpaceEventHandler support for multiple KeyboardEventModifier keys at once

Open

#13,300 创建于 2026年3月13日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)JavaScript (11,758 star) (3,324 fork)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]
)

贡献者指南

ScreenSpaceEventHandler support for multiple KeyboardEventModifier keys at once · CesiumGS/cesium#13300 | Good First Issue