 		Return
 	}
 
+	J := D.KindIndex[Kind]
 	If (D.CurrentKind = Kind)
 	{
-		J := D.CurrentIndex
+		J := Mod(J, S.Length()) + 1
 	}
-	Else
-	{
-		J := 0
-	}
-	J := Mod(J, S.Length()) + 1
 
 	D.CurrentKind := Kind
-	D.CurrentIndex := J
+	D.KindIndex[Kind] := J
 	D.CurrentKeyboard := S[J]
 	SetKeyboard(S[J])
 }


		D.AllKeyboards := []
		D.CurrentKind := ""
		D.CurrentIndex := 1

		For I, K In KeyboardKinds
		{

			ExitApp, 1
		}

		D.CurrentKeyboard := D.Keyboards[D.CurrentKind][D.KindIndex[D.CurrentKind]]
	}

	SetKeyboard(KeyboardsData[1].CurrentKeyboard)
