keymap function no longer based on other code