# Is it possible to add mouse locking in the New Keyboard extensions?

**URL:** <https://forum.makecode.com/t/is-it-possible-to-add-mouse-locking-in-the-new-keyboard-extensions/36779>\
**Category:** Help\
**Created:** [May 19, 2025, 5:58pm UTC](https://forum.makecode.com/t/is-it-possible-to-add-mouse-locking-in-the-new-keyboard-extensions/36779 "2025-05-19T17:58:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gl125371](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gl125371/32/29131_2.png) [@Gl125371](https://forum.makecode.com/u/Gl125371)\
**Post date:** [May 19, 2025, 5:58pm UTC](https://forum.makecode.com/t/is-it-possible-to-add-mouse-locking-in-the-new-keyboard-extensions/36779/1 "2025-05-19T17:58:11Z")

</div>

Hi, @richard, is it possible to add mouse locking into the Keyboard Events Extension?

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [May 19, 2025, 6:10pm UTC](https://forum.makecode.com/t/is-it-possible-to-add-mouse-locking-in-the-new-keyboard-extensions/36779/2 "2025-05-19T18:10:31Z")

</div>

no it’s not. we run in the browser which does not allow any kind of mouse locking/capturing behavior. and that’s generally a good thing; imagine if malicious ads could capture your mouse and not let you leave until you clicked on them!

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [May 19, 2025, 6:13pm UTC](https://forum.makecode.com/t/is-it-possible-to-add-mouse-locking-in-the-new-keyboard-extensions/36779/3 "2025-05-19T18:13:50Z")

</div>

actually i stand corrected: [https://developer.mozilla.org/en-US/docs/Web/API/Pointer\_Lock\_API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API)

but i don’t have plans to work on this right now; it would be sort of complicated to translate into blocks. maybe in the future!

---

<div class="post-metadata">

**Author:** ![Gl125371](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gl125371/32/29131_2.png) [@Gl125371](https://forum.makecode.com/u/Gl125371)\
**Post date:** [May 19, 2025, 6:14pm UTC](https://forum.makecode.com/t/is-it-possible-to-add-mouse-locking-in-the-new-keyboard-extensions/36779/4 "2025-05-19T18:14:32Z")

</div>

Ok. Thank you!

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [May 19, 2025, 10:26pm UTC](https://forum.makecode.com/t/is-it-possible-to-add-mouse-locking-in-the-new-keyboard-extensions/36779/5 "2025-05-19T22:26:50Z")

</div>

I was about to mention that I’ve definitely played browser games with this functionality. The only reason we would want it is for easy FPS games. I can’t see any other reason, unless you use the mouse movement like a joystick kinda? Idk.
