History log of /freebsd-10.1-release/usr.sbin/kbdcontrol/kbdcontrol.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 268366 07-Jul-2014 ray

267622 Log:
Rename vt(4) vga module to dismiss interference with syscons(4) vga module.
267623 Log:
Remove stale link to deleted vt(4) xboxfb driver.
267624 Log:
syscons(4) and vt(4) can be built together now.
267625 Log:
Allow to disable syscons(4) if "hw.syscons.disable" kenv is set.
267626 Log:
Suspend vt(4) initialization if "kern.vt.disable" kenv is set.
267965 by emaste@ Log:
Use a common tunable to choose between vt(4)/sc(4)
With this change and previous work from ray@ it will be possible to put
both in GENERIC, and have one enabled by default, but allow the other to
be selected via the loader.
(The previous implementation had separate kern.vt.disable and
hw.syscons.disable tunables, and would panic if both drivers were
compiled in and neither was explicitly disabled.)
268175 by emaste@ Log:
Fix vt(4) detection in kbdcontrol and vidcontrol
As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.
Reported by: Trond Endrestøl
268045 by emaste@ Log:
Add vt(4) to GENERIC and retire the separate VT config
vt(4) and sc(4) can now coexist in the same kernel. To choose the vt
driver, set the loader tunable kern.vty=vt .

Sponsored by: The FreeBSD Foundation


# 267540 16-Jun-2014 ray

MFC: 266836, 266839
vt(4) support for vidcontrol(1).
o Teach vidcontrol(1) how to load vt(4) font.
o Teach vidcontrol(1) to distinct which virtual terminal system is running now.
o Load vt(4) fonts from different location.
o Add $FreeBSD$ tag for path.h.
vt(4) support for kbdcontrol(1).
Enable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps
if vt(4) is present.

Sponsored by: The FreeBSD Foundation


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 228976 29-Dec-2011 uqs

Reencode files to UTF-8. Drop CP1252 em-dash.


# 228437 12-Dec-2011 ed

Add missing static and const keywords to kbdcontrol.

None of the symbols provided by kbdcontrol.c are used by other source
files of this binary. Slightly reduce the binary size and make much more
symbols read-only by adding proper static and const keywords.


# 201387 02-Jan-2010 ed

ANSIfy some more tools in usr.sbin/.

Most of these tools build with WARNS=6, except for their use of K&R
function declarations.


# 197330 19-Sep-2009 ed

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/...


# 196500 24-Aug-2009 ed

Unhardcode 0x100 inside kbdcontrol.

In preparation for Unicode support for the keyboard layer, we'd better
get rid of all the hardcoded 0x100/0xff constants in kbdcontrol.
Instead, add a flag called SPECIAL stored in the top bit of the integer.

Adding Unicode support is very simple now; just change u_char map[] to
u_int map[] in keyent_t, change the bounds checking in kbdcontrol to
0x1FFFFF and modify the ioctls to allow loading these new keymaps.


# 164333 16-Nov-2006 ru

Replace magic numbers for console bell types with defines.


# 162327 15-Sep-2006 emax

Make op parameter to mux_keyboard() u_int instead of int.
This should fix sparc64 messages like

Sep 15 11:17:39 peahi kernel: WARNING pid 5477 (kbdcontrol): ioctl sign-extension ioctl ffffffff80244b45

PR: sparc64/96798
MFC after: 1 week


# 148017 14-Jul-2005 emax

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


# 133353 09-Aug-2004 jmg

fix bug which prevented programming function keys that were exactly 16
characters long.. strcpy was coping over the length...

PR: 52960
Submitted by: Dmitry Sivachenko
MFC after: 1 week


# 114601 03-May-2003 obrien

Use __FBSDID over rcsid[]. Protect copyright[] where needed.


# 99816 11-Jul-2002 alfred

WARNS?=4 cleanup.


# 99814 11-Jul-2002 alfred

de-__P()


# 97748 02-Jun-2002 schweikh

Fix typo in the BSD copyright: s/withough/without/

Spotted and suggested by: des
MFC after: 3 weeks


# 90394 08-Feb-2002 ru

FreeBSD 4.1 bootstrapping aid (HALT and PDWN are not defined there).


# 79677 13-Jul-2001 obrien

Repeat after me: "when reporting `file not found', perform a little bit of
useful HCI consideration and tell which file was being looked for".


# 77394 29-May-2001 sobomax

- Syncronizes command line syntax warnings with manpage (bin/27010);
- silence gcc(1) warnings (sobomax).

PR: 27010
Submitted by: Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>, sobomax
MFC after: 10 days


# 77329 28-May-2001 des

Move the scrollback controls from kbdcontrol to vidcontrol.
Also fix some style bugs in the code and poor language in the man pages.

Reviewed by: sobomax


# 77258 27-May-2001 dd

Instead of defining CONS_CLRHIST if it isn't defined, simply disable
the -c option [when CONS_CLRHIST isn't defined]. This is okay since
the only time CONS_CLRHIST wouldn't be defined is when kbdcontrol is
being built in bootstrap-tools, and -c isn't needed then.

Submitted by: imp


# 77255 27-May-2001 dd

A la rev. 1.36, define CONS_CLRHIST here if it isn't already since
this is a build tool, so it has to build on 4.x with the old headers.


# 77252 26-May-2001 dd

Add a -c option which clears the history buffer using the new
CONS_CLRHIST ioctl.

PR: 27616
Reviewed by: ru


# 76643 15-May-2001 imp

If PASTE isn't defined, define it as a transitional measure. This
allows me to complete make buildworld on my stable machine.

Also change termination case to be clearer what is going on while
searching for map files.


# 76569 14-May-2001 sobomax

Fix a possible segfault introduced in my previous commit.


# 76502 12-May-2001 sobomax

Allow path where keyboard maps are looked for to be altered using environment
variable.


# 74118 11-Mar-2001 ache

Implement keyboard paste

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


# 66834 08-Oct-2000 phk

Initiate deorbit burn sequence for <machine/console.h>.

Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>.
This is also the appropriate fix for exo-tree sources.

Put warnings in <machine/console.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/console.h> files will be removed.


# 65759 11-Sep-2000 dwmalone

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


# 54380 10-Dec-1999 yokota

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


# 51287 14-Sep-1999 peter

Fix warning: return type of `main' is not `int'


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48982 22-Jul-1999 yokota

- Add new argument `off' to the `-b' option. This will turn off
the bell.
- Document it in the man page.
- Fix a couple of typo in the man page.

Submitted by: cpiazza


# 48105 22-Jun-1999 yokota

Reflect recent changes in syscons.


# 46761 09-May-1999 yokota

Added backward compatibility to set key repeat rate.

Requested by: bde


# 44827 17-Mar-1999 gpalmer

Fix builds for the AXP

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>


# 44628 10-Mar-1999 yokota

Keyboard driver update in preparation for the USB keyboard driver.

- Refined internal interface in keyboard drivers so that:
1. the side effect of device probe is kept minimal,
2. polling mode function is added,
3. and new ioctl and configuration options are added (see below).

- Added new ioctl: KDSETREPEAT
Set keyboard typematic rate. There has existed an ioctl command,
KDSETRAD, for the same purpose. However, KDSETRAD is dependent on
the AT keyboard. KDSETREPEAT provides more generic interface.
KDSETRAD will still be supported in the atkbd driver.

- Added new configuration options:
ATKBD_DFLT_KEYMAP
Specify a keymap to be used as the default, built-in keymap.
(There has been undocumented options, DKKEYMAP, UKKEYMAP, GRKEYMAP,
SWKEYMAP, RUKEYMAP, ESKEYMAP, and ISKEYMAP to set the default keymap.
These options are now gone for good. The new option is more general.)

KBD_DISABLE_KEYMAP_LOADING
Don't allow the user to change the keymap.


# 43106 23-Jan-1999 dfr

Remove a workaround for the alpha port using an outdated version of syscons.


# 42606 12-Jan-1999 mjacob

Fix for compiling on alpha.
Obtained from:yokota@zodiac.mech.utsunomiya-u.ac.jp


# 42505 11-Jan-1999 yokota

The first stage of console driver reorganization: activate new
keyboard and video card drivers.


# 39047 10-Sep-1998 yokota

The fix in the previous commit was not sufficient; the upper 24 bits
of an int argument still contained garbage.
Pointed out by: bde
PR: bin/7799


# 38805 04-Sep-1998 yokota

Fix uninitialized variable.

PR: bin/7799
Submitted by: Sheldon Hearn (axl@iafrica.com)


# 38139 06-Aug-1998 yokota

The control code ^_ (0x1f) should really be called "us" rather than "ns".
In the mean time, accept both "us" and "ns" in the keymap file as ^_
for the compatibility with the existing keymap files.


# 38053 03-Aug-1998 yokota

Added the `saver' key definition. The saver key will activate the screen
saver if one is loaded.


# 38044 03-Aug-1998 yokota

- Set bell pitch in hertz and duration in msecs.
The change corresponds to syscons.c 1.268.

PR: bin/6037
Submitted by: Kouichi Hirabayashi (kh@eve.mogami-wire.co.jp)


# 35750 05-May-1998 des

Fix the search sequence for keymaps.

PR: bin/6522
Submitted by: Rudolf Cejka


# 32486 12-Jan-1998 yokota

Fix the output of `kbdcontrol -L _keymap_file_' which I broke in the last
commit ;-< /usr/src/release/sysinstall/Makefile uses it to generate
built-in keymap tables.


# 32316 07-Jan-1998 yokota

Added accent (dead) key support to syscons and kbdcontrol.

With a keymap with accent key definitions loaded to syscons, you press
an accent key followed by a regular letter key to produce an accented
letter. Press an accent key followed by the space bar to get the
accent letter itself.

Code is based on the ideas and work by jmrueda@diatel.upm.es and
totii@est.is.

PR: i386/4016

- Added keywords for accent (dead) keys: dgra, dacu, dcir, dtil...
- Recognize accent map definitions.
<accent_map_definition> ::= <accent_key_name> <accent_char> <accent_map>
<accent_key_name> ::= dgra | dacu | dcir | dtil | dmac | dbre | ddot |
duml | dsla | drin | dced | dapo | ddac | dogo |
dcar
<accent_map> ::= <map_entry>
| <map_entry> <accent_map>
<map_entry> ::= ( <regular_letter_char> <accented_char> )
- Use ioctls PIO_DEADKEYMAP and GIO_DEADKEYMAP to set and get the accent
key map table in syscons.
- Made the output for the -L option more intelligible and look like
initializers in kbdtables.h.
- Reorganized print functions in order to print the accent key map.


# 29603 19-Sep-1997 charnier

Use err(3). Typo fixes in man page.


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 19569 09-Nov-1996 joerg

Implement a -L option that dumps the compiled keymap (as C code) to
stdout. The next commit to sysinstall will use this...


# 9202 11-Jun-1995 rgrimes

Merge RELENG_2_0_5 into HEAD


# 8857 30-May-1995 rgrimes

Remove trailing whitespace.


# 6046 30-Jan-1995 sos

Added h option for setting the historysize.
fixed problem with Both n&C flags.


# 5994 28-Jan-1995 sos

Third round in syscons update.

Display update method changed, now allways write in memory buffer,
then periodically update physical display.
Speed improvements (now > 5 times faster than the old syscons).
History now circular buffer, with changeable size.
History scroll by up/down line, up/down page, home and end.
Backtab proberly implemented.
Now space for 96 function keys, 63 allocated standard, default now
SCO/SYSV compat again as in the old days.
New keyboard definition files ~share/syscons/keymaps/*
Misc fixes for old "hacks" that broke SCO/SYSV compat.
More that I forgot before writing this...


# 5536 12-Jan-1995 sos

First round in syscons update. Several new features has been added:

No kernel config options anymore besides keyboard language layout.
Virtual consoles are now dynamically allocated, no NCONS anymore.
Software cursor blinking/nonblinking.
Visual bell for laptops (don't beep at meetings :-).
Cursor/bell default type setable via config "flags" instead of as defines.
Cursor/bell type setable via ioctl's.
New video modes 80x30 80x60 for some laptops, and those with multisync monitors.
Scroll-lock history (length currently fixed at 100 lines).
Lots of cleanups, some only commented out for now (will goaway soon).
Support for new features in vidcontrol/kbdcontrol.
Updated manpages.


# 3864 25-Oct-1994 swallace

Applied patch009. Also added appropriate #include <string.h> which
would have detected that memset was not being passed a pointer in the first
place.

Submitted by: Gene Stark (?) - 1.1.5.1 patch009


# 2088 17-Aug-1994 sos

Added kbdcontrol util from 1.1.5.1+

Reviewed by:
Submitted by: