CesiumGS/cesium

ScreenSpaceEventHandler support for multiple KeyboardEventModifier keys at once

已关闭

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

 (3 条评论) (0 个反应) (0 位负责人)JavaScript (3,324 个派生)batch import
category - cameragood first issuetype - enhancement

仓库指标

星标
 (11,758 个星标)
PR 合并指标
 (平均合并 15天 12小时) (30 天内合并 23 个 PR)

描述

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

贡献者指南