Add support to right to left languages

fix wrong direction keys