# Press event handler not getting mkAlt in ModifiersDown?

**URL:** <https://forum.castle-engine.io/t/press-event-handler-not-getting-mkalt-in-modifiersdown/1111>\
**Category:** Uncategorized\
**Created:** [March 10, 2024, 3:28pm UTC](https://forum.castle-engine.io/t/press-event-handler-not-getting-mkalt-in-modifiersdown/1111 "2024-03-10T15:28:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edj](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/edj/32/1701_2.png) [@edj](https://forum.castle-engine.io/u/edj)\
**Post date:** [March 10, 2024, 3:28pm UTC](https://forum.castle-engine.io/t/press-event-handler-not-getting-mkalt-in-modifiersdown/1111/1 "2024-03-10T15:28:22Z")

</div>

I am trying to see if Alt key is pressed in my main TViewPlay.Press(const Event: TInputPressRelease) but mkAlt is never in Event.ModifiersDown no matter what I do. mkCtrl does work. What am I missing?

---

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [March 11, 2024, 10:48am UTC](https://forum.castle-engine.io/t/press-event-handler-not-getting-mkalt-in-modifiersdown/1111/2 "2024-03-11T10:48:51Z")

</div>

Assuming you are on Windows: There is indeed an issue with us not being able to perfectly detect Alt key presses, due to it being intercepted early by Windows. There’s a TODO on [castle-engine/src/window/windows/castlewindow\_winapi.inc at master · castle-engine/castle-engine · GitHub](https://github.com/castle-engine/castle-engine/blob/master/src/window/windows/castlewindow_winapi.inc#L21) .

I could look into it more, though I remember I tried to fight with it in the past and lost – i.e. Windows refuses to just tell us about Alt key events without interfering.

The other keys, including Ctrl and Shift, indeed don’t have any problem.

---

<div class="post-metadata">

**Author:** ![edj](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/edj/32/1701_2.png) [@edj](https://forum.castle-engine.io/u/edj)\
**Post date:** [March 11, 2024, 2:16pm UTC](https://forum.castle-engine.io/t/press-event-handler-not-getting-mkalt-in-modifiersdown/1111/3 "2024-03-11T14:16:21Z")

</div>

I can use ctrl. Too many more important things.
