hawck icon indicating copy to clipboard operation
hawck copied to clipboard

Question: does this support mouse keys?

Open lgbaldoni opened this issue 4 years ago • 1 comments

Specifically the scrollwheel. I'm a little overwhelmed by the whole setup, so I'll just ask about my use case: basically would it be possible to Hawck launch a command when a modifier (e.g. ctrl) and mousewheel roll happen concurrently?

lgbaldoni avatar Mar 13 '20 08:03 lgbaldoni

I'm actually not sure, I don't support mouse movements at all, and have never tried running inputd with a mouse. Mouse key presses/rolling might be supported, and you can find out whether they are by doing this:

$ # Look for mouse events, it will be a link to a /dev/input/event device file.
$ ls /dev/input/by-path 
$ sudo runuser -u hawck-input -- hawck-inputd --no-hotplug --kbd-device $your_mouse

You'll also need to copy the unsafe mode csv file to /var/lib/hawck-inputd/keys/.

Then, create a simple logger:

any => function ()
    u.puts(kbd)
    kbd:echo()
    udev:flush()
end

Place it in ~/.config/scripts/log.hwk, and give it exec permissions (specifically it needs to have chmod 0755.)

Run macrod without forking:

$ hawck-macrod --no-fork

Warning: Be very careful with any in scripts, especially if you run macrod at startup.

And look for the kbd fields that start with "event_".

You might have to try different /dev/input/* devices, many usb mice create several of them for different things.

Sorry about the lack of documentation and complex setup, the project has been under rapid development lately with a lot of changes, when I have some more time I'll make sure to write some guides and update all the information.

I'm also typing this on a phone, away from my computer, so this is all from memory (I could be misremembering.)

snyball avatar Mar 13 '20 20:03 snyball