# How can I disable the sound when press \<Enter\> key?

**URL:** <https://forum.xojo.com/t/how-can-i-disable-the-sound-when-press-enter-key/85371>\
**Category:** General\
**Created:** [May 18, 2025, 8:37pm UTC](https://forum.xojo.com/t/how-can-i-disable-the-sound-when-press-enter-key/85371 "2025-05-18T20:37:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo\_Moreno](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/958977/32.png) [@Eduardo\_Moreno](https://forum.xojo.com/u/Eduardo_Moreno)\
**Post date:** [May 18, 2025, 8:37pm UTC](https://forum.xojo.com/t/how-can-i-disable-the-sound-when-press-enter-key/85371/1 "2025-05-18T20:37:03Z")

</div>

Hi everyone,

When I press the key in a DesktopTextField, a sound is heared.

How can I disebles this sound?

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [May 18, 2025, 8:51pm UTC](https://forum.xojo.com/t/how-can-i-disable-the-sound-when-press-enter-key/85371/2 "2025-05-18T20:51:59Z")

</div>

Have you tried to accept the key in the key down event of the control or window?

Or by having a default button on the window to take it?

---

<div class="post-metadata">

**Author:** ![Gilles\_Plante](https://forum.xojo.com/user_avatar/forum.xojo.com/gilles_plante/32/667_2.png) [@Gilles\_Plante](https://forum.xojo.com/u/Gilles_Plante)\
**Post date:** [May 18, 2025, 10:57pm UTC](https://forum.xojo.com/t/how-can-i-disable-the-sound-when-press-enter-key/85371/3 "2025-05-18T22:57:10Z")

</div>

And knowing which OS it is may hep. And seing the code for that field would also help people figure out what is going out.

---

<div class="post-metadata">

**Author:** ![Graham\_Busch](https://forum.xojo.com/user_avatar/forum.xojo.com/graham_busch/32/21827_2.png) [@Graham\_Busch](https://forum.xojo.com/u/Graham_Busch)\
**Post date:** [May 19, 2025, 12:50am UTC](https://forum.xojo.com/t/how-can-i-disable-the-sound-when-press-enter-key/85371/4 "2025-05-19T00:50:35Z")

</div>

Might be your input mask. Invalid keys can cause a beep.

---

<div class="post-metadata">

**Author:** ![Nedi\_Freguglia](https://forum.xojo.com/user_avatar/forum.xojo.com/nedi_freguglia/32/337_2.png) [@Nedi\_Freguglia](https://forum.xojo.com/u/Nedi_Freguglia)\
**Post date:** [May 19, 2025, 7:18am UTC](https://forum.xojo.com/t/how-can-i-disable-the-sound-when-press-enter-key/85371/5 "2025-05-19T07:18:11Z")

</div>

Insert “Return True” in the KeyDown event.

---

<div class="post-metadata">

**Author:** ![David\_Cox](https://forum.xojo.com/user_avatar/forum.xojo.com/david_cox/32/227_2.png) [@David\_Cox](https://forum.xojo.com/u/David_Cox)\
**Post date:** [May 19, 2025, 8:03am UTC](https://forum.xojo.com/t/how-can-i-disable-the-sound-when-press-enter-key/85371/6 "2025-05-19T08:03:46Z")

</div>

For me this only happens in Windows (not sure of OP target) and @Nedi_Freguglia has the correct solution that also worked for me.
