Fixed key map using incorrect pointer reference