added switches for keyboard commands, etc
merged with master