1

I recently wrote a script with a loop that will switch out the functionality of a set of key presses based on a set of other keypresses.

I'm starting to think the same can be done with triggerhappy.

So for instance, if you press 1, the q key is assigned functionality a(), w is assigned functionality b(), and e is assigned the functionality c() when pressed.

But if I press 2 then the q key is assigned functionality d(), and w is assigned the functionality e(), and e is assigned the functionality f().

My thought is that it would be something like assigning an event to KEY_1 which would call thd --triggers <path-to-events-for-file-1> and replace the functionalities with (the same thing for KEY_1-KEY_2) and replace the following: q:a() w:b() c:()

And that it would do the same with KEY_2 except that instead the keys would be q:d() w:e() e:f()

Where <letter>() is a bash command.

Is that correct?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.