From 3f5d4bd273d036493b7b3439c62866856aafd524 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Sat, 19 Dec 2015 02:13:47 -0500 Subject: [PATCH] Add a FreePIE script that makes more buttons on the X52 Pro usable for Elite. --- FreePIE/x52pro_mfd_freedom.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 FreePIE/x52pro_mfd_freedom.py diff --git a/FreePIE/x52pro_mfd_freedom.py b/FreePIE/x52pro_mfd_freedom.py new file mode 100755 index 0000000..0e4e7a1 --- /dev/null +++ b/FreePIE/x52pro_mfd_freedom.py @@ -0,0 +1,25 @@ +# This is a script for FreePIE (http://andersmalmgren.github.io/FreePIE/) +# +# It binds the MFD buttons on the x52pro to output keypad button presses. + +if starting: + x52pro = joystick[1] + +class mfd(): + LeftRollerClick = x52pro.getDown(31) + LeftRollerUp = x52pro.getDown(34) + LeftRollerDown = x52pro.getDown(35) + RightRollerClick = x52pro.getDown(38) + RightRollerUp = x52pro.getDown(36) + RightRollerDown = x52pro.getDown(37) + StartStop = x52pro.getDown(32) + Reset = x52pro.getDown(33) + +keyboard.setKey(Key.NumberPad4, mfd.LeftRollerClick) +keyboard.setKey(Key.NumberPad7, mfd.LeftRollerUp) +keyboard.setKey(Key.NumberPad1, mfd.LeftRollerDown) +keyboard.setKey(Key.NumberPad6, mfd.RightRollerClick) +keyboard.setKey(Key.NumberPad8, mfd.RightRollerUp) +keyboard.setKey(Key.NumberPad3, mfd.RightRollerDown) +keyboard.setKey(Key.NumberPad2, mfd.Reset) +keyboard.setKey(Key.NumberPad5, mfd.StartStop)