Added mapping files for DualShock3 and DualShock4

All buttons and axes on DualShock3 and DualShock4 are mapped
explicitly, because some Linux drivers do not map them correctly.
Also, the definition of BUTTON_X/Y in Linux and Android is flipped.

The most significant bit (i.e. 0x8000 and 0x8111) in the "Version"
part of the filename indicates a newer Linux hid-sony driver (>=4.10
for DualShock4 and >=4.12 for DualShock3) which complies to the
mapping in Linux gamepad specifications, and supports all DualShock4
features (i.e. motions sensors, touchpad).

Older Linux driver which does not have the correct mapping will use
the mapping files without "Version".

All files with "Version_8000" and "Version_8100" are meant for
Bluetooth connected DualShock3/DualShock4, and all files with
"Version_8111" are meant for USB connected DualShock3/DualShock4.

Test: Connect DualShock3 and DualShock4, over USB and over Bluetooth.
Test: Check that the Dpad and left analog stick can be used to
      navigate the UI.
Test: If newer Linux driver is loaded, check that the touchpad can
      be used to navigate the UI.
Bug: 38511270
Change-Id: I5630c495af16185689bbff25943b3e2d3c93e709
diff --git a/data/keyboards/Vendor_054c_Product_0268.kl b/data/keyboards/Vendor_054c_Product_0268.kl
index 522db3c..b463dd8 100644
--- a/data/keyboards/Vendor_054c_Product_0268.kl
+++ b/data/keyboards/Vendor_054c_Product_0268.kl
@@ -21,8 +21,6 @@
 key 0x126    DPAD_DOWN
 key 0x127    DPAD_LEFT
 
-key 0x120    BUTTON_SELECT
-key 0x123    BUTTON_START
 key 0x12e    BUTTON_A
 key 0x12d    BUTTON_B
 key 0x12f    BUTTON_X
@@ -34,9 +32,6 @@
 key 0x121    BUTTON_THUMBL
 key 0x122    BUTTON_THUMBR
 
-# PS key
-key 0x2d0    BUTTON_MODE
-
 # Left Analog Stick
 axis 0x00    X
 axis 0x01    Y
@@ -74,3 +69,11 @@
 
 # Square
 # axis 0x37
+
+# Mapping according to https://www.kernel.org/doc/Documentation/input/gamepad.txt
+# Select
+key 0x120    BUTTON_SELECT
+# Start
+key 0x123    BUTTON_START
+# PS key
+key 0x2d0    BUTTON_MODE