Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Jun 2026 05:07:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 295839] Keyboard remains in K_RAW mode after being detached from kbdmux
Message-ID:  <bug-295839-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295839

            Bug ID: 295839
           Summary: Keyboard remains in K_RAW mode after being detached
                    from kbdmux
           Product: Base System
           Version: 15.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: freebsd-bugs2@wesha.name

When a new USB keyboard is connected to the system, kbdmux innediately grabs it
and switches into K_RAW mode:

----------------kbdmux.c------------------------
case KBADDKBD: /* add keyboard to the mux */
  [.............]
  mode = K_RAW;
  error = kbdd_ioctl(k->kbd, KDSKBMODE, (caddr_t)&mode);
  [.............] 
------------------------------------------------

However, when the user detaches that keyboard from kbdmux by doing

   kbdcontrol -A hkbd0 < /dev/kbdmux0

kbdmux does not switch that keyboard to "normal" mode; it remains in K_RAW mode
and cannot be used normally.

One use case for this is one computer used by 2 people, each with their own
keyboard and monitor.
Another is devices that present themselves as HID keyboards, one such example
being a barcode scanner.

Desired behavior:
* Option 1: upon detaching the keyboard from kbdmux, it is returned into
"normal" mode;
* Option 2: add capability to switch a keyboard into the desired mode to
kbdcontrol utility.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-295839-227>