1. fixed the crash bug on MacOS 10.7
2. added support to the new virtual keyboard layout