Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide cursor #6

Open
nospam2k opened this issue Sep 23, 2021 · 0 comments
Open

Hide cursor #6

nospam2k opened this issue Sep 23, 2021 · 0 comments

Comments

@nospam2k
Copy link

nospam2k commented Sep 23, 2021

I know this is old code but I was able to use it with Java 11 on RPI 3+ with Buster.

I found this c code for hiding/unhiding the cursor. Is there are way to implement this into your code? Or is there something already implemented in your code that I missed?

void fbcon_cursor (int blank)
{
int fd = open("/dev/tty1", O_RDWR);
if(0 < fd)
{
write(fd, "\033[?25", 5);
write(fd, blank ? "h" : "l", 1);
}
close(fd);
}

void fbcon_blank (int blank)
{
ioctl(fb.fd, FBIOBLANK, blank ? VESA_POWERDOWN: VESA_NO_BLANKING);
return;
}

where fb.fd is the fd for /dev/fb0. Works for me, anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant