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    231   	char class[256], *type;
   232    232   	XrmValue val;
   233    233   	int i, j, tmod;
   234    234   	for (i = 1; i < MAX_MOD; i++) {
   235    235   		sprintf(class,"%s.Bind.Mod.%s",base,ord[i]);
   236    236   		if (XrmGetResource(xrdb, class, class, &type, &val)) {
   237    237   			mods[i] = 0;
          238  +			if (strcasestr(val.addr, "mod5"))
          239  +				mods[i] |= Mod5Mask;
   238    240   			if (strcasestr(val.addr,"super") ||
   239    241   					strcasestr(val.addr, "win") ||
   240    242   					strcasestr(val.addr, "mod4"))
   241    243   				mods[i] |= Mod4Mask;
          244  +			if (strcasestr(val.addr, "mod3"))
          245  +				mods[i] |= Mod3Mask;
          246  +			if (strcasestr(val.addr, "mod2"))
          247  +				mods[i] |= Mod2Mask;
          248  +			if (strcasestr(val.addr, "alt") ||
          249  +					strcasestr(val.addr, "mod1"))
          250  +				mods[i] |= Mod1Mask;
   242    251   			if (strcasestr(val.addr, "control") ||
   243    252   					strcasestr(val.addr,"ctrl"))
   244    253   				mods[i] |= ControlMask;
   245    254   			if (strcasestr(val.addr, "shift"))
   246    255   				mods[i] |= ShiftMask;
   247         -			if (strcasestr(val.addr, "alt"))
   248         -				mods[i] |= Mod1Mask;
   249    256   		}
   250    257   	}
   251    258   	/* loop through bindings */
   252    259   	conf.key = NULL;
   253    260   	conf.nkeys = 0;
   254    261   	int bmax = 100;
   255    262   //	sprintf(class,"%s.Bind.Max",base);