Bug 1043121 - Move IMESwitcher in keyboard_manager to another script

Please use `handleEvent` pattern here.