Handle pressing ctrl+shortcut while the popup is visible.

This fixes the bug with pressing ctrl+key while the popup is visible would ignore ctrl and just insert the character instead.