MOB-2203: Added control keys for suggestion box

the condition result could be cached in local variable so we don't need to check it multiple times