Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/wsconsctl - Sync device lists with wsconsio.h.



details:   https://anonhg.NetBSD.org/src/rev/f409aef41826
branches:  trunk
changeset: 515221:f409aef41826
user:      ad <ad%NetBSD.org@localhost>
date:      Wed Sep 19 12:45:24 2001 +0000

description:
- Sync device lists with wsconsio.h.
- Get/set keyclick on keyboards that support it.

diffstat:

 sbin/wsconsctl/keyboard.c |  15 ++++++++++++++-
 sbin/wsconsctl/util.c     |  38 ++++++++++++++++++++++++++------------
 2 files changed, 40 insertions(+), 13 deletions(-)

diffs (110 lines):

diff -r 3dc13b328701 -r f409aef41826 sbin/wsconsctl/keyboard.c
--- a/sbin/wsconsctl/keyboard.c Wed Sep 19 12:42:11 2001 +0000
+++ b/sbin/wsconsctl/keyboard.c Wed Sep 19 12:45:24 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: keyboard.c,v 1.2 2000/07/06 16:30:47 hannken Exp $ */
+/*     $NetBSD: keyboard.c,v 1.3 2001/09/19 12:45:24 ad Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -44,6 +44,7 @@
 #include "wsconsctl.h"
 
 static int kbtype;
+static int keyclick;
 static struct wskbd_bell_data bell;
 static struct wskbd_bell_data dfbell;
 static struct wscons_keymap mapdata[KS_NUMKEYCODES];
@@ -69,6 +70,7 @@
     { "repeat.deln.default",   &dfrepeat.delN, FMT_UINT,       FLG_MODIFY },
     { "ledstate",              &ledstate,      FMT_UINT,       0 },
     { "encoding",              &kbdencoding,   FMT_KBDENC,     FLG_MODIFY },
+    { "keyclick",              &keyclick,      FMT_UINT,       FLG_MODIFY },
 };
 
 int keyboard_field_tab_len = sizeof(keyboard_field_tab)/
@@ -134,6 +136,11 @@
        if (field_by_value(&kbdencoding)->flags & FLG_GET)
                if (ioctl(fd, WSKBDIO_GETENCODING, &kbdencoding) < 0)
                        err(1, "WSKBDIO_GETENCODING");
+
+       if (field_by_value(&keyclick)->flags & FLG_GET) {
+               ioctl(fd, WSKBDIO_GETKEYCLICK, &keyclick);
+               /* Optional; don't complain. */
+       }
 }
 
 void
@@ -216,4 +223,10 @@
                        err(1, "WSKBDIO_SETENCODING");
                pr_field(field_by_value(&kbdencoding), " -> ");
        }
+
+       if (field_by_value(&keyclick)->flags & FLG_SET) {
+               if (ioctl(fd, WSKBDIO_SETKEYCLICK, &keyclick) < 0)
+                       err(1, "WSKBDIO_SETKEYCLICK");
+               pr_field(field_by_value(&keyclick), " -> ");
+       }
 }
diff -r 3dc13b328701 -r f409aef41826 sbin/wsconsctl/util.c
--- a/sbin/wsconsctl/util.c     Wed Sep 19 12:42:11 2001 +0000
+++ b/sbin/wsconsctl/util.c     Wed Sep 19 12:45:24 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.8 2000/03/14 08:11:53 sato Exp $ */
+/*     $NetBSD: util.c,v 1.9 2001/09/19 12:45:24 ad Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -56,20 +56,26 @@
 };
 
 static struct nameint kbtype_tab[] = {
-       { WSKBD_TYPE_LK201,     "lk201" },
-       { WSKBD_TYPE_LK401,     "lk401" },
-       { WSKBD_TYPE_PC_XT,     "pc-xt" },
-       { WSKBD_TYPE_PC_AT,     "pc-at" },
-       { WSKBD_TYPE_USB,       "usb" },
-       { WSKBD_TYPE_HPC_KBD,   "hpc-kbd" },
-       { WSKBD_TYPE_HPC_BTN,   "hpc-btn" },
+       { WSKBD_TYPE_LK201,             "lk201" },
+       { WSKBD_TYPE_LK401,             "lk401" },
+       { WSKBD_TYPE_PC_XT,             "pc-xt" },
+       { WSKBD_TYPE_PC_AT,             "pc-at" },
+       { WSKBD_TYPE_USB,               "usb" },
+       { WSKBD_TYPE_HPC_KBD,           "hpc-kbd" },
+       { WSKBD_TYPE_HPC_BTN,           "hpc-btn" },
+       { WSKBD_TYPE_ARCHIMEDES,        "archimedes" },
+       { WSKBD_TYPE_RISCPC,            "riscpc" },
 };
 
 static struct nameint mstype_tab[] = {
-       { WSMOUSE_TYPE_VSXXX,   "dec-tc" },
-       { WSMOUSE_TYPE_PS2,     "ps2" },
-       { WSMOUSE_TYPE_USB,     "usb" },
-       { WSMOUSE_TYPE_TPANEL,  "touch-pannel" },
+       { WSMOUSE_TYPE_VSXXX,           "dec-tc" },
+       { WSMOUSE_TYPE_PS2,             "ps2" },
+       { WSMOUSE_TYPE_USB,             "usb" },
+       { WSMOUSE_TYPE_LMS,             "logitech-bus" },
+       { WSMOUSE_TYPE_MMS,             "ms-inport" },
+       { WSMOUSE_TYPE_TPANEL,          "touch-panel" },
+       { WSMOUSE_TYPE_NEXT,            "next" },
+       { WSMOUSE_TYPE_ARCHIMEDES,      "archimedes" },
 };
 
 static struct nameint dpytype_tab[] = {
@@ -90,6 +96,14 @@
        { WSDISPLAY_TYPE_PXG,           "dex-pxg" },
        { WSDISPLAY_TYPE_TX,            "dex-tx" },
        { WSDISPLAY_TYPE_HPCFB,         "generic-hpc" },
+       { WSDISPLAY_TYPE_VIDC,          "arm-vidc" },
+       { WSDISPLAY_TYPE_SPX,           "dec-spx" },
+       { WSDISPLAY_TYPE_GPX,           "dec-gpx" },
+       { WSDISPLAY_TYPE_LCG,           "dec-lcg" },
+       { WSDISPLAY_TYPE_VAX_MONO,      "dec-vax-mono" },
+       { WSDISPLAY_TYPE_SB_P9100,      "sparcbook-p9100" },
+       { WSDISPLAY_TYPE_EGA,           "ega" },
+       { WSDISPLAY_TYPE_DCPVR,         "dreamcast-pvr" },
 };
 
 static struct nameint kbdenc_tab[] = {



Home | Main Index | Thread Index | Old Index