map keys for the buffer. related issue #163