move KeyMap_Invoke into the autoload file

This will keep the class file cleaner, and may also fix #223