Bugfix: Grab modifiers before key combos

Grabbing the modifier keys after the key combinations results in
non-functional key bindings. In addition, grab modifiers only once.