def __ungrabHotkey(self, key, modifiers, window):
logger.debug("<STR_LIT>", modifiers, key)<EOL>try:<EOL><INDENT>keycode = self.__lookupKeyCode(key)<EOL>mask = <NUM_LIT:0><EOL>for mod in modifiers:<EOL><INDENT>mask |= self.modMasks[mod]<EOL><DEDENT>window.ungrab_key(keycode, mask)<EOL>if Key.NUMLOCK in self.modMasks:<EOL><INDENT>window.ungrab_key(keycode, mask|self.modMasks[Key.NUMLOCK])<EOL><DEDENT>if Key.CAPSLOCK in self.modMasks:<EOL><INDENT>window.ungrab_key(keycode, mask|self.modMasks[Key.CAPSLOCK])<EOL><DEDENT>if Key.CAPSLOCK in self.modMasks and Key.NUMLOCK in self.modMasks:<EOL><INDENT>window.ungrab_key(keycode, mask|self.modMasks[Key.CAPSLOCK]|self.modMasks[Key.NUMLOCK])<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>logger.warning("<STR_LIT>", modifiers, key, str(e))<EOL><DEDENT>
Ungrab a specific hotkey in the given window