History log of /freebsd-current/sys/sys/kbio.h
Revision Date Author Comments
# 2ff63af9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/


# 971bac5a 06-Jul-2023 Michael <git@paepcke.de>

kbd: consolidate kb interfaces (phase one)

Refactor to eliminate duplicated rate and delay tables, with minor style
tweaks for changed lines. Remove an obsolete comment about needing to
convert from microseconds to ticks (that's done elsewhere). Remove
traiing whitespace in kbdcontrol.c.

Except for the new warning, no change in behavior

Sponsored by: DSS GmbH
Reviewed by: imp [minor style tweaks as well]
Pull Request: https://github.com/freebsd/pull/683
Differential Revision: https://reviews.freebsd.org/D38818


# f2005895 14-Feb-2023 Stefan Eßer <se@FreeBSD.org>

sys/kbio.h: make pre-unicode keymap support optional

FreeBSD-9 had introduced support for the full set of Unicode
characters to the parsing and processing of keymap character tables.

This support has been extended to cover the table for accented
characters that are reached via dead key combinations in FreeBSD-13.2.

New ioctls have been introduced to support both the pre-Unicode and
the Unicode formats and keyboard drivers have been extended to support
those ioctls.

This commit makes the ABI compatibility functions in the kernel
optional and dependent on COMPAT_FREEBSD13 in -CURRENT.

The kbdcontrol command in -CURRENT and 13-STABLE (before 13.2) has
been made ABI compatible with old kernels to allow a new world to be
run on an old kernel (that does not have full Unicode support for
keymaps).

This commit is not to merged back to 12-STABLE or 13-STABLE. It is
part of review D38465, which has been split into 3 separate commits
due to different MFC and life-time requirements of either commit.

Approved by: imp
Differential Revision: https://reviews.freebsd.org/D38465


# b92f8e5c 06-Feb-2023 Stefan Eßer <se@FreeBSD.org>

usr.sbin/kbdcontrol.c: Add backwards compatibility functions

This commit allows a kbdcontrol binary built with a version of kbio.h
that supports Unicode characters in dead key maps to load and display
keymaps including the dead key tables on a kernel built with a
previous version of kbio.h (that only supported 8 bit characters in
the dead key map).

This commit is meant as a temporary compatibility shim that will be
reverted when it can be assumed that all relevant systems have been
upgraded to a kernel that uses the updated kbio.h.

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38388


# 4972fb92 06-Feb-2023 Stefan Eßer <se@FreeBSD.org>

Support Unicode characters in keymap dead key tables

Support for Unicode characters had been added to the keyboard code,
but there are keymaps that have accented characters accessed via dead
key combinations, and those were still restricted to 8 bit codes.

This update to kbd.c adds support for Unicode characters and
compatibility code that allows a kbdcontrol command built from kbio.h
without these patches to work on a new kernel.

Compatibility code that allows a new kbdcontrol binary running on an
old kernel to load and display the dead key map will be committed in a
separate commit.

Reviewed by: imp, brooks
Approved by: brooks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38381


# f7e5465c 02-Feb-2023 Stefan Eßer <se@FreeBSD.org>

Revert "sys/kbio.h: support Unicode key codes in vt keymap files"

It has been pointed out, that this change causes ABI breakage for
[GP]IO_DEADKEYMAP. I'll create a review on phabricator.

Since the 8 bit limit on keycodes causes issues for certain keymaps,
a fix should be committed in time to allow a MFC to 13.2.

This reverts commit 1e0853ee84031e4131a0b8cc8737696f199d3d4c.

Reported by: Jessica Clarke


# 1e0853ee 01-Feb-2023 Stefan Eßer <se@FreeBSD.org>

sys/kbio.h: support Unicode key codes in vt keymap files

Some keyboard definitions return Unicode characters that cannot be
represented in the 8 bits provided by an u_char.

Extend then width of the keycode entries to 16 bits to allow for all
keycodes currently defined in share/vt/keymaps/*,kbd.

Reported by: yuri@aetern.org
MFC after: 3 days


# 78d4d8ee 17-Jul-2011 Ed Schouten <ed@FreeBSD.org>

Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.

Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls
to support wide characters. I created a patch to add ABI compatibility
for the old calls, but I didn't get any feedback to that.

It seems now people are upgrading from 8 to 9 they experience this
issue, so add it anyway.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# b05f9c86 19-Sep-2009 Ed Schouten <ed@FreeBSD.org>

Make the keyboard layer Unicode aware.

Just take keyent_t to use an u_int to store the Unicode codepoints.
Unfortunately the keymap is now too big to be loaded using an ioctl
argument, so change the ioctl to pick a pointer.

This change breaks kbdcontrol ABI. It doesn't break X11, because X11
doesn't do anything with syscons keymaps. It just switches the device
out of K_XLATE.

Obtained from: //depot/user/ed/newcons/...


# 46ce5e26 16-Sep-2009 Ed Schouten <ed@FreeBSD.org>

Extend the keyboard character size to 24 bits.

Because we use an int to store keyboard chacacters and their flags, we
can easily store the flags in the top byte instead of the second byte.
This means it's a lot easier to make Unicode work.

The only change that still needs to be made, is that keyent_t's map is
extended to u_int.

Obtained from: //depot/projects/newcons/sys/sys/kbio.h


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 9fddcc66 27-Sep-2006 Ruslan Ermilov <ru@FreeBSD.org>

Fix our ioctl(2) implementation when the argument is "int". New
ioctls passing integer arguments should use the _IOWINT() macro.
This fixes a lot of ioctl's not working on sparc64, most notable
being keyboard/syscons ioctls.

Full ABI compatibility is provided, with the bonus of fixing the
handling of old ioctls on sparc64.

Reviewed by: bde (with contributions)
Tested by: emax, marius
MFC after: 1 week


# f4e98881 03-Dec-2005 Ruslan Ermilov <ru@FreeBSD.org>

Fix -Wundef.


# 4673ea01 14-Jul-2005 Maksim Yevmenkin <emax@FreeBSD.org>

kbdmux(4) keyboard multiplexer integration

o Slightly change KBADDKBD and KBRELKBD ioctl() interface. Instead of passing
keyboard index pass keyboard_info_t structure with populated 'kb_unit' and
'kb_name' fields. Keyboard index is not very user-friendly and is not very
easy to obtain. Keyboard driver name and unit, on the other hand, is much
more user friendly and known almost all the time;

o Move definition of keyboard_info_t structure up;

o Teach kbdcontrol(1) how to attach/detach keyboards to/from the keyboard
multiplexor;

o Update kbdcontrol(1) man page and document new functionality.

To attach/detach keyboard to/from keyboard multiplexor one needs to use
keyboard device name (i.e. ukbd0).

MFC after: 1 week


# 04551c6c 13-Jul-2005 Maksim Yevmenkin <emax@FreeBSD.org>

kbdmux(4) keyboard multiplexer integration

o Add two new ioctl's KBADDKBD and KBRELKBD. These are used to add and remove
keyboard to (and from) kbdmux(4) keyboard multiplexer;

o Introduce new kbd_find_keyboard2() function. It does exactly the same job
as kbd_find_keyboard() function except it allows to specify starting index.
This function can be used to iterate over keyboards array;

o Re-implement kbd_find_keyboard() as call to kbd_find_keyboard2() with starting
index of zero;

o Make sure syscons(4) passed KBADDKBD and KBRELKBD ioctl's onto currently
active keyboard.

These changes should not have any visible effect.

MFC after: 1 week


# 4629b5e0 11-Mar-2001 Andrey A. Chernov <ache@FreeBSD.org>

Implement keyboard paste

PR: 25499
Submitted by: Gaspar Chilingarov <nm@web.am>


# 1c06ce61 11-Sep-2000 David Malone <dwmalone@FreeBSD.org>

Add the ability to define a "shutdown" and "shutdown and poweroff" key
to syscons. I have a man page to follow describing the format of the
kbdmap file.

PR: 19273
Reviewed by: sheldonh


# 664a31e4 28-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot). This is consistant with the other
BSD's who made this change quite some time ago. More commits to come.


# 57995893 13-Dec-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

- Remember the keyboard repeat delay and rate.
- Add a new ioctl, KDGETREPEAT, to retrieve the keyboard repeat rate.
- Delete unnecessary #include.


# 52990a39 09-Dec-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

Define some more function keys in the keymap: panic, lshifta, rshifta, etc.


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 6e8394b8 22-Jun-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

The second phase of syscons reorganization.

- Split syscons source code into manageable chunks and reorganize
some of complicated functions.

- Many static variables are moved to the softc structure.

- Added a new key function, PREV. When this key is pressed, the vty
immediately before the current vty will become foreground. Analogue
to PREV, which is usually assigned to the PrntScrn key.
PR: kern/10113
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>

- Modified the kernel console input function sccngetc() so that it
handles function keys properly.

- Reorganized the screen update routine.

- VT switching code is reorganized. It now should be slightly more
robust than before.

- Added the DEVICE_RESUME function so that syscons no longer hooks the
APM resume event directly.

- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING,
SC_NO_HISTORY and SC_NO_SYSMOUSE.
Various parts of syscons can be omitted so that the kernel size is
reduced.

SC_PIXEL_MODE
Made the VESA 800x600 mode an option, rather than a standard part of
syscons.

SC_DISABLE_DDBKEY
Disables the `debug' key combination.

SC_ALT_MOUSE_IMAGE
Inverse the character cell at the mouse cursor position in the text
console, rather than drawing an arrow on the screen.
Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)

SC_DFLT_FONT
makeoptions "SC_DFLT_FONT=_font_name_"
Include the named font as the default font of syscons. 16-line,
14-line and 8-line font data will be compiled in. This option replaces
the existing STD8X16FONT option, which loads 16-line font data only.

- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.

- The video driver provides a set of ioctl commands to manipulate the
frame buffer.

- New kernel configuration option: VGA_WIDTH90
Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These
modes are mot always supported by the video card.
PR: i386/7510
Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.

- The header file machine/console.h is reorganized; its contents is now
split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h
(another new file). machine/console.h is still maintained for
compatibility reasons.

- Kernel console selection/installation routines are fixed and
slightly rebumped so that it should now be possible to switch between
the interanl kernel console (sc or vt) and a remote kernel console
(sio) again, as it was in 2.x, 3.0 and 3.1.

- Screen savers and splash screen decoders
Because of the header file reorganization described above, screen
savers and splash screen decoders are slightly modified. After this
update, /sys/modules/syscons/saver.h is no longer necessary and is
removed.