implemented variable size keymap