Hi, just had an idea of conditional shortcuts.
This could for example allow using one shortcut to close active tab, and the same shortcut to close application window if there are no tabs.. Pressing Esc in kdevelop could stop running compilation (if it is), lower bottom docks (if they are shown), etc..