Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#DEFINE KEYBOARD_GERMAN_ST 0x0407 && Deutch (Standard)
#DEFINE KEYBOARD_ENGLISH_US 0x0409 && English (United States)
#DEFINE KEYBOARD_FRENCH_ST 0x040c && French (Standard)
#DEFINE KEYBOARD_RUSSIAN 0x0419 && Russian
* Select layout that we need
LOCAL lnNeedKeyboard
lnNeedKeyboard = KEYBOARD_RUSSIAN
* Read current layout
DECLARE INTEGER GetKeyboardLayout IN Win32API Integer
LOCAL lnCurrentKeyboard
lnCurrentKeyboard = GetKeyboardLayout(0)
* Read 16 bits (lowest 16 bit from 32)
lnCurrentKeyboard = BitRShift(m.lnCurrentKeyboard,16)
* If current layout don't equal required
IF m.lnCurrentKeyboard <> m.lnNeedKeyboard
* First of all try to activate layout that we need
DECLARE INTEGER ActivateKeyboardLayout IN Win32API Integer, Integer
LOCAL lnNewKeyboard
lnNewKeyboard = ActivateKeyboardLayout(m.lnNeedKeyboard,0)
IF m.lnNewKeyboard=0
* We haven't required layout in alternative layouts list
* so append layout we need
DECLARE INTEGER LoadKeyboardLayout IN Win32API String, Integer
* Transform code to string e.g. "00000419"
* String contains 8 symbols where first 4 - zeroes, and rest 4 - code in Hex
LOCAL lcNeedKeyboard
lcNeedKeyboard = RIGHT(TRANSFROM(m.lnNeedKeyboard,"@0"),8)
* loading...
m.lnNewKeyboard = LoadKeyboardLayout(m.lcNeedKeyboard,1)
* Read lowest bits
m.lnNewKeyboard = BitRShift(m.lnNewKeyboard,16)
IF m.lnNewKeyboard <> m.lnNeedKeyboard
* We can't load required layout
ENDIF
ENDIF
ENDIF
[code]
Juri Shutenko
Municipality of Maardu, Estonia
[URL unfurl="true"]http://kodu.neti.ee/~juri4[/URL]
[URL unfurl="true"]http://www.hot.ee/jurisfox[/URL]