ATKBD(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

🌸 atkbd(4) β€” the AT keyboard interface, but make it bestie 🌸

okay so you opened the atkbd(4) page from the Kernel Interfaces Manual and you're like β€œwhat is this keyboard driver tea?” β˜• don't worry, I got you. this is literally the manual page but with the vibes turned all the way up. no cap, every detail is still here. πŸ’…


πŸŽ€ NAME πŸŽ€

atkbd β€” the AT keyboard interface. that's it. that's the whole vibe. 🎹✨


✨ SYNOPSIS ✨

here's the config tea, bestie. copy these exactly, okay? πŸ‘‡

options ATKBD_DFLT_KEYMAP
makeoptions ATKBD_DFLT_KEYMAP=_keymap_name_
options KBD_DISABLE_KEYMAP_LOAD
device atkbd

In /boot/device.hints:
hint.atkbd.0.at="atkbdc"
hint.atkbd.0.irq="1"

πŸ’– DESCRIPTION πŸ’–

so the atkbd driver, together with the atkbdc driver, gives you access to the AT 84 keyboard or the AT enhanced keyboard that's connected to the AT keyboard controller. it's giving β€œkeyboard middleman” energy. 🧚

this driver is required for the console driver syscons(4) or vt(4). so like, you literally need it if you want a console. periodt. πŸ’€

there can be only one atkbd device defined in the kernel configuration file. this device also requires the atkbdc keyboard controller to be present. and the irq number must always be 1 β€” there is no provision of changing the number. so don't even try it, bestie. it's not that kind of party. 🚫

🌟 Function Keys 🌟

the AT keyboard has a number of function keys. they are numbered as follows and can be associated with strings by the kbdcontrol(1) command. you can use a keyboard map file (see kbdmap(5)) to map them to arbitrary keys, particularly the functions in the range from 65 to 96 which are not used by default. so much potential ✨

  • 1, 2,...12 β€” F1, F2,... F12
  • 13, 14,...24 β€” Shift+F1, Shift+F2,... Shift+F12
  • 25, 26,...36 β€” Ctl+F1, Ctl+F2,... Ctl+F12
  • 37, 38,...48 β€” Shift+Ctl+F1, Shift+Ctl+F2,... Shift+Ctl+F12
  • 49 β€” Home and Numpad 7 (without NumLock)
  • 50 β€” Up Arrow and Numpad 8 (without NumLock)
  • 51 β€” Page Up and Numpad 9 (without NumLock)
  • 52 β€” Numpad -
  • 53 β€” Left Arrow and Numpad 4 (without NumLock)
  • 54 β€” Numpad 5 (without NumLock)
  • 55 β€” Right Arrow and Numpad 6 (without NumLock)
  • 56 β€” Numpad +
  • 57 β€” End and Numpad 1 (without NumLock)
  • 58 β€” Down Arrow and Numpad 2 (without NumLock)
  • 59 β€” Page Down and Numpad 3 (without NumLock)
  • 60 β€” Ins and Numpad 0 (without NumLock)
  • 61 β€” Del
  • 62 β€” Left GUI Key
  • 63 β€” Right GUI Key
  • 64 β€” Menu
  • 65, 66,...96 β€” free (not used by default)

want to assign a string to a function key? the man page for the kbdcontrol(1) command has the tea. go sip. 🍡


πŸ”§ DRIVER CONFIGURATION πŸ”§

okay so the atkbd driver has some knobs you can turn. let's get into it. πŸ› οΈ

🌸 Kernel Configuration Options 🌸

the following kernel configuration options control the atkbd driver.

  • ATKBD_DFLT_KEYMAP β€” this option sets the default, built-in keymap of the atkbd driver to the named keymap. see β€œEXAMPLES” below. πŸ‘€
  • KBD_DISABLE_KEYMAP_LOAD β€” the keymap can be modified by the kbdcontrol(1) command. this option will disable this feature and prevent the user from changing key assignment. so it's like a lock πŸ”’ for your keymap.

πŸ¦‹ Driver Flags πŸ¦‹

the atkbd driver accepts the following driver flags. they can be set either in /boot/device.hints, or else from within the boot loader (see loader(8)). pick your fighter πŸ’…

  • bit 0 (FAIL_IF_NO_KBD) β€” by default the atkbd driver will install even if a keyboard is not actually connected to the system. this option prevents the driver from being installed in this situation. so if you want it to fail when there's no keyboard, this is your bit. πŸ’€
  • bit 1 (NO_RESET) β€” when this option is given, the atkbd driver will not reset the keyboard when initializing it. it may be useful for laptop computers whose function keys have special functions and these functions are forgotten when the keyboard is reset. so it's like β€œdon't forget my special keys” energy. πŸ’–
  • bit 2 (ALT_SCANCODESET) β€” certain keyboards, such as those on some ThinkPad models, behave like the old XT keyboard and require this option. thinkpad girlies, this one's for you. πŸ‘‘
  • bit 3 (NO_PROBE_TEST) β€” when this option is given, the atkbd driver will not test the keyboard port during the probe routine. some machines hang during boot when this test is performed. so if your machine is dramatic, this bit is the fix. 😭

πŸ“ EXAMPLES πŸ“

here's where it gets practical. the atkbd driver requires the keyboard controller atkbdc. thus, the kernel configuration file should contain the following lines. πŸ‘‡

device atkbdc
device atkbd

the following example shows how to set the default, built-in keymap to jp.106.kbd. 🌸

device atkbdc
options ATKBD_DFLT_KEYMAP
makeoptions ATKBD_DFLT_KEYMAP=jp.106
device atkbd

in both cases, you also need to have following lines in /boot/device.hints. don't forget these, bestie. 🫢

hint.atkbdc.0.at="isa"
hint.atkbdc.0.port="0x060"
hint.atkbd.0.at="atkbdc"
hint.atkbd.0.irq="1"

πŸ‘€ SEE ALSO πŸ‘€

check out these besties πŸ‘―β€β™€οΈ


πŸ“œ HISTORY πŸ“œ

the atkbd driver first appeared in FreeBSD 3.1. vintage ✨


πŸ‘‘ AUTHORS πŸ‘‘

the atkbd driver was written by SΓΈren Schmidt <sos@FreeBSD.org> and Kazutaka Yokota <yokota@FreeBSD.org>. this manual page was written by Kazutaka Yokota. legends only. πŸ‘‘


this page is from Debian, dated January 29, 2008. stay slay, bestie. πŸ’…βœ¨

πŸ“¦ where this page comes from