Binding global shortcuts to actions "extends AnAction implements DumbAware"

This is not a problem but I noticed that when a Popup is visible, then the shortcuts no longer work. 


<keyboard-shortcut keymap="$default" first-keystroke="shift alt s" />


The shortcut here for instance only works when in editor, and not when a popup is visible. 


Popup created through: 

popup = factory.createComponentPopupBuilder(panel, null)



Is there a way to retain the shortcuts to be triggered even when a popup is active/visible? 


There is the 


factory.setKeyEventHandler( ... ) 


but how would one combine those two?