Modified the way key-modifiers are handled