I have a fullscreen app and I'm trying to hide the mouse cursor. The setup is Kivy 1.9.0 on Python 3.4.1 for Windows, using the prepared packages.
I have tried the following approaches, with no success:
1- Using Config object:
from kivy.config import Config
Config.set("graphics", "show_cursor", 0)
2- Editing .kivy\config.ini:
[graphics]
.
.
.
show_cursor = 0
3- Using pygame:
import pygame
pygame.init()
pygame.mouse.set_visible(False)
4- Moving the mouse off-screen:
def move_mouse_away(etype, motionevent):
# this one doesn't get called at all
Window.mouse_pos = [1400, 1000]
Window.bind(on_motion=move_mouse_away)
5- Using Clock for a similar effect:
Clock.schedule_interval(self._reset_mouse, 0.05)
def _reset_mouse(self, time):
Window.mouse_pos = [1400, 1400]
I'm a little out of ideas now.
The “Pointer Options” tab displays various mouse settings. Here, in the “Visibility” section, enable the “Hide Pointer While Typing” option. Then click “Apply” and “OK.” And you're all set.
You can use Window.show_cursor
It was added in kivy version 1.9.1
from kivy.core.window import Window
Window.show_cursor = False
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With