Clean up handling of event flags.
Relicense everything (except French keymap) as MIT. Status of French keymap is TBD.