Re: [dev] [st] [patch] Cleanup config.def.h, eliminate mappedkeys, simplify matching.

From: Mark Edgar <medgar123_AT_gmail.com>
Date: Sun, 20 Oct 2013 20:31:47 +0200

On Sun, Oct 20, 2013 at 9:51 AM, Roberto E. Vargas Caballero
<k0ga_AT_shike2.com> wrote:
> I think this patch is correct, because XK_NO_MOD is 0, so if there is
> some modifier then 'state == mask' will be false. After the simplification,
> match is too short and does nothing, so I think it should be
> merged into kmap.

Note that match() is used in four places, so I can't merge it into kmap().

On Sat, Oct 19, 2013 at 12:43 PM, Alexander S. <alex0player_AT_gmail.com> wrote:
> However, I do not like using != as a logical operator. I'd suggest
> using (IS_SET(MODE_APPKEYPAD) ? kp->keypad < 0 : kp->keypad > 0),

I've done this, but I'm not sure it reads as well. The existing
version first checks the *kp fields because if they are zero, the is
no need to peek at term.mode.

     -Mark

Received on Sun Oct 20 2013 - 20:31:47 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 20 2013 - 20:36:08 CEST