# Is there a way to detect if on browser for browser events?

**URL:** <https://forum.makecode.com/t/is-there-a-way-to-detect-if-on-browser-for-browser-events/38440>\
**Category:** Help\
**Tags:** game\
**Created:** [August 4, 2025, 5:06pm UTC](https://forum.makecode.com/t/is-there-a-way-to-detect-if-on-browser-for-browser-events/38440 "2025-08-04T17:06:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![technonux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/technonux/32/7924_2.png) [@technonux](https://forum.makecode.com/u/technonux)\
**Post date:** [August 4, 2025, 5:06pm UTC](https://forum.makecode.com/t/is-there-a-way-to-detect-if-on-browser-for-browser-events/38440/1 "2025-08-04T17:06:18Z")

</div>

I want the game to work differently on real hardware?

also what happens if u try use it on real hardware

---

<div class="post-metadata">

**Author:** ![Allegory\_Cheese](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/allegory_cheese/32/31845_2.png) [@Allegory\_Cheese](https://forum.makecode.com/u/Allegory_Cheese)\
**Post date:** [August 5, 2025, 5:07pm UTC](https://forum.makecode.com/t/is-there-a-way-to-detect-if-on-browser-for-browser-events/38440/2 "2025-08-05T17:07:39Z")

</div>

For Hardware use the story extension to ask if computer or hard ware and if it is on hardware then browser events wont work and so will attached code

---

<div class="post-metadata">

**Author:** ![technonux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/technonux/32/7924_2.png) [@technonux](https://forum.makecode.com/u/technonux)\
**Post date:** [August 8, 2025, 10:16pm UTC](https://forum.makecode.com/t/is-there-a-way-to-detect-if-on-browser-for-browser-events/38440/3 "2025-08-08T22:16:53Z")

</div>

thanks
