summaryrefslogtreecommitdiff
path: root/driver/xf86-input-keyboard/src
diff options
context:
space:
mode:
authorAlexandr Shadchin <shadchin@cvs.openbsd.org>2015-12-17 06:03:11 +0000
committerAlexandr Shadchin <shadchin@cvs.openbsd.org>2015-12-17 06:03:11 +0000
commit8f09aab1cad932830218bea44d1c104ba3b69b21 (patch)
treed2fe78def812f3295364dffc884d883aa319f1ea /driver/xf86-input-keyboard/src
parent1e83aae707281508791ef13a155b317d7ac8d1f5 (diff)
Update to xf86-input-keyboard 1.8.1.
ok matthieu@
Diffstat (limited to 'driver/xf86-input-keyboard/src')
-rw-r--r--driver/xf86-input-keyboard/src/atKeynames.h2
-rw-r--r--driver/xf86-input-keyboard/src/at_scancode.c5
-rw-r--r--driver/xf86-input-keyboard/src/lnx_kbd.c11
-rw-r--r--driver/xf86-input-keyboard/src/xf86OSKbd.h2
4 files changed, 18 insertions, 2 deletions
diff --git a/driver/xf86-input-keyboard/src/atKeynames.h b/driver/xf86-input-keyboard/src/atKeynames.h
index 85f13ac32..d11475303 100644
--- a/driver/xf86-input-keyboard/src/atKeynames.h
+++ b/driver/xf86-input-keyboard/src/atKeynames.h
@@ -287,6 +287,8 @@
#define KEY_0x74 0xD3
#define KEY_0x75 0xD4
#define KEY_0x76 0xD5
+#define KEY_R_0xF4 0xF4
+#define KEY_R_0xF5 0xF5
/* These are for "notused" and "unknown" entries in translation maps. */
#define KEY_NOTUSED 0
diff --git a/driver/xf86-input-keyboard/src/at_scancode.c b/driver/xf86-input-keyboard/src/at_scancode.c
index a519a6cd7..4893e0dcc 100644
--- a/driver/xf86-input-keyboard/src/at_scancode.c
+++ b/driver/xf86-input-keyboard/src/at_scancode.c
@@ -108,6 +108,11 @@ ATScancode(InputInfoPtr pInfo, int *scanCode)
case KEY_F6: *scanCode = KEY_F16; break;
case KEY_F7: *scanCode = KEY_F17; break;
case KEY_KP_Plus: *scanCode = KEY_KP_DEC; break;
+ /* Remap codes 0x09 and 0x11 to avoid overlap with the
+ Henkan and Muhenkan keys on Japanese pc106 or pc103
+ keyboards */
+ case 0x01: *scanCode = KEY_R_0xF4; break;
+ case 0x03: *scanCode = KEY_R_0xF5; break;
case 0x2A:
case 0x36:
return TRUE;
diff --git a/driver/xf86-input-keyboard/src/lnx_kbd.c b/driver/xf86-input-keyboard/src/lnx_kbd.c
index e69e1b6c9..c2211947a 100644
--- a/driver/xf86-input-keyboard/src/lnx_kbd.c
+++ b/driver/xf86-input-keyboard/src/lnx_kbd.c
@@ -70,7 +70,7 @@ SetKbdLeds(InputInfoPtr pInfo, int leds)
static int
GetKbdLeds(InputInfoPtr pInfo)
{
- char real_leds;
+ char real_leds = 0;
int leds = 0;
ioctl(pInfo->fd, KDGETLED, &real_leds);
@@ -187,8 +187,17 @@ OpenKeyboard(InputInfoPtr pInfo)
s = xf86SetStrOption(pInfo->options, "Device", NULL);
if (s == NULL) {
+ int rc;
pInfo->fd = xf86Info.consoleFd;
pKbd->isConsole = TRUE;
+
+ rc = tcsetpgrp(pInfo->fd, getpgid(0));
+ if (rc < 0) {
+ xf86IDrvMsg(pInfo, X_ERROR,
+ "failed to set us as foreground pgrp (%s)\n",
+ strerror(errno));
+ }
+
} else {
pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
if (pInfo->fd == -1) {
diff --git a/driver/xf86-input-keyboard/src/xf86OSKbd.h b/driver/xf86-input-keyboard/src/xf86OSKbd.h
index 86df0f594..c62e933d3 100644
--- a/driver/xf86-input-keyboard/src/xf86OSKbd.h
+++ b/driver/xf86-input-keyboard/src/xf86OSKbd.h
@@ -97,4 +97,4 @@ typedef struct {
KbdProtocolId id;
} KbdProtocolRec;
-Bool xf86OSKbdPreInit(InputInfoPtr pInfo);
+_X_EXPORT Bool xf86OSKbdPreInit(InputInfoPtr pInfo);