Handle keymap allocation.