Skip to content

Words, delays... #28

Description

OK, so I have the g13d installed, and after resolving an issue with /dev/uinput being unwriteable by default even with the udev config installed (I think the solution was ultimately to add myself to the "input" group that the device apparently belonged to along with root so 0660 worked) I have been able to bind its keys. Small issue binding -- if you just cat a long list of bindings into /tmp/g13_0 you risk losing characters as the device appears to be slow. I fixed this by binding with a shell script and simply put a sleep 1 command in between each binding and it worked fine.

The two remaining problems I seem to be having are: I'd like to send whole words on a keypress. E.g. in WoW one can bow to those around you with /bow, so I have programmed a key with:

KEY_SLASH+KEY_B+KEY_O+KEY_W+KEY_ENTER

and it works fine, although it is tedious to code. However, the device doesn't output each key "separately". If I try entering \sleep this way, the two e's are compressed to 1, \slep. Which fails. There isn't much documentation, so I'm not sure if I'm doing this correctly, but it is certainly something I'd like to be able to do, ideally with a much easier unixoid syntax, like: bind G10 "/sleep\r".

The second useful thing would be delays and/or durations. In game play, pressing and holding a key is interpreted from the raw keyboard so making and breaking the contact are separate events IIRC. Hence pressing w and holding it runs you straight in WoW until you release the key. In a lot of key sequences one might like to construct, they would be things like:

"press w for 0.77 milliseconds, release it and type in a single space, then press d for 0.54 seconds, then enter the string '/stealth\n' typed".

I see hints about being able to use the input and output pipes in some way to accomplish this sort of thing with external scripting code, but again there is little in the documentation about how to go about it. Can I get a G11 keypress to send a signal to /tmp/g13_0_out or whatever to be picked up by a script which generates the desired sequence of keys and sends them in to be delivered to the fake "keyboard" as if they were typed? Or is this just impossible...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions