Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Nov 2016 15:33:35 +0700
From:      Olivier <>
Subject:   New behavious in /dev/consolectl
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help

I have a simple program that read the middle button of the mouse at
start-up and reply with (close/pressed or open/released) (see below).

In previous versions of FreeBSD (up to 9 I think), if the middle button
was pressed when I launched the program, it was detected, and I could
launch and relaunch the program, it was always replying with "close".

Now (FreeBSD 10), the close is only detected on the first run. The
second run will reply "open", even if I keep the button pressed all the
time; like if by reading the button, I was erasing the memory.

I( am pretty positive it was not an issue on previous versions of
FreeBSD, as I have been relying on this for a long time.

Any idea what has changed?

Best regards,


#include <sys/mouse.h>
#include <sys/consio.h>
#include <stdio.h>
#include <fcntl.h>

int main (int argc, char ** argv, char** env) {
  int fd_mouse;
  struct mouse_info mouse_info;
   fd_mouse=open("/dev/consolectl", O_RDWR); 
  ioctl(fd_mouse, CONS_MOUSECTL, &mouse_info);
  if ((( {
  else {


Want to link to this message? Use this URL: <>