Made modifications to handling Ctrl keys.