Function matchKeyFlags

Match key flags

static bool matchKeyFlags(
  uint eventFlags,
  uint requestedFlags
);