fix various bugs, and add key shortcuts to change the selected object