implement key mapping

For the tables, see keymap_table_gen repositry