This cleans up the code some and is more-correct since it will eg. no longer remap fkeys on keyrelease even when it was not remapped on keypress.