Bind action to hardware key combination I know that long-pressing power + volume down hardware buttons for a second or so on any screen takes a screenshot - I was hoping to bind an action to the power + volume up combination (specifically I was hoping to make it take a photo without having to open the camera app). 

I've looked at a few apps that I thought might do it but they all seem to only allow for remapping of individual hardware buttons/long-presses of individual buttons, not assigning an action to a hardware key combination like this.

I'm currently using cyanogenmod 11 with xposed installed, so an answer requiring either or both would work (although I didn't see any options in cyanogen or modules in xposed that would do this).
I've come close but I still can't launch an action at the same time when two keys are pressed in combination like the way we do for taking a screenshot. Anyhow, you would need:


AutoInput (for Android 4.3 and above) with Tasker, both are/have paid/7-day full trial, or
Xposed Additions (needs root access) with Tasker  to make key combination(s).


The inconvenience in this solution is that unlike pressing both keys at the same time you would have to do it in sequence. That is, press/hold Vol Up followed by Power button. The timing between these key-presses is flexible.

Single key-press

Use AutoInput with Tasker if you want to launch your action with single  key presses combination i.e. only press a key one time but don't want to long-press the keys.


In Tasker create an Event based profile from Plugin &rarr;  AutoInput &rarr;  Key &rarr; Configuration:


Keys: Volume Up
Key Action: Key Down

Create a task in it named "AutoInput Volume Up" and create following actions in it:


Variable &rarr; Variable Set:


Name: %Kset
To: 1

Task &rarr; Wait &rarr; Seconds: 1 
Variable &rarr; Variable Set:


Name: %Kset
To: 0



Explanation: When the single Vol Up press is detected the custom variable %Kset would be initialized to a custom value 1 and then we would wait for one second (under this one second you would've to press the Power key). We're then initializing the variable to 0 because our solution demands it, otherwise, our main task of capturing a photo would be executed just by  a single press of Power key.
Repeat step 1 but select Power key instead of Volume Up key.
Create a task in it named "AutoInput Power" and create following actions in it:


Task &rarr; If &rarr; Condition: %Kset eq 1
Plugin &rarr; AutoInput  &rarr; Modes:


Configuration: 


Key Suppress: Enable
Keys: Power

Timeout: None

Optional action -- Alert &rarr; Flash &rarr; Text: Commencing launch
Media &rarr; Take Photo &rarr; customize it as per your needs. 
Repeat sub-step 2 of step 4 but do Key Suppress: Disable.
Optional action -- Task &rarr; Else.
Optional action -- Alert &rarr; Flash &rarr; Text: Psst: You're too late Jim!



Explanation: 


In our first action we are checking whether the variable %Kset is set to 1 and if yes then the second action would block Power button press from getting passed to system since normally Power key-press would put the device to sleep and lock the screen.
Optionally flash a custom toast signalling that combination was successful.
Let the Tasker capture the image using the settings provided in that action.
Disable Power key suppress since otherwise, you would never be able to use that button normally, as long as key suppress is not explicitly disabled  or AutoInput's accessibility is running.
Else statement is optional but could come handy since in the beginning your consecutive key-presses may not be in coordination so the custom toast in next action would hint you that the combination wasn't successful.



That's it. Go to Home screen or to any non-Tasker app, press the Vol Up key and then the Power key under a time period of one second (don't worry, you would get a hang of it, or else, change the wait period) and you would see Tasker opening its custom interface, a picture would be captured automatically and you would be taken back to what you're originally doing.

Hurray!



Long key-press

Some people may not like single pressing both the keys since they are not habitual or may feel odd to use them in that coordination. In that case, provided that you've root access and Xposed Framework installed, you can use Xposed Additions to set long key-press actions for your keys. 

For custom action to be set to those keys we would need Tasker. Create the two tasks named "AutoInput Volume Up" and "AutoInput Power" explicitly in Tasker, only if you didn't follow Single key-press section.


In that app go to Button &rarr; set Long press delay time &rarr; Add new key &rarr; tap Vol Up key &rarr; select the new key entry.
Tap Add new Condition  &rarr; Screen On &rarr; &rarr; select the new entry &rarr; check Long Press and tap on that entry  &rarr; scroll down to Shortcut &rarr; Task Shortcut &rarr; AutoInput Volume Up.
Repeat step 1 but do it for Power key.
Repeat step 2 but select AutoInput Power under Task Shortcut.


Whenever Xposed Additions is enabled and activated in Xposed Framework, on any long-press of a button/key set under that app, you would feel a slight vibration. That vibration would help immensely to know when to release the first key and long-press the other key. 

Try it because it's fun.