Alopex

Check-in [42fdaaf0e5]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Support ModX Bind.Mod values besides just Mod4 Allow user to specify Mod1, Mod2, etc. as Bind.Mod values
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | master
Files: files | file ages | folders
SHA3-256:42fdaaf0e583366766dee12933d63c26860a5e5cdcf58e3de5348d2f1477bcce
User & Date: patrick.fernie@gmail.com 2014-06-22 20:24:21
Context
2014-06-22
22:12
Merge pull request #51 from pfernie/mod_mask_support Support ModX Bind.Mod values besides just Mod4 Leaf check-in: 2e35545abe user: jesse@mccluresk9.com tags: trunk, master
20:24
Support ModX Bind.Mod values besides just Mod4 Allow user to specify Mod1, Mod2, etc. as Bind.Mod values check-in: 42fdaaf0e5 user: patrick.fernie@gmail.com tags: trunk, master
2014-06-16
20:50
minor cleanup check-in: 7bad7d1bf9 user: jesse@mccluresk9.com tags: trunk, master
Changes

Changes to src/config.c.

231
232
233
234
235
236
237


238
239
240
241







242
243
244
245
246
247
248
249
250
251
252
253
254
255
	char class[256], *type;
	XrmValue val;
	int i, j, tmod;
	for (i = 1; i < MAX_MOD; i++) {
		sprintf(class,"%s.Bind.Mod.%s",base,ord[i]);
		if (XrmGetResource(xrdb, class, class, &type, &val)) {
			mods[i] = 0;


			if (strcasestr(val.addr,"super") ||
					strcasestr(val.addr, "win") ||
					strcasestr(val.addr, "mod4"))
				mods[i] |= Mod4Mask;







			if (strcasestr(val.addr, "control") ||
					strcasestr(val.addr,"ctrl"))
				mods[i] |= ControlMask;
			if (strcasestr(val.addr, "shift"))
				mods[i] |= ShiftMask;
			if (strcasestr(val.addr, "alt"))
				mods[i] |= Mod1Mask;
		}
	}
	/* loop through bindings */
	conf.key = NULL;
	conf.nkeys = 0;
	int bmax = 100;
//	sprintf(class,"%s.Bind.Max",base);







>
>




>
>
>
>
>
>
>





<
<







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255


256
257
258
259
260
261
262
	char class[256], *type;
	XrmValue val;
	int i, j, tmod;
	for (i = 1; i < MAX_MOD; i++) {
		sprintf(class,"%s.Bind.Mod.%s",base,ord[i]);
		if (XrmGetResource(xrdb, class, class, &type, &val)) {
			mods[i] = 0;
			if (strcasestr(val.addr, "mod5"))
				mods[i] |= Mod5Mask;
			if (strcasestr(val.addr,"super") ||
					strcasestr(val.addr, "win") ||
					strcasestr(val.addr, "mod4"))
				mods[i] |= Mod4Mask;
			if (strcasestr(val.addr, "mod3"))
				mods[i] |= Mod3Mask;
			if (strcasestr(val.addr, "mod2"))
				mods[i] |= Mod2Mask;
			if (strcasestr(val.addr, "alt") ||
					strcasestr(val.addr, "mod1"))
				mods[i] |= Mod1Mask;
			if (strcasestr(val.addr, "control") ||
					strcasestr(val.addr,"ctrl"))
				mods[i] |= ControlMask;
			if (strcasestr(val.addr, "shift"))
				mods[i] |= ShiftMask;


		}
	}
	/* loop through bindings */
	conf.key = NULL;
	conf.nkeys = 0;
	int bmax = 100;
//	sprintf(class,"%s.Bind.Max",base);