# Hiding the mouse cursor (DEF-1619)

**URL:** <https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943>\
**Category:** Feature requests (USE GITHUB)\
**Created:** [February 4, 2016, 1:50pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943 "2016-02-04T13:50:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Godsend72](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/g/ec9cab/32.png) [@Godsend72](https://forum.defold.com/u/Godsend72)\
**Post date:** [February 4, 2016, 1:50pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/1 "2016-02-04T13:50:53Z")

</div>

How can I hide the mouse cursor in desktop application build?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [February 4, 2016, 10:00pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/2 "2016-02-04T22:00:34Z")

</div>

You can’t. But I’ve added a ticket in our issue tracker. DEF-1619.

---

<div class="post-metadata">

**Author:** ![Leviathan](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/leviathan/32/1649_2.png) [@Leviathan](https://forum.defold.com/u/Leviathan)\
**Post date:** [July 23, 2016, 3:00pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/3 "2016-07-23T15:00:35Z")

</div>

have there been any updates on this issue? because I would very much like to add my own custom cursor without the default one in the way

---

<div class="post-metadata">

**Author:** ![romlec115](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@romlec115](https://forum.defold.com/u/romlec115)\
**Post date:** [October 14, 2016, 7:16pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/4 "2016-10-14T19:16:02Z")

</div>

Tired to go through the documentation but couldn’t find a way to hide the mouse pointer, instead I found this thread. Is it possible at all?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [October 14, 2016, 8:37pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/5 "2016-10-14T20:37:06Z")

</div>

No, I’m afraid not. But as with everything else, the more people requesting it, the more likely it is to be implemented.

---

<div class="post-metadata">

**Author:** ![BitZoid](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/bitzoid/32/1833_2.png) [@BitZoid](https://forum.defold.com/u/BitZoid)\
**Post date:** [October 14, 2016, 9:11pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/6 "2016-10-14T21:11:31Z")

</div>

I can vouch for this. The cursor is often a big part of a game’s aesthetic, and I’m sure a lot of us would appreciate an easy way to change or hide it.

---

<div class="post-metadata">

**Author:** ![praleks0000](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/p/5e9695/32.png) [@praleks0000](https://forum.defold.com/u/praleks0000)\
**Post date:** [October 22, 2016, 1:26am UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/7 "2016-10-22T01:26:50Z")

</div>

I want custom cursor. Is there any changes for this issue?

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [October 22, 2016, 2:18am UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/8 "2016-10-22T02:18:58Z")

</div>

Both of these, setting custom hardware cursor, hiding mouse cursor, may be possible now with Lua C Packages although I have not tested it personally. I believe it’s GLFW 2 still so you can just call their functions maybe. Someone with time and motivation could try getting it to work.

Can anyone say the exact version number of GLFW 2 Defold is using?

> **[Programming in Lua : 8.2](https://www.lua.org/pil/8.2.html)**

May need to use a resource editor to add an extra cursor icon to your exe for Windows for example.

This is on my big list of todos but I won’t have free time in the near future for this to look into it.

---

<div class="post-metadata">

**Author:** ![jeevan](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@jeevan](https://forum.defold.com/u/jeevan)\
**Post date:** [November 1, 2016, 4:07am UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/9 "2016-11-01T04:07:17Z")

</div>

Just another vote for being able to hide the mouse cursor.

This would also have the side effect of allowing us to create custom cursors (by hiding the existing cursor and showing any sprite we want at the mouse location on update() ).

---

<div class="post-metadata">

**Author:** ![romlec115](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@romlec115](https://forum.defold.com/u/romlec115)\
**Post date:** [April 25, 2017, 7:22pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/10 "2017-04-25T19:22:28Z")

</div>

Hiding the hardware cursor is still not possible?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [April 25, 2017, 7:36pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/11 "2017-04-25T19:36:01Z")

</div>

My guess is that this will be possible in just a few weeks when we have added full native extension support on all platforms. Someone with more Windows, OSX and Linux support than me can probably tell which APIs that need to be called on the respective platforms.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [May 2, 2017, 8:23pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/12 "2017-05-02T20:23:15Z")

</div>

There’s a way to do it on Windows posted here now. Doing it on other OSes is a similar process probably but people on each should test.

> [@Is there a way to disable / grey out the \`maximize\`, \`minimize\` button on a window, for Windows OS?](https://forum.defold.com/t/is-there-a-way-to-disable-grey-out-the-maximize-minimize-button-on-a-window-for-windows-os/6906/4):
>
> I moduleified your code! Could be expanded as a general os utility module. I’ll play with it more too soon. Edit: actually going to start that process now! [os.lua](https://defold-forum-bucket.nbg1.your-objectstorage.com/original/2X/e/ed24b21135f141356d5f3e3d1d9714ebfe100159.lua) (4.3 KB) Added hide/show mouse on Windows for anyone who wanted that, but I would strongly hesitate using this until it’s ironed out a bit more! Also added window resizing and optional centering. Want your game to have a virtual resolution but to scale to a certain window size on launch and be centered? Now you can… on Windows! ut…

---

<div class="post-metadata">

**Author:** ![Leviathan](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/leviathan/32/1649_2.png) [@Leviathan](https://forum.defold.com/u/Leviathan)\
**Post date:** [December 20, 2017, 4:43pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/13 "2017-12-20T16:43:22Z")

</div>

any more updates on if this is possible??

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [December 20, 2017, 4:57pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/14 "2017-12-20T16:57:03Z")

</div>

You can hide your cursor using DefOs [DefOS - Extra native OS functions](https://forum.defold.com/t/defos-extra-native-os-functions/8042)  
And then add your own cursor in on\_input method

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [December 20, 2017, 5:15pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/15 "2017-12-20T17:15:20Z")

</div>

> [@AGulev](#):
>
> You can hide your cursor using DefOs DefOS - Extra native OS functions

I’m almost inclined to say that this issue should be closed. Yes, nice to have it in the engine, but if it’s readily available in an extension then it’s unlikely that we’ll give an engine integrated solution priority.

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [December 20, 2017, 5:17pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/16 "2017-12-20T17:17:55Z")

</div>

I’ll try to make example project and upload to github.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [December 20, 2017, 5:18pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/17 "2017-12-20T17:18:08Z")

</div>

I’m still of the opinion that all features of DefOS has should be core Defold eventually.

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [December 20, 2017, 6:20pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/18 "2017-12-20T18:20:16Z")

</div>

simple example  
[Custom Cursor Example.zip](https://defold-forum-bucket.nbg1.your-objectstorage.com/original/2X/0/03ae370ada94d9270ea25e98f0df33337e9c9ca2.zip) (2.2 MB)

> [@Pkeod](#):
>
> I’m still of the opinion that all features of DefOS has should be core Defold eventually.

I disagree with you.  
As I told [earlier](https://forum.defold.com/t/defold-timer-the-native-timer-extension/6581/9) modules with special functionality this is good architecture in my opinion. Better than huge engine with million api methods, and games which use only 1% of them.

I hope in future all exernal dependencies and appmanifest modules would be connect to the project by checkboxes (config with all modules can be generated and downloaded from the community page, for example).

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [December 20, 2017, 6:52pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/19 "2017-12-20T18:52:44Z")

</div>

Modularity is good and the appmanifest features are very good. I still think these features belong in core Defold and maintained by Defold team because they are universally important for shipping commercial games, maybe as an OS module which still be enabled or disabled with an appmanifest option.

---

<div class="post-metadata">

**Author:** ![ross.grams](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@ross.grams](https://forum.defold.com/u/ross.grams)\
**Post date:** [December 20, 2017, 6:54pm UTC](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943/20 "2017-12-20T18:54:48Z")

</div>

I agree with both of you. 🙂

It’s great that DefOS is a module that you only add in if you need it. Plus, mobile and web projects especially need to keep the size down.

But . . .

> [@britzl](#):
>
> if it’s readily available in an extension then it’s unlikely that we’ll give an engine integrated solution priority.

To be honest I don’t like ^ this ^ very much (no offense, Britzl). The things that DefOS does (and more) are pretty much essential for any desktop project. The current built-in desktop support is so limited, I really don’t think it’s possible to make a desktop game without an extension—at least not a polished and professional one.

This could be a long discussion, but anyway, I still hope for full, official support for desktop. Defold would be _ideal_ for desktop games, if only it had these features! People won’t choose an engine unless it already provides the things they need. ([like this guy](https://forum.defold.com/t/how-good-is-defold-for-desktop/10832))

[Next page](https://forum.defold.com/t/hiding-the-mouse-cursor-def-1619/943.md?page=2)
