Do keen senses such as scent or extra senses such as blindsight allow detection of invisible creatures or creatures in a darkness spell? So far we have ruled keen senses let one detect the space a hidden or invisible creature is in but still attack with disadvantage. But permanently blind cave dwelling creatures etc. who use only non sight senses attack normally. So often on a case by case basis.
Blindsight, definitely yes.
According to PHB p.291:
An invisible creature is impossible to see without the aid of magic or a special sense.
Blindsight counts as a special sense. And, pragmatically, a blind creature wouldn't care whether its target was invisible or in magical darkness, because they wouldn't be able to physically see them anyway.
Your keen sense ruling seems practical, and RAW.
Keen sense (based on a sense other than sight, of course) would give a creature advantage on perception rolls to determine the whereabouts of the target, making it more likely that the creature can pinpoint the location. But the target is still invisible, forcing an attack at disadvantage. (p.291 in the PHB again)
Seeing invisible vs. Perceiving Hidden
There is a difference in the rules between invisible and hidden and seeing and perceiving and different consequences flow.
You do not need to be able to see a creature in order to know where it is!
By default, every creature that can perceive its environment in any way knows exactly where every other creature is. In order for a creature to conceal its location it must take an action to Hide and make a Dexterity (Stealth) check - creatures whose passive Wisdom (Perception) is less than this check do not know where the creature is. Creatures who rely predominately on sight (i.e. most creatures) but who cannot use sight have disadvantage (-5 for passive) on their Wisdom (Perception) checks.
If you cannot see a creature (irrespective of if it is Hidden or not) any attacks you make against it have disadvantage and any attacks it makes against you have advantage.
A monster with blindsight can perceive its surroundings without relying on sight, within a specific radius.
Blindsight is sight so you can use it to see creatures under an Invisibility spell (as it is a "special sense"). However, not all invisibility effects are the result of the spell and you would need to consider their particular wording.
You still need to perceive a Hidden creature in order to know where it is and see it with your Blindsight
Keen senses simply grants elves proficiency with the Perception skill - it does nothing other than this.
If you actually mean keen scent then this grants advantage on any Perception check that relies on scent - this would offset the disadvantage caused by not being able to see an invisible and hidden creature.
A way that makes this easier, the DMG States you cannot attack a creature you cannot see.
An invisible creature cannot be the target of an attack roll. But if they fail their stealth check they can be discovered, an enemy can be made aware of them so that they don't gain surprise, but also so that the enemy can target the rough area they would be in with Area of Effects - eg, throwing a fireball.
A hidden creature can be discovered but once again not targeted, and can only be hidden if the creature has taken the hide action and is actively attempting to not be discovered. if they fail the stealth check than they fail and the enemy knows exactly where they are, standard combat rules apply.
furthermore. if a creature is invisible, it automatically succeeds any attempt to hide.