From 3b3ee63acb63fe1411d2e7f7edc78617e10bd6c9 Mon Sep 17 00:00:00 2001 From: Harry Cutts Date: Tue, 14 Mar 2023 14:54:17 +0000 Subject: [PATCH] Fix IDC file for Apple Magic Trackpad 2 over Bluetooth When I added the Magic Trackpad 2 configs, the Bluetooth on my development build was broken. I thought that I'd tested the symlinking behaviour by making the USB config file a symlink temporarily then changing it back for the CL, but clearly something went wrong, because the configuration changes are only being applied when the Magic Trackpad's connected over USB. Making the two files copies of one another with a comment to remind us to update both at once is probably the best solution for now. Bug: 271251605 Test: connect Magic Trackpad 2 by Bluetooth, check gesture property values from dumpsys input Change-Id: I7687e6116f6c46d5f85e1dadffc0b2e4dff23e1e --- data/keyboards/Vendor_004c_Product_0265.idc | 35 ++++++++++++++++++++- data/keyboards/Vendor_05ac_Product_0265.idc | 6 ++-- 2 files changed, 37 insertions(+), 4 deletions(-) mode change 120000 => 100644 data/keyboards/Vendor_004c_Product_0265.idc diff --git a/data/keyboards/Vendor_004c_Product_0265.idc b/data/keyboards/Vendor_004c_Product_0265.idc deleted file mode 120000 index 707dfcfe3a10f..0000000000000 --- a/data/keyboards/Vendor_004c_Product_0265.idc +++ /dev/null @@ -1 +0,0 @@ -Vendor_05ac_Product_0265.idc \ No newline at end of file diff --git a/data/keyboards/Vendor_004c_Product_0265.idc b/data/keyboards/Vendor_004c_Product_0265.idc new file mode 100644 index 0000000000000..bfea4db747c26 --- /dev/null +++ b/data/keyboards/Vendor_004c_Product_0265.idc @@ -0,0 +1,34 @@ +# Copyright 2023 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. + +# +# Apple Magic Trackpad 2 (Bluetooth) configuration file +# +# WHEN MODIFYING, also change the USB file (Vendor_05ac_Product_0265.idc) +# + +gestureProp.Pressure_Calibration_Offset = 30 +gestureProp.Palm_Pressure = 250.0 +gestureProp.Palm_Width = 20.0 +gestureProp.Multiple_Palm_Width = 20.0 + +# Enable Stationary Wiggle Filter +gestureProp.Stationary_Wiggle_Filter_Enabled = 1 +gestureProp.Finger_Moving_Energy = 0.0008 +gestureProp.Finger_Moving_Hysteresis = 0.0004 + +# Avoid accidental scroll/move on finger lift +gestureProp.Max_Stationary_Move_Speed = 47 +gestureProp.Max_Stationary_Move_Speed_Hysteresis = 1 +gestureProp.Max_Stationary_Move_Suppress_Distance = 0.2 diff --git a/data/keyboards/Vendor_05ac_Product_0265.idc b/data/keyboards/Vendor_05ac_Product_0265.idc index d72de649c0ed5..520d188c71fb6 100644 --- a/data/keyboards/Vendor_05ac_Product_0265.idc +++ b/data/keyboards/Vendor_05ac_Product_0265.idc @@ -13,9 +13,9 @@ # limitations under the License. # -# Apple Magic Trackpad 2 configuration file -# Bluetooth vendor ID 004c -# USB vendor ID 05ac +# Apple Magic Trackpad 2 (USB) configuration file +# +# WHEN MODIFYING, also change the Bluetooth file (Vendor_004c_Product_0265.idc) # gestureProp.Pressure_Calibration_Offset = 30