Also added del, comma, and number keys as keys that can be mapped, in case we need to
do testing or for me with a broken power button to map comma -> power :P
added crappy op_bright_up/down scripts, vimacs can fix them up :)
{ KEY_A, "a" },
{ KEY_MENU, "pandora" },
{ KEY_POWER, "power" },
+ { KEY_DELETE, "del" },
+ { KEY_COMMA, "comma" },
+ { KEY_1, "1" },
+ { KEY_2, "2" },
+ { KEY_3, "3" },
+ { KEY_4, "4" },
+ { KEY_5, "5" },
+ { KEY_6, "6" },
+ { KEY_7, "7" },
+ { KEY_8, "8" },
+ { KEY_9, "9" },
+ { KEY_0, "0" },
+ { KEY_BRIGHTNESSDOWN, "lcdbrightdown" },
+ { KEY_BRIGHTNESSUP, "lcdbrightup" },
{ -1, NULL }
};
# pass 'hold duration' to the script
pandora /usr/pandora/scripts/op_menu.sh
power /usr/pandora/scripts/op_power.sh
+lcdbrightdown /usr/pandora/scripts/op_bright_down.sh
+lcdbrightup /usr/pandora/scripts/op_bright_up.sh
[events]
# pass 'action code' to the script
--- /dev/null
+#!/bin/bash
+cur=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness);
+echo $(($cur-10)) > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness
--- /dev/null
+#!/bin/bash
+cur=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness);
+echo $(($cur+10)) > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness