diff -ruN xkb_/compat/basic xkb/compat/basic
--- xkb_/compat/basic	2014-01-15 16:42:32.000000000 +0200
+++ xkb/compat/basic	2014-11-17 17:41:54.301139890 +0200
@@ -11,6 +11,13 @@
     latchMods.clearLocks= True;
     latchMods.latchToLock= True;
 
+    // ++for Russian+Latvian keyboard
+    interpret ISO_First_Group_Lock { action= LockGroup(group=1); };
+    interpret ISO_Last_Group_Lock  { action= LockGroup(group=3); };
+    interpret ISO_First_Group      { action= SetGroup(group=2);  };
+    interpret ISO_Last_Group       { action= SetGroup(group=3);  };
+    // --
+
     interpret Shift_Lock+AnyOf(Shift+Lock) {
 	action= LockMods(modifiers=Shift);
     };
diff -ruN xkb_/rules/base xkb/rules/base
--- xkb_/rules/base	2014-01-15 16:42:33.000000000 +0200
+++ xkb/rules/base	2014-11-17 17:46:01.133127685 +0200
@@ -1069,6 +1069,10 @@
   grp:ralt_rshift_toggle	=	+group(ralt_rshift_toggle)
   grp:alt_shift_toggle	=	+group(alt_shift_toggle)
   grp:alt_shift_toggle_bidir	=	+group(alt_shift_toggle_bidir)
+  grp:cat_tsd           =       +group(control_alt_tilde_toggle_switch_dead)
+  grp:caa_tsd           =       +group(control_alt_apostrophe_toggle_switch_dead)
+  grp:mat_tsd           =       +group(menu_alt_tilde_toggle_switch_dead)
+  grp:maa_tsd           =       +group(menu_alt_apostrophe_toggle_switch_dead)
   lv3:switch		=	+level3(switch)
   lv3:ralt_switch	=	+level3(ralt_switch)
   lv3:ralt_switch_multikey	=	+level3(ralt_switch_multikey)
diff -ruN xkb_/rules/evdev xkb/rules/evdev
--- xkb_/rules/evdev	2014-01-15 16:42:33.000000000 +0200
+++ xkb/rules/evdev	2014-11-17 17:47:26.045123486 +0200
@@ -1011,6 +1011,10 @@
   grp:ralt_rshift_toggle	=	+group(ralt_rshift_toggle)
   grp:alt_shift_toggle	=	+group(alt_shift_toggle)
   grp:alt_shift_toggle_bidir	=	+group(alt_shift_toggle_bidir)
+  grp:cat_tsd           =       +group(control_alt_tilde_toggle_switch_dead)
+  grp:caa_tsd           =       +group(control_alt_apostrophe_toggle_switch_dead)
+  grp:mat_tsd           =       +group(menu_alt_tilde_toggle_switch_dead)
+  grp:maa_tsd           =       +group(menu_alt_apostrophe_toggle_switch_dead)
   lv3:switch		=	+level3(switch)
   lv3:ralt_switch	=	+level3(ralt_switch)
   lv3:ralt_switch_multikey	=	+level3(ralt_switch_multikey)
diff -ruN xkb_/symbols/group xkb/symbols/group
--- xkb_/symbols/group	2014-01-15 16:42:33.000000000 +0200
+++ xkb/symbols/group	2014-11-17 17:53:39.269105031 +0200
@@ -455,3 +455,108 @@
         symbols[ Group1 ] = [ Menu,       ISO_Last_Group ]
     };
 }; // lctrl_lwin_rctrl_menu
+
+// using the group(control_alt_tilde_toggle_switch_dead) map, pressing:
+//     Control_R while in Group1 switches to Group3, and
+//               to Group3 while in Group1.
+//     Alt_R     while in Group1 shifts to Group3, and
+//               to Group1 while in Group3.
+//     Tilde     latches to Group2 while in Group1
+//               give your tilde while in Group2
+partial modifier_keys
+xkb_symbols "control_alt_tilde_toggle_switch_dead" {
+    key <TLDE> {
+        symbols[Group1]= [ISO_Group_Latch,  asciitilde ],
+        symbols[Group2]= [          grave,  asciitilde ],
+        symbols[Group3]= [    Cyrillic_io, Cyrillic_IO ]
+    };
+    key <RCTL> {
+        symbols[Group1]= [ ISO_Last_Group_Lock  ],
+        symbols[Group2]= [ Control_R            ],
+        symbols[Group3]= [ ISO_First_Group_Lock ]
+    };
+    key <RALT> {
+        symbols[Group1]= [ ISO_Last_Group       ],
+        symbols[Group2]= [ Alt_R                ],
+        symbols[Group3]= [ ISO_First_Group      ]
+    };
+};
+
+// using the group(control_alt_apostrophe_toggle_switch_dead) map, pressing:
+//     Control_R  while in Group1 switches to Group3, and
+//                to Group3 while in Group1.
+//     Alt_R      while in Group1 shifts to Group3, and
+//                to Group1 while in Group3.
+//     Apostrophe latches to Group2 while in Group1
+//                give your apostrophe while in Group2
+partial modifier_keys
+xkb_symbols "control_alt_apostrophe_toggle_switch_dead" {
+    key <AC11> {
+        symbols[Group1]= [ISO_Group_Latch,   quotedbl ],
+        symbols[Group2]= [     apostrophe,   quotedbl ],
+        symbols[Group3]= [     Cyrillic_e, Cyrillic_E ]
+    };
+    key <RCTL> {
+        symbols[Group1]= [ ISO_Last_Group_Lock  ],
+        symbols[Group2]= [ Control_R            ],
+        symbols[Group3]= [ ISO_First_Group_Lock ]
+    };
+    key <RALT> {
+        symbols[Group1]= [ ISO_Last_Group       ],
+        symbols[Group2]= [ Alt_R                ],
+        symbols[Group3]= [ ISO_First_Group      ]
+    };
+};
+
+// using the group(menu_alt_tilde_toggle_switch_dead) map, pressing:
+//     Menu      while in Group1 switches to Group3, and
+//               to Group3 while in Group1.
+//     Alt_R     while in Group1 shifts to Group3, and
+//               to Group1 while in Group3.
+//     Tilde     latches to Group2 while in Group1
+//               give your tilde while in Group2
+partial modifier_keys
+xkb_symbols "menu_alt_tilde_toggle_switch_dead" {
+    key <TLDE> {
+        symbols[Group1]= [ISO_Group_Latch,  asciitilde ],
+        symbols[Group2]= [          grave,  asciitilde ],
+        symbols[Group3]= [    Cyrillic_io, Cyrillic_IO ]
+    };
+    key <MENU> {
+        symbols[Group1]= [ ISO_Last_Group_Lock  ],
+        symbols[Group2]= [ Menu                 ],
+        symbols[Group3]= [ ISO_First_Group_Lock ]
+    };
+    key <RALT> {
+        symbols[Group1]= [ ISO_Last_Group       ],
+        symbols[Group2]= [ Alt_R                ],
+        symbols[Group3]= [ ISO_First_Group      ]
+    };
+};
+
+// using the group(menu_alt_apostrophe_toggle_switch_dead) map, pressing:
+//     Menu       while in Group1 switches to Group3, and
+//                to Group3 while in Group1.
+//     Alt_R      while in Group1 shifts to Group3, and
+//                to Group1 while in Group3.
+//     Apostrophe latches to Group2 while in Group1
+//                give your apostrophe while in Group2
+partial modifier_keys
+xkb_symbols "menu_alt_apostrophe_toggle_switch_dead" {
+    key <AC11> {
+        symbols[Group1]= [ISO_Group_Latch,   quotedbl ],
+        symbols[Group2]= [     apostrophe,   quotedbl ],
+        symbols[Group3]= [     Cyrillic_e, Cyrillic_E ]
+    };
+    key <MENU> {
+        symbols[Group1]= [ ISO_Last_Group_Lock  ],
+        symbols[Group2]= [ Menu                 ],
+        symbols[Group3]= [ ISO_First_Group_Lock ]
+    };
+    key <RALT> {
+        symbols[Group1]= [ ISO_Last_Group       ],
+        symbols[Group2]= [ Alt_R                ],
+        symbols[Group3]= [ ISO_First_Group      ]
+    };
+};
+
diff -ruN xkb_/symbols/rulv xkb/symbols/rulv
--- xkb_/symbols/rulv	1970-01-01 03:00:00.000000000 +0300
+++ xkb/symbols/rulv	2014-11-17 17:41:54.301139890 +0200
@@ -0,0 +1,205 @@
+// $ OG: ru /main/4 1997/06/10 06:56:17 kaleb $
+//
+// russian standard keyboard 
+// AEN <aen@logic.ru>
+// +Latvian by <arkadi@it.lv>
+//
+// $XFree86: xc/programs/xkbcomp/symbols/ru,v 3.3.2.4 1999/04/23 17:42:05 hohndel Exp $
+
+partial default alphanumeric_keys 
+xkb_symbols "basic" {
+
+    // Describes the differences between a very simple en_US
+    // keyboard and a very simple Russian keybaord
+    // ...And very simple Latvian keyboard
+    // Why simple...? (arkadi.)
+
+    name[Group1]= "US/ASCII";
+    name[Group2]= "Latvian";
+    name[Group3]= "Russian";
+
+    key <TLDE> {        [           grave,      asciitilde      ],
+                        [           grave,      asciitilde      ],
+                        [     Cyrillic_io,     Cyrillic_IO      ]       };
+    key	<LSGT> {	[	     less,	   greater	],
+			[            less,         greater      ],
+			[	      bar,	 brokenbar	]	};
+    key <AD01> {        [               q,               Q      ],
+			[               q,               Q      ],
+			[ Cyrillic_shorti, Cyrillic_SHORTI	]	};
+    key	<AE01> {	[		1,	    exclam	],
+			[               1,          exclam      ],
+			[		1,	    exclam 	]	};
+    key	<AB01> {	[		z,		 Z	],
+			[          zcaron,          Zcaron      ],
+			[     Cyrillic_ya,     Cyrillic_YA	]	};
+    key	<AC02> {	[		s,		 S	],
+			[          scaron,          Scaron      ],
+			[   Cyrillic_yeru,   Cyrillic_YERU	]	};
+    key	<AC01> {	[		a,		 A	],
+			[         amacron,         Amacron      ],
+			[     Cyrillic_ef,     Cyrillic_EF	]	};
+    key	<AD02> {	[		w,		 W	],
+			[               w,               W      ],
+			[    Cyrillic_tse,    Cyrillic_TSE	]	};
+    key	<AE02> {	[		2,		at	],
+			[               2,              at      ],
+			[		2,        quotedbl	]	};
+    key	<AB03> {	[		c,		 C	],
+			[          ccaron,          Ccaron      ],
+			[     Cyrillic_es,     Cyrillic_ES	]	};
+    key	<AB02> {	[		x,		 X	],
+			[               x,               X      ],
+			[    Cyrillic_che,    Cyrillic_CHE	]	};
+    key	<AC03> {	[		d,		 D	],
+			[               d,               D      ],
+			[     Cyrillic_ve,     Cyrillic_VE	]	};
+    key	<AD03> {	[		e,		 E	],
+			[         emacron,         Emacron      ],
+			[      Cyrillic_u,	Cyrillic_U	]	};
+    key	<AE04> {	[		4,	    dollar	],
+			[               4,          dollar      ],
+			[		4,        asterisk	]	};
+    key	<AE03> {	[		3,	numbersign	],
+			[               3,      numbersign      ],
+			[		3,      apostrophe	]	};
+    key	<AB04> {	[		v,		 V	],
+			[               v,               V      ],
+			[     Cyrillic_em,     Cyrillic_EM	]	};
+    key	<AC04> {	[		f,		 F	],
+			[               f,               F      ],
+			[      Cyrillic_a,	Cyrillic_A	]	};
+    key	<AD05> {	[		t,		 T	],
+			[               t,               T      ],
+			[     Cyrillic_ie,     Cyrillic_IE	]	};
+    key	<AD04> {	[		r,		 R	],
+			[               r,               R      ],
+			[     Cyrillic_ka,     Cyrillic_KA      ]       };
+    key	<AE05> {	[		5,	   percent	],
+			[               5,         percent      ],
+			[		5,	     colon	]	};
+    key	<AB06> {	[		n,		 N	],
+			[        ncedilla,        Ncedilla      ],
+			[     Cyrillic_te,     Cyrillic_TE      ]       };
+    key	<AB05> {	[		b,		 B	],
+			[               b,               B      ],
+			[      Cyrillic_i,	Cyrillic_I	]	};
+    key	<AC06> {	[		h,		 H	],
+			[               h,               H      ],
+			[     Cyrillic_er,     Cyrillic_ER	]	};
+    key	<AC05> {	[		g,		 G	],
+			[        gcedilla,        Gcedilla      ],
+			[     Cyrillic_pe,     Cyrillic_PE	]	};
+    key	<AD06> {	[		y,		 Y	],
+			[               y,               Y      ],
+			[     Cyrillic_en,     Cyrillic_EN	]	};
+    key	<AE06> {	[		6,     asciicircum	],
+			[               6,     asciicircum      ],
+			[		6,	     comma	]	};
+    key	<AB07> {	[		m,		 M	],
+			[               m,               M      ],
+			[Cyrillic_softsign,Cyrillic_SOFTSIGN	]	};
+    key	<AC07> {	[		j,		 J	],
+			[               j,               J      ],
+			[      Cyrillic_o,	Cyrillic_O	]	};
+    key	<AD07> {	[		u,		 U	],
+			[         umacron,         Umacron      ],
+			[    Cyrillic_ghe,    Cyrillic_GHE	]	};
+    key	<AE07> {	[		7,	 ampersand	],
+			[               7,       ampersand      ],
+			[		7,	    period	]	};
+    key	<AE08> {	[		8,	  asterisk	],
+			[               8,        asterisk      ],
+			[		8,	 semicolon	]	};
+    key	<AB08> {	[	    comma,	      less	],
+			[           comma,            less      ],
+			[     Cyrillic_be,     Cyrillic_BE      ]       };
+    key	<AC08> {	[		k,		 K	],
+			[        kcedilla,        Kcedilla      ],
+			[     Cyrillic_el,     Cyrillic_EL	]	};
+    key	<AD08> {	[		i,		 I	],
+			[         imacron,         Imacron      ],
+			[    Cyrillic_sha,    Cyrillic_SHA	]	};
+    key	<AD09> {	[		o,		 O	],
+			[               o,               O      ],
+			[  Cyrillic_shcha,  Cyrillic_SHCHA	]	};
+    key	<AE10> {	[		0,	parenright	],
+			[               0,      parenright      ],
+			[		0,	parenright	]	};
+    key	<AE09> {	[		9,	 parenleft	],
+			[               9,       parenleft      ],
+			[		9,	 parenleft	]	};
+    key	<AB09> {	[	   period,	   greater	],
+			[          period,         greater      ],
+			[     Cyrillic_yu,     Cyrillic_YU	]	};
+    key	<AB10> {	[	    slash,	  question	],
+			[           slash,        question      ],
+			[	    slash,	  question	]	};
+    key	<AC09> {	[		l,		 L	],
+			[        lcedilla,        Lcedilla      ],
+			[     Cyrillic_de,     Cyrillic_DE	]	};
+    key	<AC10> {	[	semicolon,	     colon	],
+			[       semicolon,           colon      ],
+			[    Cyrillic_zhe,    Cyrillic_ZHE	]	};
+    key	<AD10> {	[		p,		 P	],
+			[               p,               P      ],
+			[     Cyrillic_ze,     Cyrillic_ZE	]	};
+    key <AE11> {        [           minus,      underscore      ],
+			[           minus,      underscore      ],
+			[	    minus,	underscore	]	};
+    key	<AC11> {	[      apostrophe,	  quotedbl	],
+			[      apostrophe,        quotedbl      ],
+			[      Cyrillic_e,	Cyrillic_E	]	};
+    key	<AD11> {	[     bracketleft,	 braceleft	],
+			[     bracketleft,       braceleft      ],
+			[     Cyrillic_ha,     Cyrillic_HA	]	};
+    key	<AE12> {	[	    equal,	      plus	],
+			[           equal,            plus      ],
+			[	    equal,	      plus	]	};
+    key	<AD12> {	[    bracketright,	braceright	],
+			[    bracketright,      braceright      ],
+			[Cyrillic_hardsign,Cyrillic_HARDSIGN	]	};
+    key	<BKSL> {	[	backslash,	       bar	],
+			[       backslash,             bar      ],
+			[	backslash,             bar	]	};
+
+    // End alphanumeric section
+    
+    // Begin modifier mappings 
+
+    modifier_map Shift  { Shift_L };
+    modifier_map Lock   { Caps_Lock, ISO_Lock };
+    modifier_map Control{ Control_L };
+    modifier_map Mod3   { Mode_switch };
+
+};
+
+
+partial alphanumeric_keys
+xkb_symbols "winkeys" {
+    include "rulv(basic)"
+    key	<AE04> {	[		4,	    dollar	],
+			[               4,          dollar      ],
+			[		4,       semicolon	]	};
+    key	<AE03> {	[		3,	numbersign	],
+			[               3,      numbersign      ],
+			[		3,      numbersign	]	};
+    key	<AE05> {	[		5,	   percent	],
+			[               5,         percent      ],
+			[               5,         percent      ]       };
+    key	<AE06> {	[		6,     asciicircum	],
+			[               6,     asciicircum      ],
+			[		6,	     colon	]	};
+    key	<AE07> {	[		7,	 ampersand	],
+			[               7,       ampersand      ],
+			[		7,	  question	]	};
+    key	<AE08> {	[		8,	  asterisk	],
+			[               8,        asterisk      ],
+			[		8,	  asterisk	]	};
+    key	<AB10> {	[	    slash,	  question	],
+			[           slash,        question      ],
+			[	   period,	     comma	]	};
+    key	<BKSL> {	[	backslash,	       bar	],
+			[       backslash,             bar      ],
+			[	    slash,             bar	]	};
+};
