add key mapping for buffer