Unverified Commit abaebb5b authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/improve_keyboard_light' into 3.6.x

parents 7610c0f1 a02b645b
......@@ -1168,7 +1168,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
nxagentXkbNumTrap = 1;
}
nxagentInitKeyboardState();
nxagentInitXkbKeyboardState();
nxagentXkbCapsTrap = 0;
nxagentXkbNumTrap = 0;
......@@ -2079,7 +2079,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
* state modification event.
*/
if (nxagentHandleKeyboardEvent(&X) == 0 && nxagentHandleXFixesSelectionNotify(&X) == 0)
if (nxagentHandleXkbKeyboardStateEvent(&X) == 0 && nxagentHandleXFixesSelectionNotify(&X) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentDispatchEvents: WARNING! Unhandled event code [%d].\n",
......@@ -2318,7 +2318,7 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result)
nxagentXkbNumTrap = 1;
}
nxagentInitKeyboardState();
nxagentInitXkbKeyboardState();
nxagentXkbCapsTrap = 0;
nxagentXkbNumTrap = 0;
......@@ -2785,22 +2785,22 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
return 1;
}
int nxagentHandleKeyboardEvent(XEvent *X)
int nxagentHandleXkbKeyboardStateEvent(XEvent *X)
{
XkbEvent *xkbev = (XkbEvent *) X;
#ifdef TEST
fprintf(stderr, "nxagentHandleKeyboardEvent: Handling event with caps [%d] num [%d] locked [%d].\n",
nxagentXkbState.Caps, nxagentXkbState.Num, nxagentXkbState.Locked);
#endif
if (xkbev -> type == nxagentXkbInfo.EventBase + XkbEventCode &&
xkbev -> any.xkb_type == XkbStateNotify)
{
#ifdef TEST
fprintf(stderr, "%s: Handling event with caps [%d] num [%d] locked [%d].\n", __func__,
nxagentXkbState.Caps, nxagentXkbState.Num, nxagentXkbState.Locked);
#endif
nxagentXkbState.Locked = xkbev -> state.locked_mods;
#ifdef TEST
fprintf(stderr, "nxagentHandleKeyboardEvent: Updated XKB locked modifier bits to [%x].\n",
fprintf(stderr, "%s: Updated XKB locked modifier bits to [%x].\n", __func__,
nxagentXkbState.Locked);
#endif
......@@ -2812,7 +2812,7 @@ int nxagentHandleKeyboardEvent(XEvent *X)
nxagentXkbState.Caps = 1;
#ifdef TEST
fprintf(stderr, "nxagentHandleKeyboardEvent: Sending fake key [66] to engage capslock.\n");
fprintf(stderr, "%s: Sending fake key [66] to engage capslock.\n", __func__);
#endif
if (!nxagentXkbCapsTrap)
......@@ -2827,7 +2827,7 @@ int nxagentHandleKeyboardEvent(XEvent *X)
nxagentXkbState.Caps = 0;
#ifdef TEST
fprintf(stderr, "nxagentHandleKeyboardEvent: Sending fake key [66] to release capslock.\n");
fprintf(stderr, "%s: Sending fake key [66] to release capslock.\n", __func__);
#endif
nxagentSendFakeKey(66);
......@@ -2839,7 +2839,7 @@ int nxagentHandleKeyboardEvent(XEvent *X)
{
#ifdef TEST
fprintf(stderr, "nxagentHandleKeyboardEvent: Sending fake key [66] to release capslock.\n");
fprintf(stderr, "%s: Sending fake key [66] to release capslock.\n", __func__);
#endif
nxagentSendFakeKey(66);
......@@ -2851,7 +2851,7 @@ int nxagentHandleKeyboardEvent(XEvent *X)
nxagentXkbState.Num = 1;
#ifdef TEST
fprintf(stderr, "nxagentHandleKeyboardEvent: Sending fake key [77] to engage numlock.\n");
fprintf(stderr, "%s: Sending fake key [77] to engage numlock.\n", __func__);
#endif
if (!nxagentXkbNumTrap)
......@@ -2866,7 +2866,7 @@ int nxagentHandleKeyboardEvent(XEvent *X)
nxagentXkbState.Num = 0;
#ifdef TEST
fprintf(stderr, "nxagentHandleKeyboardEvent: Sending fake key [77] to release numlock.\n");
fprintf(stderr, "%s: Sending fake key [77] to release numlock.\n", __func__);
#endif
nxagentSendFakeKey(77);
......@@ -2878,7 +2878,7 @@ int nxagentHandleKeyboardEvent(XEvent *X)
{
#ifdef TEST
fprintf(stderr, "nxagentHandleKeyboardEvent: Sending fake key [77] to release numlock.\n");
fprintf(stderr, "%s: Sending fake key [77] to release numlock.\n", __func__);
#endif
nxagentSendFakeKey(77);
......@@ -3792,7 +3792,7 @@ void nxagentSendFakeKey(int key)
mieqEnqueue(&fake);
}
int nxagentInitKeyboardState()
int nxagentInitXkbKeyboardState()
{
XEvent X;
......@@ -3801,7 +3801,7 @@ int nxagentInitKeyboardState()
XkbEvent *xkbev = (XkbEvent *) &X;
#ifdef TEST
fprintf(stderr, "nxagentInitKeyboardState: Initializing XKB state.\n");
fprintf(stderr, "%s: Initializing XKB state.\n", __func__);
#endif
memset(&X, 0, sizeof(XEvent));
......@@ -3821,14 +3821,14 @@ int nxagentInitKeyboardState()
}
#ifdef TEST
fprintf(stderr, "nxagentInitKeyboardState: Assuming XKB locked modifier bits [%x].\n",
fprintf(stderr, "%s: Assuming XKB locked modifier bits [%x].\n", __func__,
xkbev -> state.locked_mods);
#endif
xkbev -> type = nxagentXkbInfo.EventBase + XkbEventCode;
xkbev -> any.xkb_type = XkbStateNotify;
nxagentHandleKeyboardEvent(&X);
nxagentHandleXkbKeyboardStateEvent(&X);
return 1;
}
......
......@@ -99,7 +99,7 @@ extern void nxagentGetEventMask(WindowPtr pWin, Mask *mask_return);
* the internal state. This is unlikely to happen.
*/
extern int nxagentInitKeyboardState(void);
extern int nxagentInitXkbKeyboardState(void);
/*
* Update the keyboard state according
......@@ -107,7 +107,7 @@ extern int nxagentInitKeyboardState(void);
* from the remote X server.
*/
extern int nxagentHandleKeyboardEvent(XEvent *X);
extern int nxagentHandleXkbKeyboardStateEvent(XEvent *X);
/*
* Handle sync and karma messages and
......
......@@ -421,13 +421,19 @@ disable use of shared pixmaps
enable use of shared pixmaps
.TP 8
.B \-noignore
don't ignore pointer and keyboard configuration changes mandated by clients
don't ignore pointer and keyboard configuration changes mandated by
clients. As a result, configuration commands like disabling the
keyboard bell (xset -b) will also affect the real X server.
.TP 8
.B \-nokbreset
don't reset keyboard device if the session is resumed
.TP 8
.B \-noxkblock
always allow applications to change layout through XKEYBOARD
this is only relevant if you also specify \-keyboard=query. In that
case \fBnxagent\fR will lock the keyboard settings and clients will
get an error when trying to change keyboard settings via
XKEYBOARD. With \-noxkblock the lock is not applied and clients can
change the keyboard settings through XKEYBOARD.
.TP 8
.B \-tile WxH
size of image tiles (minimum allowed: 32x32)
......@@ -494,8 +500,32 @@ set resizing support (default: true)
.B fullscreen=<bool>
start or resume a session in fullscreen mode (default: off)
.TP 8
.B keyboard=<string>
set remote keyboard layout
.B keyboard=<string> or kbtype=<string>
.BR query | <model>/<layout>
.RS 8
.TP 8
.I query
use the default XKB keyboard layout (see below) and only allow clients
to query the settings but prevent any changes. \fIquery\fR is
especially helpful for setups where you need to set/modify the actual
keyboard layout using core X protocol functions (e.g. via \fBxmodmap\fR). It is used for
MacOS X clients to handle some keyboard problems that are special for
this platform. Note that in this case XKEYBOARD will always report
the default layout which will most likely not match the experienced
settings.
.TP 8
.I <model>/<layout>
use the given model and layout. You can not modify keyboard rules,
variant or options. Instead preset values are used. These are
\fIxfree86\fR for rules and empty strings for variant and options.
.RE
.TP 8
.PP
If \fIkeyboard\fR is omitted the internal defaults of \fBnxagent\fR will be used (rules: \fIxfree86\fR, layout: \fIus\fR, model: \fIpc102\fR, empty variant and options).
.TP 8
.B keyconv=<string>
set keycode conversion mode
......@@ -536,9 +566,6 @@ enable using shared memory
.B shpix=<bool>
enable shared pixmaps support
.TP 8
.B kbtype=<string>
set remote keyboard type
.TP 8
.B client=<string>
type of connecting operating system (supported: \fIlinux\fR,
\fIwindows\fR, \fIsolaris\fR and \fImacosx\fR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment