Map mouse clicks?

Can we? I’m thinking of adding ability to open files with mouse from the kaktree plugin I’m making. Kakoune accepts mouse events, but I found no info on mapping mouse events.

Would be amazing for the 9p stuff @eraserhd is working on as well (let some extremely acme-style bindings happen).

Mouse… gross. (But if end up being able to map mouse events, I’ll add them to kak-plumb.)

set global debug keys then watch the debug buffer while doing some mousing.

This is what we have so far, I think it will work with hooks, mapping will probably not work because we dont have text -> mouse event parsing.

Mapping mouse clicks can be useful on Thinkpad laptops, where the 2 buttons are just under the thumbs and can provide good ergonomics.

Hm, based on this message, I see that this key also displays which line and column the click happened:

Client 'kaktreeclient' got key '<mouse:press_left:43.8>'

Which got me thinking that I may actually only need some king of hook, like raw key that expects only mouse clicks. And it seems to work actually.

Although it seem impossible to handle double clicks with hooks.

Edit: not quite