Function 21, subfunction 2 - set keyboard layout.
Keyboard layout is used to convert keyboard scancodes to ASCII-codes,
which will be read by function 2.
Parameters:
- eax = 21 - function number
- ebx = 2 - subfunction number
- ecx = which layout to set:
- 1 = normal layout
- 2 = layout at pressed Shift
- 3 = layout at pressed Alt
- edx = pointer to layout - table of length 128 bytes
Or:
- ecx = 9
- dx = country identifier (1=eng, 2=fi, 3=ger, 4=rus)
Returned value:
- eax = 0 - success
- eax = 1 - incorrect parameter
Remarks:
- If Alt is pressed, the layout with Alt is used;
if Alt is not pressed, but Shift is pressed,
the layout with Shift is used;
if Alt and Shift are not pressed, but Ctrl is pressed, the normal
layout is used and then from the code is subtracted 0x60;
if no control key is pressed, the normal layout is used.
- To get layout and country identifier use
subfunction 2 of function 26.
- Country identifier is global system variable, which is not used
by the kernel itself; however the application '@panel' displays
the corresponding icon.
- The application @panel switches layouts on user request.