Is it possible to stop Cesium from capturing the ALT key?
Currently when I press the ALT key, the map stops to be responsive (for example: hovering on GeoJSON, they are not reacting).
Is it possible to stop Cesium from capturing the ALT key?
Currently when I press the ALT key, the map stops to be responsive (for example: hovering on GeoJSON, they are not reacting).
Hi @keul,
Thanks for your post and for using CesiumJS.
This question was asked in a similar thread which I can direct you to here When I press alt on the keyboard,event dont trigger I think the response there explains the behavior and points to the documentation for how it works.
I hope this is helpful and please let us know if you have further questions.
Best,
Luke
It’s not entirely clear for me whether this refers to keeping ALT pressed or just pressing it once. The latter might be related to some distressing default behavior on Windows: There, when you press (and release) the ALT key, then it focuses the Menu bar of the window (by default) - this can sometimes have unexpected side effects.
My question is about keeping the ALT key pressed.
In my case (MacOS) the Alt key is commonly doing anything special. For example: I can open a similar app done with another technology (like: Leaflet) but features on map are still responsive when pressing that key, so is something special on Cesium side I guess.
BTW: I can also evaluate to move to another key, like CTRL, but the problem seems still there. For example: Cesium is using the CTRL key to change the plane angle.
@Luke_McKinstry thanks! I saw your question, but this seems something a bit different.
My keypress even handler is external to Cesium (think about a keypress
event on the document
object). The problem is that Cesium is still capturing it someway, even if my event handler is properly called.
I tried a lot of different approach, and also Windows OS.
Every common functions keys (shift, alt, ctrl) are locked, even if I disable enableTilt
or enableLook
, which is a very annoying behaviour.
Tried to inspect the Cesium source with not luck.