Lines Matching refs:kbdfd
131 static int loadkey(int kbdfd, keyentry *kep);
132 static int dupkey(int kbdfd, dupentry *dep, int shiftmask);
133 static int swapkey(int kbdfd, dupentry *dep, int shiftmask);
148 register int kbdfd;
181 if ((kbdfd = open("/dev/kbd", O_WRONLY)) < 0) {
186 if (ioctl(kbdfd, KIOCTYPE, &type) < 0) {
199 if (ioctl(kbdfd, KIOCLAYOUT, &layout) < 0) {
233 if (ioctl(kbdfd, KIOCGKEY, &mapentry) < 0)
265 if (!loadkey(kbdfd, kep))
269 if (!loadkey(kbdfd, kep))
277 if (!swapkey(kbdfd, dep,
287 if (!dupkey(kbdfd, dep,
294 close(kbdfd);
310 int kbdfd;
318 if ((kbdfd = open("/dev/kbd", O_WRONLY)) < 0) {
323 ret = ioctl(kbdfd, KIOCSLAYOUT, layout);
328 close(kbdfd);
485 loadkey(kbdfd, kep)
486 int kbdfd;
489 if (ioctl(kbdfd, KIOCSKEY, &kep->ke_entry) < 0) {
497 dupkey(kbdfd, dep, shiftmask)
498 int kbdfd;
506 if (ioctl(kbdfd, KIOCGKEY, &entry) < 0) {
511 if (ioctl(kbdfd, KIOCSKEY, &entry) < 0) {
521 swapkey(kbdfd, dep, shiftmask)
522 int kbdfd;
530 if (ioctl(kbdfd, KIOCGKEY, &entry1) < 0) {
536 if (ioctl(kbdfd, KIOCGKEY, &entry2) < 0) {
541 if (ioctl(kbdfd, KIOCSKEY, &entry1) < 0) {
546 if (ioctl(kbdfd, KIOCSKEY, &entry2) < 0) {