Fix mod can take not only keycodes but also keysyms