added keyboard selection. make legend