Notification only appear when keyboard pop up

Can you make switcher notification only appear when keyboard pop up on the screen?

When keyboard doesn't pop up to be used, switcher notification can be made to disabled in notification bar.

I think this is more convenient.

Edited by J JAMET