 			ExitApp, 1
 		}
 
-		D.CurrentKeyboard := D.Keyboards[D.CurrentKind][D.CurrentIndex]
+		D.CurrentKeyboard := D.Keyboards[D.CurrentKind][D.KindIndex[D.CurrentKind]]
 	}
 
 	SetKeyboard(KeyboardsData[1].CurrentKeyboard)

		Return
	}

	If (D.CurrentKind = Kind)
	{
		J := D.CurrentIndex
	}
	Else
	{
		J := 0
	}
	J := Mod(J, S.Length()) + 1

	D.CurrentKind := Kind
	D.CurrentIndex := J
	D.CurrentKeyboard := S[J]
	SetKeyboard(S[J])
}

			{
				D.CurrentKind := K
			}

			D.KindIndex[K] := 1
		}

		If (D.AllKeyboards.Length() = 0 Or Not D.CurrentKind)
