Use keyboardSet extra value of subtype to specify layout type

Change-Id: Ice1f345a08a8d760e3b847c885c4072e3e142c97
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 86f2abe..39d50e3 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -350,8 +350,8 @@
     </declare-styleable>
 
     <declare-styleable name="Keyboard_Case">
-        <!-- This should be aligned with KeyboardSet_Element's elementName. -->
-        <attr name="keyboardSetElement" format="enum|string">
+        <!-- This should be aligned with KeyboardLayoutSet_Element's elementName. -->
+        <attr name="keyboardLayoutSetElement" format="enum|string">
             <enum name="alphabet" value="0" />
             <enum name="alphabetManualShifted" value="1" />
             <enum name="alphabetAutomaticShifted" value="2" />
@@ -403,7 +403,7 @@
         <attr name="parentStyle" format="string" />
     </declare-styleable>
 
-    <declare-styleable name="KeyboardSet_Element">
+    <declare-styleable name="KeyboardLayoutSet_Element">
         <!-- This should be aligned with KeyboardId.ELEMENT_* -->
         <attr name="elementName" format="enum">
             <enum name="alphabet" value="0" />
diff --git a/java/res/xml-da/keyboard_set.xml b/java/res/xml-da/keyboard_set.xml
deleted file mode 100644
index 0db9b1f..0000000
--- a/java/res/xml-da/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-de-rQY/keyboard_set.xml b/java/res/xml-de-rQY/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-de-rQY/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-de/keyboard_set.xml b/java/res/xml-de/keyboard_set.xml
deleted file mode 100644
index f9f7451..0000000
--- a/java/res/xml-de/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-et/keyboard_set.xml b/java/res/xml-et/keyboard_set.xml
deleted file mode 100644
index 0db9b1f..0000000
--- a/java/res/xml-et/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-fi/keyboard_set.xml b/java/res/xml-fi/keyboard_set.xml
deleted file mode 100644
index 0db9b1f..0000000
--- a/java/res/xml-fi/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-fr-rCA/keyboard_set.xml b/java/res/xml-fr-rCA/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-fr-rCA/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-fr-rCH/keyboard_set.xml b/java/res/xml-fr-rCH/keyboard_set.xml
deleted file mode 100644
index f9f7451..0000000
--- a/java/res/xml-fr-rCH/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-hr/keyboard_set.xml b/java/res/xml-hr/keyboard_set.xml
deleted file mode 100644
index f9f7451..0000000
--- a/java/res/xml-hr/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-hu/keyboard_set.xml b/java/res/xml-hu/keyboard_set.xml
deleted file mode 100644
index f9f7451..0000000
--- a/java/res/xml-hu/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwertz"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-ky/keyboard_set.xml b/java/res/xml-ky/keyboard_set.xml
deleted file mode 100644
index 959f644..0000000
--- a/java/res/xml-ky/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_east_slavic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-nb/keyboard_set.xml b/java/res/xml-nb/keyboard_set.xml
deleted file mode 100644
index 0db9b1f..0000000
--- a/java/res/xml-nb/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-pl/keyboard_set.xml b/java/res/xml-pl/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-pl/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-pt/keyboard_set.xml b/java/res/xml-pt/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-pt/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-ro/keyboard_set.xml b/java/res/xml-ro/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-ro/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-ru/keyboard_set.xml b/java/res/xml-ru/keyboard_set.xml
deleted file mode 100644
index 959f644..0000000
--- a/java/res/xml-ru/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_east_slavic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-sk/keyboard_set.xml b/java/res/xml-sk/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-sk/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-sl/keyboard_set.xml b/java/res/xml-sl/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-sl/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-sr/keyboard_set.xml b/java/res/xml-sr/keyboard_set.xml
deleted file mode 100644
index 5098134..0000000
--- a/java/res/xml-sr/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_south_slavic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-sv/keyboard_set.xml b/java/res/xml-sv/keyboard_set.xml
deleted file mode 100644
index 0db9b1f..0000000
--- a/java/res/xml-sv/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_nordic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-sw600dp/key_styles_common.xml b/java/res/xml-sw600dp/key_styles_common.xml
index 77c0efd..45e22fc 100644
--- a/java/res/xml-sw600dp/key_styles_common.xml
+++ b/java/res/xml-sw600dp/key_styles_common.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
         >
             <key-style
                 latin:styleName="hasShiftedLetterHintStyle"
@@ -38,7 +38,7 @@
     <!-- Functional key styles -->
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetAutomaticShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetAutomaticShifted"
         >
             <key-style
                 latin:styleName="shiftKeyStyle"
@@ -48,7 +48,7 @@
                 latin:backgroundType="stickyOff" />
         </case>
         <case
-            latin:keyboardSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <key-style
                 latin:styleName="shiftKeyStyle"
@@ -109,7 +109,7 @@
         latin:backgroundType="functional" />
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
             latin:navigatePrevious="true"
         >
             <key-style
diff --git a/java/res/xml-sw600dp/rowkeys_thai1.xml b/java/res/xml-sw600dp/rowkeys_thai1.xml
index e49cb2b..6aec7c2 100644
--- a/java/res/xml-sw600dp/rowkeys_thai1.xml
+++ b/java/res/xml-sw600dp/rowkeys_thai1.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0E51: "๑" THAI DIGIT ONE -->
             <Key
diff --git a/java/res/xml-sw600dp/rowkeys_thai2.xml b/java/res/xml-sw600dp/rowkeys_thai2.xml
index 86a2198..edb759a 100644
--- a/java/res/xml-sw600dp/rowkeys_thai2.xml
+++ b/java/res/xml-sw600dp/rowkeys_thai2.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0E50: "๐" THAI DIGIT ZERO -->
             <Key
diff --git a/java/res/xml-sw600dp/rowkeys_thai3.xml b/java/res/xml-sw600dp/rowkeys_thai3.xml
index abd6763..7507dde 100644
--- a/java/res/xml-sw600dp/rowkeys_thai3.xml
+++ b/java/res/xml-sw600dp/rowkeys_thai3.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0E24: "ฤ" THAI CHARACTER RU -->
             <Key
diff --git a/java/res/xml-sw600dp/rowkeys_thai4.xml b/java/res/xml-sw600dp/rowkeys_thai4.xml
index cec34a6..64549bd 100644
--- a/java/res/xml-sw600dp/rowkeys_thai4.xml
+++ b/java/res/xml-sw600dp/rowkeys_thai4.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <Key
                 latin:keyLabel="(" />
diff --git a/java/res/xml-sw768dp/key_styles_common.xml b/java/res/xml-sw768dp/key_styles_common.xml
index f4a1a4e..e1c2369 100644
--- a/java/res/xml-sw768dp/key_styles_common.xml
+++ b/java/res/xml-sw768dp/key_styles_common.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
         >
             <key-style
                 latin:styleName="hasShiftedLetterHintStyle"
@@ -37,7 +37,7 @@
     </switch>
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetAutomaticShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetAutomaticShifted"
         >
             <key-style
                 latin:styleName="shiftKeyStyle"
@@ -47,7 +47,7 @@
                 latin:backgroundType="stickyOff" />
         </case>
         <case
-            latin:keyboardSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <key-style
                 latin:styleName="shiftKeyStyle"
@@ -108,7 +108,7 @@
         latin:backgroundType="functional" />
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
             latin:navigatePrevious="true"
         >
             <key-style
diff --git a/java/res/xml-tr/keyboard_set.xml b/java/res/xml-tr/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-tr/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-uk/keyboard_set.xml b/java/res/xml-uk/keyboard_set.xml
deleted file mode 100644
index 959f644..0000000
--- a/java/res/xml-uk/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_east_slavic"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml-vi/keyboard_set.xml b/java/res/xml-vi/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml-vi/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml/key_azerty_quote.xml b/java/res/xml/key_azerty_quote.xml
index 8c44f78..966ae6f 100644
--- a/java/res/xml/key_azerty_quote.xml
+++ b/java/res/xml/key_azerty_quote.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
         >
             <Key
                 latin:keyLabel="\?" />
diff --git a/java/res/xml/key_greek_semicolon.xml b/java/res/xml/key_greek_semicolon.xml
index a28b772..ae73a59 100644
--- a/java/res/xml/key_greek_semicolon.xml
+++ b/java/res/xml/key_greek_semicolon.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
         >
             <Key
                 latin:keyLabel=":"
diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml
index d5a9a26..8d01091 100644
--- a/java/res/xml/key_styles_common.xml
+++ b/java/res/xml/key_styles_common.xml
@@ -42,7 +42,7 @@
     <!-- Functional key styles -->
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetAutomaticShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetAutomaticShifted"
         >
             <key-style
                 latin:styleName="shiftKeyStyle"
@@ -52,7 +52,7 @@
                 latin:backgroundType="stickyOff" />
         </case>
         <case
-            latin:keyboardSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <key-style
                 latin:styleName="shiftKeyStyle"
@@ -82,7 +82,7 @@
         <!-- Shift + Enter in textMultiLine field. -->
         <case
             latin:isMultiLine="true"
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
         >
             <key-style
                 latin:styleName="enterKeyStyle"
diff --git a/java/res/xml/key_styles_enter.xml b/java/res/xml/key_styles_enter.xml
index a4c9a33..e15a0be 100644
--- a/java/res/xml/key_styles_enter.xml
+++ b/java/res/xml/key_styles_enter.xml
@@ -108,7 +108,7 @@
         <!-- Shift + Enter in textMultiLine field. -->
         <case
             latin:isMultiLine="true"
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
         >
             <key-style
                 latin:styleName="enterKeyStyle"
diff --git a/java/res/xml-ar/keyboard_set.xml b/java/res/xml/keyboard_layout_set_arabic.xml
similarity index 93%
rename from java/res/xml-ar/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_arabic.xml
index 88d3201..10e95bd 100644
--- a/java/res/xml-ar/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_arabic.xml
@@ -2,7 +2,7 @@
 <!--
 /*
 **
-** Copyright 2011, The Android Open Source Project
+** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-fr/keyboard_set.xml b/java/res/xml/keyboard_layout_set_azerty.xml
similarity index 93%
rename from java/res/xml-fr/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_azerty.xml
index 2ac25c9..d4df667 100644
--- a/java/res/xml-fr/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_azerty.xml
@@ -2,7 +2,7 @@
 <!--
 /*
 **
-** Copyright 2011, The Android Open Source Project
+** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-bg/keyboard_set.xml b/java/res/xml/keyboard_layout_set_bulgarian.xml
similarity index 96%
rename from java/res/xml-bg/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_bulgarian.xml
index 593ad97..c6fdff9 100644
--- a/java/res/xml-bg/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_bulgarian.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-be/keyboard_set.xml b/java/res/xml/keyboard_layout_set_east_slavic.xml
similarity index 93%
rename from java/res/xml-be/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_east_slavic.xml
index 959f644..8d66faf 100644
--- a/java/res/xml-be/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_east_slavic.xml
@@ -2,7 +2,7 @@
 <!--
 /*
 **
-** Copyright 2011, The Android Open Source Project
+** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-fa/keyboard_set.xml b/java/res/xml/keyboard_layout_set_farsi.xml
similarity index 96%
rename from java/res/xml-fa/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_farsi.xml
index f508f8f..b9a91e3 100644
--- a/java/res/xml-fa/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_farsi.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-ka/keyboard_set.xml b/java/res/xml/keyboard_layout_set_georgian.xml
similarity index 97%
rename from java/res/xml-ka/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_georgian.xml
index bc3df1e..36d0916 100644
--- a/java/res/xml-ka/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_georgian.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -55,4 +55,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-el/keyboard_set.xml b/java/res/xml/keyboard_layout_set_greek.xml
similarity index 96%
rename from java/res/xml-el/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_greek.xml
index af74e12..b376e4f 100644
--- a/java/res/xml-el/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_greek.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-iw/keyboard_set.xml b/java/res/xml/keyboard_layout_set_hebrew.xml
similarity index 93%
rename from java/res/xml-iw/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_hebrew.xml
index 6c51fb0..d0f12f3 100644
--- a/java/res/xml-iw/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_hebrew.xml
@@ -2,7 +2,7 @@
 <!--
 /*
 **
-** Copyright 2011, The Android Open Source Project
+** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-hi/keyboard_set.xml b/java/res/xml/keyboard_layout_set_hindi.xml
similarity index 97%
rename from java/res/xml-hi/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_hindi.xml
index c1fd071..e850c7e 100644
--- a/java/res/xml-hi/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_hindi.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -55,4 +55,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-is/keyboard_set.xml b/java/res/xml/keyboard_layout_set_nordic.xml
similarity index 96%
rename from java/res/xml-is/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_nordic.xml
index 44edbba..1f00f44 100644
--- a/java/res/xml-is/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_nordic.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-zz-rQY/keyboard_set.xml b/java/res/xml/keyboard_layout_set_qwerty.xml
similarity index 96%
rename from java/res/xml-zz-rQY/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_qwerty.xml
index e9eddbf..8215170 100644
--- a/java/res/xml-zz-rQY/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_qwerty.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-cs/keyboard_set.xml b/java/res/xml/keyboard_layout_set_qwertz.xml
similarity index 93%
rename from java/res/xml-cs/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_qwertz.xml
index f9f7451..f9e87a6 100644
--- a/java/res/xml-cs/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_qwertz.xml
@@ -2,7 +2,7 @@
 <!--
 /*
 **
-** Copyright 2011, The Android Open Source Project
+** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-mk/keyboard_set.xml b/java/res/xml/keyboard_layout_set_south_slavic.xml
similarity index 96%
rename from java/res/xml-mk/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_south_slavic.xml
index 6b8b844..36666b9 100644
--- a/java/res/xml-mk/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_south_slavic.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-es/keyboard_set.xml b/java/res/xml/keyboard_layout_set_spanish.xml
similarity index 93%
rename from java/res/xml-es/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_spanish.xml
index 4ff5b54..0ef712b 100644
--- a/java/res/xml-es/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_spanish.xml
@@ -2,7 +2,7 @@
 <!--
 /*
 **
-** Copyright 2011, The Android Open Source Project
+** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -39,4 +39,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml-th/keyboard_set.xml b/java/res/xml/keyboard_layout_set_thai.xml
similarity index 97%
rename from java/res/xml-th/keyboard_set.xml
rename to java/res/xml/keyboard_layout_set_thai.xml
index 99e81b8..94713e3 100644
--- a/java/res/xml-th/keyboard_set.xml
+++ b/java/res/xml/keyboard_layout_set_thai.xml
@@ -18,7 +18,7 @@
 */
 -->
 
-<KeyboardSet
+<KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <Element
         latin:elementName="alphabet"
@@ -55,4 +55,4 @@
     <Element
         latin:elementName="number"
         latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
+</KeyboardLayoutSet>
diff --git a/java/res/xml/keyboard_set.xml b/java/res/xml/keyboard_set.xml
deleted file mode 100644
index 8966ddb..0000000
--- a/java/res/xml/keyboard_set.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<KeyboardSet
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
-    <Element
-        latin:elementName="alphabet"
-        latin:elementKeyboard="@xml/kbd_qwerty"
-        latin:enableProximityCharsCorrection="true" />
-    <Element
-        latin:elementName="symbols"
-        latin:elementKeyboard="@xml/kbd_symbols" />
-    <Element
-        latin:elementName="symbolsShifted"
-        latin:elementKeyboard="@xml/kbd_symbols_shift" />
-    <Element
-        latin:elementName="phone"
-        latin:elementKeyboard="@xml/kbd_phone" />
-    <Element
-        latin:elementName="phoneSymbols"
-        latin:elementKeyboard="@xml/kbd_phone_symbols" />
-    <Element
-        latin:elementName="number"
-        latin:elementKeyboard="@xml/kbd_number" />
-</KeyboardSet>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index e43fb32..ba45343 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -20,7 +20,8 @@
 <!-- The attributes in this XML file provide configuration information -->
 <!-- for the Input Method Manager. -->
 
-<!-- Supported locales: name/layout
+<!-- Supported subtypes
+    keyboard_locale: script_name/keyboard_layout_set[:keyboard_locale]
     ar: Arabic/arabic
     be: Belarusian/east_slavic
     bg: Bulgarian/bulgarian
@@ -75,246 +76,259 @@
             android:label="@string/subtype_en_US"
             android:imeSubtypeLocale="en_US"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="TrySuppressingImeSwitcher,AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,TrySuppressingImeSwitcher,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_en_GB"
             android:imeSubtypeLocale="en_GB"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="TrySuppressingImeSwitcher,AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,TrySuppressingImeSwitcher,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="ar"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=arabic"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="be"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=east_slavic"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="bg"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=bulgarian"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="cs"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwertz,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="da"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=nordic,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="de"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwertz,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic_qwerty"
             android:imeSubtypeLocale="de"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable,KeyboardLocale=de_QY"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty:de_QY,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="el"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=greek"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="es"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="et"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=nordic,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="fa"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=farsi"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="fi"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=nordic,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="fr"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=azerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="fr_CA"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="fr_CH"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwertz,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="hi"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=hindi"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="hr"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwertz,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="hu"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwertz,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="is"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="it"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <!-- Java uses the deprecated "iw" code instead of the standard "he" code for Hebrew. -->
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="iw"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=hebrew"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="ka"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=georgian"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="ky"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=east_slavic"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="lt"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="lv"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="mk"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=south_slavic"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="nb"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=nordic,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="nl"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="pl"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="pt"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="ro"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="ru"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=east_slavic"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="sk"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="sl"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="sr"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=south_slavic"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="sv"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
-    />
-    <subtype android:icon="@drawable/ic_subtype_keyboard"
-            android:label="@string/subtype_generic"
-            android:imeSubtypeLocale="tr"
-            android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=nordic,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="th"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue=""
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=thai"
+    />
+    <subtype android:icon="@drawable/ic_subtype_keyboard"
+            android:label="@string/subtype_generic"
+            android:imeSubtypeLocale="tr"
+            android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="uk"
             android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=east_slavic"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_generic"
             android:imeSubtypeLocale="vi"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable"
     />
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_no_language_qwerty"
             android:imeSubtypeLocale="zz_QY"
             android:imeSubtypeMode="keyboard"
-            android:imeSubtypeExtraValue="AsciiCapable,EnabledWhenDefaultIsNotAsciiCapable"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EnabledWhenDefaultIsNotAsciiCapable"
     />
 </input-method>
diff --git a/java/res/xml/rowkeys_georgian1.xml b/java/res/xml/rowkeys_georgian1.xml
index 6b24c29..fcdf3fa 100644
--- a/java/res/xml/rowkeys_georgian1.xml
+++ b/java/res/xml/rowkeys_georgian1.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <Key
                 latin:keyLabel="Q"
diff --git a/java/res/xml/rowkeys_georgian2.xml b/java/res/xml/rowkeys_georgian2.xml
index f50e3d6..5673b90 100644
--- a/java/res/xml/rowkeys_georgian2.xml
+++ b/java/res/xml/rowkeys_georgian2.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <Key
                 latin:keyLabel="A"
diff --git a/java/res/xml/rowkeys_georgian3.xml b/java/res/xml/rowkeys_georgian3.xml
index f908673..1c0f45b 100644
--- a/java/res/xml/rowkeys_georgian3.xml
+++ b/java/res/xml/rowkeys_georgian3.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+10EB: "ძ" GEORGIAN LETTER JIL -->
             <Key
diff --git a/java/res/xml/rowkeys_greek1.xml b/java/res/xml/rowkeys_greek1.xml
index 4df49f8..5777d3b 100644
--- a/java/res/xml/rowkeys_greek1.xml
+++ b/java/res/xml/rowkeys_greek1.xml
@@ -25,7 +25,7 @@
     <!--
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
         >
             U+0385: "΅" GREEK DIALYTIKA TONOS
             <Key
diff --git a/java/res/xml/rowkeys_hindi1.xml b/java/res/xml/rowkeys_hindi1.xml
index eb99de9..656ba01 100644
--- a/java/res/xml/rowkeys_hindi1.xml
+++ b/java/res/xml/rowkeys_hindi1.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0914: "औ" DEVANAGARI LETTER AU
                  U+0912/U+0902: "ऒं" DEVANAGARI LETTER SHORT O//DEVANAGARI SIGN ANUSVARA -->
diff --git a/java/res/xml/rowkeys_hindi2.xml b/java/res/xml/rowkeys_hindi2.xml
index 95f4881..05e3db2 100644
--- a/java/res/xml/rowkeys_hindi2.xml
+++ b/java/res/xml/rowkeys_hindi2.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0913: "ओ" DEVANAGARI LETTER O
                  U+0913/U+0902: "ओं" DEVANAGARI LETTER O/DEVANAGARI SIGN ANUSVARA
diff --git a/java/res/xml/rowkeys_hindi3.xml b/java/res/xml/rowkeys_hindi3.xml
index c023115..92bcb56 100644
--- a/java/res/xml/rowkeys_hindi3.xml
+++ b/java/res/xml/rowkeys_hindi3.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0911: "ऑ" DEVANAGARI LETTER CANDRA O -->
             <Key
diff --git a/java/res/xml/rowkeys_thai1.xml b/java/res/xml/rowkeys_thai1.xml
index 943112a..4b49da1 100644
--- a/java/res/xml/rowkeys_thai1.xml
+++ b/java/res/xml/rowkeys_thai1.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0E0E: "ฎ" THAI CHARACTER DO CHADA -->
             <Key
diff --git a/java/res/xml/rowkeys_thai2.xml b/java/res/xml/rowkeys_thai2.xml
index 02ea6c5..80e3563 100644
--- a/java/res/xml/rowkeys_thai2.xml
+++ b/java/res/xml/rowkeys_thai2.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0E24: "ฤ" THAI CHARACTER RU -->
             <Key
diff --git a/java/res/xml/rowkeys_thai3.xml b/java/res/xml/rowkeys_thai3.xml
index 72c0def..b833807 100644
--- a/java/res/xml/rowkeys_thai3.xml
+++ b/java/res/xml/rowkeys_thai3.xml
@@ -23,7 +23,7 @@
 >
     <switch>
         <case
-            latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+            latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
         >
             <!-- U+0E09: "ฉ" THAI CHARACTER CHO CHING -->
             <Key