Fixed behavior of Begin and End keys on Mac
Merge pull request #1957 from dinhviethoa/556-mac-begin-end-keys-behavior

Fixed behavior of Begin and End keys on Mac