Prepare for wsconsctrl:

- clean up keycode defines.
- allow easy parse of wsksymdef.h.
- add misssing KB_IT entry.
- set layout to KB_USER after ioctl WSKBDIO_SETMAP.
This commit is contained in:
hannken 1998-12-28 13:48:24 +00:00
parent 5f22ea3a31
commit bf9e279952
3 changed files with 21 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: wskbd.c,v 1.13 1998/09/17 18:05:43 drochner Exp $ */
/* $NetBSD: wskbd.c,v 1.14 1998/12/28 13:48:24 hannken Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@ -36,7 +36,7 @@
static const char _copyright[] __attribute__ ((unused)) =
"Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.";
static const char _rcsid[] __attribute__ ((unused)) =
"$NetBSD: wskbd.c,v 1.13 1998/09/17 18:05:43 drochner Exp $";
"$NetBSD: wskbd.c,v 1.14 1998/12/28 13:48:24 hannken Exp $";
/*
* Copyright (c) 1992, 1993
@ -724,6 +724,7 @@ getkeyrepeat:
wskbd_init_keymap(umdp->maplen,
&sc->sc_map, &sc->sc_maplen);
bcopy(buf, sc->sc_map, len);
sc->sc_layout = KB_USER;
}
free(buf, M_TEMP);
return(error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: wskbdmap_mfii.h,v 1.7 1998/09/17 18:14:06 drochner Exp $ */
/* $NetBSD: wskbdmap_mfii.h,v 1.8 1998/12/28 13:48:24 hannken Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#define KC(n) (0xe000 | (n)) /* see wsksymvar.h */
#define KC(n) KS_KEYCODE(v)
static const keysym_t pckbd_keydesc_us[] = {
/* pos command normal shifted */

View File

@ -1,4 +1,4 @@
/* $NetBSD: wsksymdef.h,v 1.12 1998/10/03 11:59:44 drochner Exp $ */
/* $NetBSD: wsksymdef.h,v 1.13 1998/12/28 13:48:24 hannken Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -42,11 +42,18 @@
/*
* Keysymbols encoded as 16-bit Unicode. Special symbols
* are encoded in the private area (0xe000 - 0xf8ff).
* The area 0xe000 - 0xefff is used in wskbdmap.c and may
* never be assigned to any keysym.
* Currently only ISO Latin-1 subset is supported.
*
* This file is parsed from userland. Encode keysyms as:
*
* #define KS_[^ \t]* 0x[0-9a-f]*
*
* and don't modify the border comments.
*/
/*BEGINKEYSYMDECL*/
/*
* Group Ascii (ISO Latin1) character in low byte
*/
@ -406,6 +413,8 @@
#define KS_voidSymbol 0xf500
/*ENDKEYSYMDECL*/
/*
* keysym groups
*/
@ -419,6 +428,9 @@
#define KS_GROUP_Ascii 0xf802 /* not encoded in keysym */
#define KS_GROUP_Keycode 0xf803 /* not encoded in keysym */
#define KS_NUMKEYCODES 0x1000
#define KS_KEYCODE(v) ((v) | 0xe000)
#define KS_GROUP(k) ((k) >= 0x0300 && (k) < 0x0370 ? KS_GROUP_Dead : \
(((k) & 0xf000) == 0xe000 ? KS_GROUP_Keycode : \
(((k) & 0xf800) == 0xf000 ? ((k) & 0xff00) : \
@ -450,6 +462,7 @@
{ KB_US, "us" }, \
{ KB_DE, "de" }, \
{ KB_DK, "dk" }, \
{ KB_IT, "it" }, \
{ KB_FR, "fr" }, \
{ KB_NODEAD, "nodead" }, \
{ KB_DECLK, "declk" }, \