How do I use a udev file to rebind keys on a secondary keyboard that I intend to use for macros to execute a bash script?

I am trying to rebind the keys on a second keyboard in such a way that, when I press, say, the "A" key, it will trigger a script that will execute a command to write the letter a to a text file, then press the F24 key, which a different script is listening for which looks at the text file to see what information is in the file, then executing a command based on the information which is in the file, via a udev file.

I am using this tutorial to figure out how to do this, and I have created a udev file that looks something like this (this is paraphrased, because the actual file is really long:)

evdev:input:b*vYYYYpXXXXe*
#q
KEYBOARD_KEY_70014
#w
KEYBOARD_KEY_7001a
#e
KEYBOARD_KEY_70008

and the rest.

According to the tutorial, I should be able to rebind the keys to other keys, such as F16, F19, etc., but then I would run out of keys, since I intend to do this process to as many keys as possible; instead, what I want is to rebind the keys to scripts that do as spoken above.

Is it possible for this to be done?

8 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like