Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xorg-server/dist/hw/sun Inform detected keybo...
details: https://anonhg.NetBSD.org/xsrc/rev/51109dbc4ca0
branches: trunk
changeset: 10536:51109dbc4ca0
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Aug 09 06:30:46 2020 +0000
description:
Inform detected keyboard type and layout via LogMessage().
diffstat:
external/mit/xorg-server/dist/hw/sun/sunInit.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r 3ef2e10ffe63 -r 51109dbc4ca0 external/mit/xorg-server/dist/hw/sun/sunInit.c
--- a/external/mit/xorg-server/dist/hw/sun/sunInit.c Tue Aug 04 15:47:27 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/sun/sunInit.c Sun Aug 09 06:30:46 2020 +0000
@@ -526,7 +526,13 @@
if (sunPtrPriv.fd < 0)
FatalError ("Cannot open /dev/mouse, error %d\n", errno);
getKbdType ();
- if (sunKbdPriv.type == KB_SUN4) {
+ switch (sunKbdPriv.type) {
+ case KB_SUN2:
+ case KB_SUN3:
+ LogMessage(X_INFO, "Sun type %d Keyboard\n", sunKbdPriv.type);
+ break;
+ case KB_SUN4:
+#define LAYOUT_US5 33
(void) ioctl (sunKbdPriv.fd, KIOCLAYOUT, &sunKbdPriv.layout);
if (sunKbdPriv.layout < 0 ||
sunKbdPriv.layout > sunMaxLayout ||
@@ -534,6 +540,12 @@
FatalError ("Unsupported keyboard type 4 layout %d\n",
sunKbdPriv.layout);
sunKeySyms[KB_SUN4].map = sunType4KeyMaps[sunKbdPriv.layout];
+ LogMessage(X_INFO, "Sun type %d Keyboard, layout %d\n",
+ sunKbdPriv.layout >= LAYOUT_US5 ? 5 : 4, sunKbdPriv.layout);
+ break;
+ default:
+ LogMessage(X_INFO, "Unknown keyboard type\n");
+ break;
}
inited = 1;
}
Home |
Main Index |
Thread Index |
Old Index