xserver-multidpi/xkb
Andreas Wettstein 0f537da72d xkb: Fixes to LatchMods/LatchGroup
The main problem this patch addresses is that if a latch is put on
multi-level key with a Latch/Lock/Set, it is possible that after all
keys are released, still base modifiers are set, which typically will
make the keyboard unusable.  To see how it happens (without the patch),
assume that key AltGr sets Mod5 when pressed by itself, and latches Mod3
when pressed together with Shift.  Now press Shift, then AltGr and
release both keys in reverse order.  Mod3 is now latched, and the
LatchMods filter remains active as the second filter.  Now press AltGr;
Mod5 base modifier gets set, and the SetMods filter will become active
as the first filter.  Release AltGr: First, the SetMods filter will set
clearMods to Mod5, then the LatchMods filter will overwrite clearMods
with Mod3.  Result: the Mod5 base modifier will remain set.  This
example becomes practically relevant for the revised German standard
layout (DIN 2137-1:2012-06).

Other changes implement the latch behaviour more accurately according to
the specification.  For example, releasing a modifier latching key can
at the same time clear a locked modifier, promote another modifier that
is latched to locked, and latch a third modifier.  Overall, what the
code does should be straightforward to compare what the XKB protocol
specification demands, see the table in section 6.3.

Finally, releasing a key no longer cancels a latch that has not become
pending yet.  In my opinion, the specification is not clear; it speaks
of "operating" a key, which the patch effectivly interprets as "press"
rather than "press or release".  From my experience, using the latter
interpretation makes latches on higher levels practically unusable.  In
the example given above, one would have to release AltGr always before
Shift to get the Mod3-Latch.  The practical relevance of latches on
higher levels is once more given by the revised German standard layout.

Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-06 11:22:38 +10:00
..
ddxBeep.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ddxCtrls.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ddxKillSrv.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ddxLEDs.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ddxLoad.c xwin: Clean up os wrappers for System, Popen and Pclose on Windows 2012-07-17 16:08:04 +01:00
ddxPrivate.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ddxVT.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Makefile.am XKB: Remove component listing support 2012-11-19 12:12:28 +10:00
maprules.c Apply partial matches for option (#25873) 2012-11-06 10:48:32 +10:00
README.compiled R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
xkb.c xkb: Set nIndicators in XkbGetIndicatorMap 2013-02-21 10:07:22 +10:00
xkb.h Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
xkbAccessX.c xkb: only post a XTest release if the XTest device has the button down 2012-12-05 17:22:28 +10:00
xkbActions.c xkb: Fixes to LatchMods/LatchGroup 2013-03-06 11:22:38 +10:00
XKBAlloc.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkbDflts.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkbEvents.c Use C99 designated initializers in extension Events 2012-07-09 22:52:30 -07:00
xkbfmisc.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
XKBGAlloc.c XKB: Geom: Remove unused code 2012-07-10 00:42:09 -07:00
xkbgeom.h XKB: Geom: Remove unused code 2012-07-10 00:42:09 -07:00
xkbInit.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkbLEDs.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
XKBMAlloc.c xkb: Allocate size_syms correctly when width of a type increases 2012-06-04 11:28:44 +10:00
XKBMisc.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkbout.c Fix formatting of address operators 2012-12-05 18:09:48 -06:00
xkbPrKeyEv.c xkb: fix shadow warnings 2012-11-05 13:25:05 -06:00
xkbSwap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkbtext.c xkb: fix shadow warnings 2012-11-05 13:25:05 -06:00
xkbUtils.c xkb: Do not use base group as an array index. 2013-01-09 11:23:12 +10:00
XKM_file_format.txt xkb: Add XKM file format description. 2010-02-02 10:03:21 +10:00
xkmread.c xkb: fix shadow warnings 2012-11-05 13:25:05 -06:00

The X server uses this directory to store the compiled version of the
current keymap and/or any scratch keymaps used by clients.  The X server
or some other tool might destroy or replace the files in this directory,
so it is not a safe place to store compiled keymaps for long periods of
time.  The default keymap for any server is usually stored in:
     X<num>-default.xkm
where <num> is the display number of the server in question, which makes
it possible for several servers *on the same host* to share the same 
directory.

Unless the X server is modified, sharing this directory between servers on
different hosts could cause problems.