Fixed a few shortcuts problems.

Fixed shortcuts for RTL layout
Fixed #809
And fixed compile issue on windows