aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-12-03 09:09:06 +0100
committermarha <marha@users.sourceforge.net>2012-12-03 09:09:06 +0100
commitb8da71ffb17d3d16706db04115e9ba1dd8bc49b9 (patch)
tree52bf0a78e9db0a4eff7b3dbb7c3a036c01504f6a /xorg-server
parentd2d73da59e64acdc4718e4e6790a69d967bee875 (diff)
downloadvcxsrv-b8da71ffb17d3d16706db04115e9ba1dd8bc49b9.tar.gz
vcxsrv-b8da71ffb17d3d16706db04115e9ba1dd8bc49b9.tar.bz2
vcxsrv-b8da71ffb17d3d16706db04115e9ba1dd8bc49b9.zip
fontconfig mesa xserver pixman xkeyboard-config git update 3 dec 2012
fontconfig: 2442d611579bccb84f0c29e3f9ceb0a7436df812 mesa: 54ff536823bf5a431efe1f2becdb21174c146948 xserver: b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 pixman: 978bab253d1d061b00b5e80aa45ab6986aac466f xkeyboard-config: 05dcc6db64cd7425aea6d22efd6a3ecf34dbddd2
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xext/saver.c2
-rw-r--r--xorg-server/Xi/exevents.c18
-rw-r--r--xorg-server/dix/getevents.c119
-rw-r--r--xorg-server/dix/inpututils.c21
-rw-r--r--xorg-server/dix/touch.c61
-rw-r--r--xorg-server/dix/window.c2
-rw-r--r--xorg-server/hw/dmx/dmxcursor.c2
-rw-r--r--xorg-server/include/input.h7
-rw-r--r--xorg-server/include/inputstr.h2
-rw-r--r--xorg-server/include/xkbsrv.h1
-rw-r--r--xorg-server/randr/randr.c2
-rw-r--r--xorg-server/xfixes/cursor.c12
-rw-r--r--xorg-server/xkb/xkbAccessX.c6
-rw-r--r--xorg-server/xkeyboard-config/symbols/level342
-rw-r--r--xorg-server/xkeyboard-config/symbols/level526
15 files changed, 169 insertions, 154 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c
index ac4a633e7..f73e2a21f 100644
--- a/xorg-server/Xext/saver.c
+++ b/xorg-server/Xext/saver.c
@@ -393,6 +393,8 @@ ScreenSaverFreeSuspend(pointer value, XID id)
UpdateCurrentTimeIf();
nt_list_for_each_entry(dev, inputInfo.devices, next)
lastDeviceEventTime[dev->id] = currentTime;
+ lastDeviceEventTime[XIAllDevices] = currentTime;
+ lastDeviceEventTime[XIAllMasterDevices] = currentTime;
SetScreenSaverTimer();
}
}
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 4248b9a86..2caf98c25 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1066,24 +1066,14 @@ ActivateEarlyAccept(DeviceIntPtr dev, TouchPointInfoPtr ti)
static void
EmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource)
{
- InternalEvent *tel = InitEventList(GetMaximumEventsNum());
- ValuatorMask *mask = valuator_mask_new(2);
- int i, nev;
-
- valuator_mask_set_double(mask, 0,
- valuator_mask_get_double(ti->valuators, 0));
- valuator_mask_set_double(mask, 1,
- valuator_mask_get_double(ti->valuators, 1));
+ InternalEvent event;
flags |= TOUCH_CLIENT_ID;
if (ti->emulate_pointer)
flags |= TOUCH_POINTER_EMULATED;
- nev = GetTouchEvents(tel, dev, ti->client_id, XI_TouchEnd, flags, mask);
- for (i = 0; i < nev; i++)
- DeliverTouchEvents(dev, ti, tel + i, resource);
-
- valuator_mask_free(&mask);
- FreeEventList(tel, GetMaximumEventsNum());
+ TouchDeliverDeviceClassesChangedEvent(ti, GetTimeInMillis(), resource);
+ GetDixTouchEnd(&event, dev, ti, flags);
+ DeliverTouchEvents(dev, ti, &event, resource);
}
/**
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 2a686e877..fa538d9f4 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1833,10 +1833,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
int i;
int num_events = 0;
RawDeviceEvent *raw;
- union touch {
- TouchPointInfoPtr dix_ti;
- DDXTouchPointInfoPtr ti;
- } touchpoint;
+ DDXTouchPointInfoPtr ti;
int need_rawevent = TRUE;
Bool emulate_pointer = FALSE;
int client_id = 0;
@@ -1855,37 +1852,15 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
/* Find and/or create the DDX touch info */
- if (flags & TOUCH_CLIENT_ID) { /* A DIX-submitted TouchEnd */
- touchpoint.dix_ti = TouchFindByClientID(dev, ddx_touchid);
- BUG_RETURN_VAL(!touchpoint.dix_ti, 0);
-
- if (!mask_in ||
- !valuator_mask_isset(mask_in, 0) ||
- !valuator_mask_isset(mask_in, 1)) {
- ErrorF
- ("[dix] dix-submitted events must have x/y valuator information.\n");
- return 0;
- }
-
- need_rawevent = FALSE;
- client_id = touchpoint.dix_ti->client_id;
- }
- else { /* a DDX-submitted touch */
-
- touchpoint.ti =
- TouchFindByDDXID(dev, ddx_touchid, (type == XI_TouchBegin));
- if (!touchpoint.ti) {
- ErrorFSigSafe("[dix] %s: unable to %s touch point %u\n", dev->name,
- type == XI_TouchBegin ? "begin" : "find", ddx_touchid);
- return 0;
- }
- client_id = touchpoint.ti->client_id;
+ ti = TouchFindByDDXID(dev, ddx_touchid, (type == XI_TouchBegin));
+ if (!ti) {
+ ErrorFSigSafe("[dix] %s: unable to %s touch point %u\n", dev->name,
+ type == XI_TouchBegin ? "begin" : "find", ddx_touchid);
+ return 0;
}
+ client_id = ti->client_id;
- if (!(flags & TOUCH_CLIENT_ID))
- emulate_pointer = touchpoint.ti->emulate_pointer;
- else
- emulate_pointer = ! !(flags & TOUCH_POINTER_EMULATED);
+ emulate_pointer = ti->emulate_pointer;
if (!IsMaster(dev))
events =
@@ -1905,11 +1880,6 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
num_events++;
init_device_event(event, dev, ms);
- /* if submitted for master device, get the sourceid from there */
- if (flags & TOUCH_CLIENT_ID) {
- event->sourceid = touchpoint.dix_ti->sourceid;
- /* TOUCH_CLIENT_ID implies norawevent */
- }
switch (type) {
case XI_TouchBegin:
@@ -1934,38 +1904,30 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
event->type = ET_TouchEnd;
/* We can end the DDX touch here, since we don't use the active
* field below */
- if (!(flags & TOUCH_CLIENT_ID))
- TouchEndDDXTouch(dev, touchpoint.ti);
+ TouchEndDDXTouch(dev, ti);
break;
default:
return 0;
}
- if (t->mode == XIDirectTouch && !(flags & TOUCH_CLIENT_ID)) {
- if (!valuator_mask_isset(&mask, 0))
- valuator_mask_set_double(&mask, 0,
- valuator_mask_get_double(touchpoint.ti->
- valuators, 0));
- if (!valuator_mask_isset(&mask, 1))
- valuator_mask_set_double(&mask, 1,
- valuator_mask_get_double(touchpoint.ti->
- valuators, 1));
- }
/* Get our screen event co-ordinates (root_x/root_y/event_x/event_y):
* these come from the touchpoint in Absolute mode, or the sprite in
* Relative. */
if (t->mode == XIDirectTouch) {
- transformAbsolute(dev, &mask);
-
- if (!(flags & TOUCH_CLIENT_ID)) {
- for (i = 0; i < valuator_mask_size(&mask); i++) {
- double val;
-
- if (valuator_mask_fetch_double(&mask, i, &val))
- valuator_mask_set_double(touchpoint.ti->valuators, i, val);
- }
+ for (i = 0; i < max(valuator_mask_size(&mask), 2); i++) {
+ double val;
+
+ if (valuator_mask_fetch_double(&mask, i, &val))
+ valuator_mask_set_double(ti->valuators, i, val);
+ /* If the device doesn't post new X and Y axis values,
+ * use the last values posted.
+ */
+ else if (i < 2 &&
+ valuator_mask_fetch_double(ti->valuators, i, &val))
+ valuator_mask_set_double(&mask, i, val);
}
+ transformAbsolute(dev, &mask);
clipAbsolute(dev, &mask);
}
else {
@@ -1994,6 +1956,14 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
if (emulate_pointer)
storeLastValuators(dev, &mask, 0, 1, devx, devy);
+ /* Update the MD's co-ordinates, which are always in desktop space. */
+ if (emulate_pointer && !IsMaster(dev) && !IsFloating(dev)) {
+ DeviceIntPtr master = GetMaster(dev, MASTER_POINTER);
+
+ master->last.valuators[0] = screenx;
+ master->last.valuators[1] = screeny;
+ }
+
event->root = scr->root->drawable.id;
event_set_root_coordinates(event, screenx, screeny);
@@ -2014,6 +1984,37 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
return num_events;
}
+void
+GetDixTouchEnd(InternalEvent *ievent, DeviceIntPtr dev, TouchPointInfoPtr ti,
+ uint32_t flags)
+{
+ ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen;
+ DeviceEvent *event = &ievent->device_event;
+ CARD32 ms = GetTimeInMillis();
+
+ BUG_WARN(!dev->enabled);
+
+ init_device_event(event, dev, ms);
+
+ event->sourceid = ti->sourceid;
+ event->type = ET_TouchEnd;
+
+ event->root = scr->root->drawable.id;
+
+ /* Get screen event coordinates from the sprite. Is this really the best
+ * we can do? */
+ event_set_root_coordinates(event,
+ dev->last.valuators[0],
+ dev->last.valuators[1]);
+ event->touchid = ti->client_id;
+ event->flags = flags;
+
+ if (flags & TOUCH_POINTER_EMULATED) {
+ event->flags |= TOUCH_POINTER_EMULATED;
+ event->detail.button = 1;
+ }
+}
+
/**
* Synthesize a single motion event for the core pointer.
*
diff --git a/xorg-server/dix/inpututils.c b/xorg-server/dix/inpututils.c
index f01e9a7cd..eb2222a07 100644
--- a/xorg-server/dix/inpututils.c
+++ b/xorg-server/dix/inpututils.c
@@ -910,11 +910,7 @@ input_option_set_value(InputOption *opt, const char *value)
double
fp1616_to_double(FP1616 in)
{
- double ret;
-
- ret = (double) (in >> 16);
- ret += (double) (in & 0xffff) * (1.0 / (1UL << 16)); /* Optimized: ldexp((double)(in & 0xffff), -16); */
- return ret;
+ return pixman_fixed_to_double(in);
}
double
@@ -930,20 +926,7 @@ fp3232_to_double(FP3232 in)
FP1616
double_to_fp1616(double in)
{
- FP1616 ret;
- int32_t integral;
- double tmp;
- uint32_t frac_d;
-
- tmp = floor(in);
- integral = (int32_t) tmp;
-
- tmp = (in - integral) * (1UL << 16); /* Optimized: ldexp(in - integral, 16) */
- frac_d = (uint16_t) tmp;
-
- ret = integral << 16;
- ret |= frac_d & 0xffff;
- return ret;
+ return pixman_double_to_fixed(in);
}
FP3232
diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c
index 5f77be575..29ba17194 100644
--- a/xorg-server/dix/touch.c
+++ b/xorg-server/dix/touch.c
@@ -463,45 +463,14 @@ TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev)
void
TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource)
{
- InternalEvent *tel;
- ValuatorMask *mask;
- int i, nev;
- int flags;
+ int i;
if (!ti->history)
return;
- tel = InitEventList(GetMaximumEventsNum());
- mask = valuator_mask_new(0);
-
- valuator_mask_set_double(mask, 0, ti->history[0].valuators.data[0]);
- valuator_mask_set_double(mask, 1, ti->history[0].valuators.data[1]);
-
- flags = TOUCH_CLIENT_ID | TOUCH_REPLAYING;
- if (ti->emulate_pointer)
- flags |= TOUCH_POINTER_EMULATED;
- /* Generate events based on a fake touch begin event to get DCCE events if
- * needed */
- /* FIXME: This needs to be cleaned up */
- nev = GetTouchEvents(tel, dev, ti->client_id, XI_TouchBegin, flags, mask);
- for (i = 0; i < nev; i++) {
- /* Send saved touch begin event */
- if (tel[i].any.type == ET_TouchBegin) {
- DeviceEvent *ev = &ti->history[0];
- ev->flags |= TOUCH_REPLAYING;
- DeliverTouchEvents(dev, ti, (InternalEvent*)ev, resource);
- }
- else {/* Send DCCE event */
- tel[i].any.time = ti->history[0].time;
- DeliverTouchEvents(dev, ti, tel + i, resource);
- }
- }
-
- valuator_mask_free(&mask);
- FreeEventList(tel, GetMaximumEventsNum());
+ TouchDeliverDeviceClassesChangedEvent(ti, ti->history[0].time, resource);
- /* First event was TouchBegin, already replayed that one */
- for (i = 1; i < ti->history_elements; i++) {
+ for (i = 0; i < ti->history_elements; i++) {
DeviceEvent *ev = &ti->history[i];
ev->flags |= TOUCH_REPLAYING;
@@ -509,6 +478,30 @@ TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource)
}
}
+void
+TouchDeliverDeviceClassesChangedEvent(TouchPointInfoPtr ti, Time time,
+ XID resource)
+{
+ DeviceIntPtr dev;
+ int num_events = 0;
+ InternalEvent dcce;
+
+ dixLookupDevice(&dev, ti->sourceid, serverClient, DixWriteAccess);
+
+ if (!dev)
+ return;
+
+ /* UpdateFromMaster generates at most one event */
+ UpdateFromMaster(&dcce, dev, DEVCHANGE_POINTER_EVENT, &num_events);
+ BUG_WARN(num_events > 1);
+
+ if (num_events) {
+ dcce.any.time = time;
+ /* FIXME: This doesn't do anything */
+ dev->public.processInputProc(&dcce, dev);
+ }
+}
+
Bool
TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite)
{
diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c
index e70531af6..99b3e0a13 100644
--- a/xorg-server/dix/window.c
+++ b/xorg-server/dix/window.c
@@ -3095,6 +3095,8 @@ dixSaveScreens(ClientPtr client, int on, int mode)
UpdateCurrentTimeIf();
nt_list_for_each_entry(dev, inputInfo.devices, next)
lastDeviceEventTime[dev->id] = currentTime;
+ lastDeviceEventTime[XIAllDevices] = currentTime;
+ lastDeviceEventTime[XIAllMasterDevices] = currentTime;
}
SetScreenSaverTimer();
}
diff --git a/xorg-server/hw/dmx/dmxcursor.c b/xorg-server/hw/dmx/dmxcursor.c
index 1a77c7d78..35aca81b4 100644
--- a/xorg-server/hw/dmx/dmxcursor.c
+++ b/xorg-server/hw/dmx/dmxcursor.c
@@ -346,6 +346,8 @@ dmxComputeScreenOrigins(void)
screenInfo.screens[i]->y -= minY;
}
}
+
+ update_desktop_dimensions();
}
/** Recompute origin information in the #dmxScreens list. This is
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index f8459b8c8..2387dbf4a 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -465,6 +465,11 @@ extern int GetTouchOwnershipEvents(InternalEvent *events,
TouchPointInfoPtr ti,
uint8_t mode, XID resource, uint32_t flags);
+extern void GetDixTouchEnd(InternalEvent *ievent,
+ DeviceIntPtr dev,
+ TouchPointInfoPtr ti,
+ uint32_t flags);
+
extern _X_EXPORT int GetProximityEvents(InternalEvent *events,
DeviceIntPtr pDev,
int type, const ValuatorMask *mask);
@@ -580,6 +585,8 @@ extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti,
extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
uint32_t touchid, Window grab_window, XID *error);
extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
+extern void TouchDeliverDeviceClassesChangedEvent(TouchPointInfoPtr ti,
+ Time time, XID resource);
/* misc event helpers */
extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index 5a38924de..bb0a77963 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -331,7 +331,7 @@ typedef struct _DDXTouchPointInfo {
uint32_t ddx_id; /* touch ID given by the DDX */
Bool emulate_pointer;
- ValuatorMask *valuators; /* last recorded axis values */
+ ValuatorMask *valuators; /* last axis values as posted, pre-transform */
} DDXTouchPointInfoRec;
typedef struct _TouchClassRec {
diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h
index 2b926a980..45e2e8c47 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/include/xkbsrv.h
@@ -171,6 +171,7 @@ typedef struct _XkbSrvInfo {
KeyCode mouseKey;
KeyCode inactiveKey;
KeyCode slowKey;
+ KeyCode slowKeyEnableKey;
KeyCode repeatKey;
CARD8 krgTimerActive;
CARD8 beepType;
diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c
index da48c3f06..f0decfc6c 100644
--- a/xorg-server/randr/randr.c
+++ b/xorg-server/randr/randr.c
@@ -264,6 +264,8 @@ RRInit(void)
return FALSE;
if (!RROutputInit())
return FALSE;
+ if (!RRProviderInit())
+ return FALSE;
RRGeneration = serverGeneration;
}
if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0))
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c
index bd175b40f..ffee4d6ab 100644
--- a/xorg-server/xfixes/cursor.c
+++ b/xorg-server/xfixes/cursor.c
@@ -1093,7 +1093,11 @@ barrier_is_blocking(const struct PointerBarrier * barrier,
if (dir & BarrierNegativeX && x1 == (barrier->x1 - 1))
return FALSE;
/* startpoint adjacent to barrier, moving towards -> block */
- if (x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) {
+ if (dir & BarrierPositiveX && x1 == (barrier->x1 - 1) && y1 >= barrier->y1 && y1 <= barrier->y2) {
+ *distance = 0;
+ return TRUE;
+ }
+ if (dir & BarrierNegativeX && x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) {
*distance = 0;
return TRUE;
}
@@ -1105,7 +1109,11 @@ barrier_is_blocking(const struct PointerBarrier * barrier,
if (dir & BarrierNegativeY && y1 == (barrier->y1 - 1))
return FALSE;
/* startpoint adjacent to barrier, moving towards -> block */
- if (y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) {
+ if (dir & BarrierPositiveY && y1 == (barrier->y1 - 1) && x1 >= barrier->x1 && x1 <= barrier->x2) {
+ *distance = 0;
+ return TRUE;
+ }
+ if (dir & BarrierNegativeY && y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) {
*distance = 0;
return TRUE;
}
diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c
index c1af32eb9..21df85d94 100644
--- a/xorg-server/xkb/xkbAccessX.c
+++ b/xorg-server/xkb/xkbAccessX.c
@@ -291,8 +291,8 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
return 4000;
}
xkbi->krgTimerActive = _OFF_TIMER;
- cn.keycode = 0;
- cn.eventType = 0;
+ cn.keycode = xkbi->slowKeyEnableKey;
+ cn.eventType = KeyPress;
cn.requestMajor = 0;
cn.requestMinor = 0;
if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask) {
@@ -304,6 +304,7 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
LogMessage(X_INFO, "XKB SlowKeys are now enabled. Hold shift to disable.\n");
}
+ xkbi->slowKeyEnableKey = 0;
return 0;
}
@@ -462,6 +463,7 @@ AccessXFilterPressEvent(DeviceEvent *event, DeviceIntPtr keybd)
if (ctrls->enabled_ctrls & XkbAccessXKeysMask) {
/* check for magic sequences */
if ((sym[0] == XK_Shift_R) || (sym[0] == XK_Shift_L)) {
+ xkbi->slowKeyEnableKey = key;
if (XkbAX_NeedFeedback(ctrls, XkbAX_SlowWarnFBMask)) {
xkbi->krgTimerActive = _KRG_WARN_TIMER;
xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 4000,
diff --git a/xorg-server/xkeyboard-config/symbols/level3 b/xorg-server/xkeyboard-config/symbols/level3
index 9d495550a..8bf83bbf3 100644
--- a/xorg-server/xkeyboard-config/symbols/level3
+++ b/xorg-server/xkeyboard-config/symbols/level3
@@ -2,6 +2,19 @@
// the third shift level can be reached
//
+// Ensure a mapping to a real modifier for LevelThree
+partial modifier_keys
+xkb_symbols "modifier_mapping" {
+ key.type[Group1] = "ONE_LEVEL";
+
+ replace key <LVL3> {
+ vmods = LevelThree,
+ symbols[Group1] = [ ISO_Level3_Shift ],
+ actions[Group1] = [ SetMods(modifiers=LevelThree) ]
+ };
+ modifier_map Mod5 { <LVL3> };
+};
+
// the default behavior is for the right Alt key (AltGr) to generate the
// third engraved symbol
default partial modifier_keys
@@ -10,7 +23,7 @@ xkb_symbols "ralt_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
// Right Alt key never chooses 3rd level.
@@ -38,6 +51,7 @@ xkb_symbols "ralt_switch_multikey" {
type[Group1]="TWO_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift, Multi_key ]
};
+ include "level3(modifier_mapping)"
};
// special case or right Alt switch - for use with grp:alts_toggle
@@ -55,7 +69,7 @@ xkb_symbols "ralt_switch_for_alts_toggle" {
symbols[Group1] = [ ISO_Level3_Shift, ISO_Next_Group ],
virtualMods= AltGr
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
// using the level(alt_switch) map, either Alt key temporarily chooses
@@ -72,7 +86,7 @@ xkb_symbols "lalt_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { <LALT> };
+ include "level3(modifier_mapping)"
};
// using the level(switch) map, the right Control key temporarily
@@ -83,7 +97,7 @@ xkb_symbols "switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
// using the level(menu_switch) map, the Menu key temporarily
@@ -94,7 +108,7 @@ xkb_symbols "menu_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
// using the level3(win_switch) map, the either Windows' logo key
@@ -113,7 +127,7 @@ xkb_symbols "lwin_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
// using the level(rwin_switch) map, the right Windows' logo key
@@ -126,7 +140,7 @@ xkb_symbols "rwin_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
// using the level3(enter_switch) map, the Enter key on the keypad
@@ -138,7 +152,7 @@ xkb_symbols "enter_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
partial modifier_keys
@@ -147,7 +161,7 @@ xkb_symbols "caps_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
partial modifier_keys
@@ -156,7 +170,7 @@ xkb_symbols "bksl_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
partial modifier_keys
@@ -165,7 +179,7 @@ xkb_symbols "lsgt_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
partial modifier_keys
@@ -174,7 +188,7 @@ xkb_symbols "caps_switch_latch" {
type[Group1]="THREE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
partial modifier_keys
@@ -183,7 +197,7 @@ xkb_symbols "bksl_switch_latch" {
type[Group1]="THREE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
partial modifier_keys
@@ -192,5 +206,5 @@ xkb_symbols "lsgt_switch_latch" {
type[Group1]="THREE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3_Latch ]
};
- modifier_map Mod5 { ISO_Level3_Shift };
+ include "level3(modifier_mapping)"
};
diff --git a/xorg-server/xkeyboard-config/symbols/level5 b/xorg-server/xkeyboard-config/symbols/level5
index ce219b5bf..f5ecb620e 100644
--- a/xorg-server/xkeyboard-config/symbols/level5
+++ b/xorg-server/xkeyboard-config/symbols/level5
@@ -2,6 +2,19 @@
// the third shift level can be reached
//
+// Ensure a mapping to a real modifier for LevelFive
+partial modifier_keys
+xkb_symbols "modifier_mapping" {
+ key.type[Group1] = "ONE_LEVEL";
+
+ replace key <MDSW> {
+ vmods = LevelFive,
+ symbols[Group1] = [ ISO_Level5_Shift ],
+ actions[Group1] = [ SetMods(modifiers=LevelFive) ]
+ };
+ modifier_map Mod3 { <MDSW> };
+};
+
// using the level(switch) map, the right Control key temporarily
// chooses the fifth shift level (until it is released).
partial modifier_keys
@@ -10,7 +23,7 @@ xkb_symbols "rctrl_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift ]
};
- modifier_map Mod3 { ISO_Level5_Shift };
+ include "level5(modifier_mapping)"
};
partial modifier_keys
@@ -19,7 +32,7 @@ xkb_symbols "lsgt_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift ]
};
- modifier_map Mod3 { ISO_Level5_Shift };
+ include "level5(modifier_mapping)"
};
partial modifier_keys
@@ -28,7 +41,7 @@ xkb_symbols "ralt_switch" {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift ]
};
- modifier_map Mod3 { ISO_Level5_Shift };
+ include "level5(modifier_mapping)"
};
@@ -43,12 +56,7 @@ xkb_symbols "lock" {
// See also: compat/level5(level5_lock)
key.type[Group1] = "ONE_LEVEL";
- replace key <MDSW> {
- vmods = LevelFive,
- symbols[Group1] = [ ISO_Level5_Shift ],
- actions[Group1] = [ SetMods(modifiers=LevelFive) ]
- };
- modifier_map Mod3 { <MDSW> };
+ include "level5(modifier_mapping)"
replace key <HYPR> {
vmods = NumLock,