Move global cmd_keycodes data into an allocated data structure. (dm)