12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

WSKBD (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> WSKBD (9)<strong>NAME</strong>wskbd, wskbd_input, wskbd_rawinput, wskbd_cnattach, wskbd_cndetach,wskbddevprint —wscons keyboard supportSYNOPSIS#include #include #include #include voidwskbd_input(struct device ∗kbddev , u_int type , int value);voidwskbd_rawinput(struct device ∗kbddev , u_char ∗buf , int len);voidwskbd_cnattach(const struct wskbd_consops ∗consops , void ∗conscookie ,const struct wskbd_mapdata ∗mapdata);voidwskbd_cndetach();intwskbddevprint(void ∗aux , const char ∗pnp);DESCRIPTIONThe wskbd module is a component of the wscons(9) framework to provide machine-independent keyboardsupport. Most of the support is provided by the wskbd(4) device driver, which must be a child of the hardwaredevice driver.DATA TYPESKeyboard drivers providing support for wscons keyboards will make use of the following data types:kbd_tAn opaque type describing keyboard properties.keysym_tThe wscons keyboard-independent symbolic representation of the keypress.struct wskbd_accessopsAstructure used to specify the keyboard access functions. All keyboards must provide this structureand pass it to the wskbd(4) child device. It has the following members:intvoidint(∗enable)(void ∗, int);(∗set_leds)(void ∗, int);(∗ioctl)(void ∗v, u_long cmd, void ∗data,int flag, struct lwp ∗l);The enable member defines the function to be called to enable keypress passing to wscons.The set_leds member defined the function to be called to set the LEDs on the keyboard. Theioctl member defines the function to be called to perform keyboard-specific ioctl calls.There is a void ∗ cookie provided by the keyboard driver associated with these functions,which is passed to them when they are invoked.struct wskbd_consopsAstructure used to specify the keyboard console operations. All keyboards which can operate asaconsole must provide this structure and pass it to the wskbd(4) child device. If the keyboard<strong>NetBSD</strong> 3.0 December 20, 2005 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!