Pressing global shortcuts can make focus going lost?

There are some global shortcuts (for other programs), when I press one of them, e.g. ALT+2 the focus (e.g. the cursor in a text) gets lost and I have to re-focus (e.g. insert the cursor in a text to go on writing). How could one avoid that?