Main index | Section 4 | Options |
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
ukbd_load="YES"
options KBD_INSTALL_CDEV
If both an AT keyboard USB keyboards are used at the same time, the AT keyboard will appear as kbd0 in /dev. The USB keyboards will be kbd1, kbd2, etc. You can see some information about the keyboard with the following command:
kbdcontrol -i < /dev/kbd1
or load a keymap with
kbdcontrol -l keymaps/pt.iso < /dev/kbd1
See kbdcontrol(1) for more possible options.
You can swap console keyboards by using the command
kbdcontrol -k /dev/kbd1
From this point on, the first USB keyboard will be the keyboard to be used by the console.
If you want to use a USB keyboard as your default and not use an AT keyboard at all, you will have to remove the device atkbd line from the kernel configuration file. Because of the device initialization order, the USB keyboard will be detected after the console driver initializes itself and you have to explicitly tell the console driver to use the existence of the USB keyboard. This can be done in one of the following two ways.
Run the following command as a part of system initialization:
kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null
(Note that as the USB keyboard is the only keyboard, it is accessed as /dev/kbd0) or otherwise tell the console driver to periodically look for a keyboard by setting a flag in the kernel configuration file:
device sc0 at isa? flags 0x100
With the above flag, the console driver will try to detect any keyboard in the system if it did not detect one while it was initialized at boot time.
Make the keyboards available through a character device in /dev.
The above lines will put the French ISO keymap in the ukbd driver. You can specify any keymap in /usr/share/syscons/keymaps or /usr/share/vt/keymaps (depending on the console driver being used) with this option.
Do not allow the user to change the keymap. Note that these options also affect the AT keyboard driver, atkbd(4).
hw.usb.ukbd.debug | |
Debug output level, where 0 is debugging disabled and larger values increase debug message verbosity. Default is 0. | |
/dev/kbd* | |
blocking device nodes | |
Add the ukbd driver to the kernel.
This manual page was written by Nick Hibma <Mt n_hibma@FreeBSD.org> with a large amount of input from Kazutaka YOKOTA <Mt yokota@zodiac.mech.utsunomiya-u.ac.jp>.
UKBD (4) | April 24, 2018 |
Main index | Section 4 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | If you are angry with someone, you should walk a mile in their shoes - then you'll be a mile away from them, and you'll have their shoes. | ” |