Fix keylayouts for ICS.

Some Crespo devices have a single combined touchscreen and use
the framework virtual key support instead of having a separate
capacitive keypad sensor.  The default key layout changed in
Honeycomb which had the effect of breaking the HOME key on
these devices.  Added a new key layout to explicitly map
the virtual keys.

Also fixed an old key layout that used obsolete syntax.

Bug: 4901533
Change-Id: I3281b516ea44a150ec85da29bc5f0f3c00da2e6b
diff --git a/device_base.mk b/device_base.mk
index 3d79fd9..8ef2435 100644
--- a/device_base.mk
+++ b/device_base.mk
@@ -61,7 +61,9 @@
 	device/samsung/crespo/cypress-touchkey.kl:system/usr/keylayout/cypress-touchkey.kl \
 	device/samsung/crespo/cypress-touchkey.kcm:system/usr/keychars/cypress-touchkey.kcm \
 	device/samsung/crespo/sec_jack.kl:system/usr/keylayout/sec_jack.kl \
-	device/samsung/crespo/sec_jack.kcm:system/usr/keychars/sec_jack.kcm
+	device/samsung/crespo/sec_jack.kcm:system/usr/keychars/sec_jack.kcm \
+	device/samsung/crespo/mxt224_ts_input.kl:system/usr/keylayout/mxt224_ts_input.kl \
+	device/samsung/crespo/mxt224_ts_input.kcm:system/usr/keychars/mxt224_ts_input.kcm
 
 #Bluetooth setup
 PRODUCT_COPY_FILES += \
diff --git a/herring-keypad.kl b/herring-keypad.kl
index 320a340..6dd0ebd 100644
--- a/herring-keypad.kl
+++ b/herring-keypad.kl
@@ -12,6 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-114   VOLUME_DOWN       WAKE
-115   VOLUME_UP         WAKE
-116   POWER             WAKE
+key 114   VOLUME_DOWN       WAKE
+key 115   VOLUME_UP         WAKE
+key 116   POWER             WAKE
diff --git a/mxt224_ts_input.kcm b/mxt224_ts_input.kcm
new file mode 100644
index 0000000..1a3cb57
--- /dev/null
+++ b/mxt224_ts_input.kcm
@@ -0,0 +1,15 @@
+# Copyright (C) 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.
+
+type SPECIAL_FUNCTION
diff --git a/mxt224_ts_input.kl b/mxt224_ts_input.kl
new file mode 100644
index 0000000..bea3f40
--- /dev/null
+++ b/mxt224_ts_input.kl
@@ -0,0 +1,18 @@
+# Copyright (C) 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.
+
+key 158   BACK              WAKE
+key 139   MENU              WAKE
+key 217   SEARCH            WAKE
+key 102   HOME              WAKE