key mapping for buffer