This is a custom processor for the hints kitten in the kitty terminal emulator which allows you to send mouse click events to the program running in the terminal emulator.
Place the hints_mouse_click.py file in the same directory as kitty.conf.
If you want to match against emojis, you have to install the emoji package.
Map a key to launch the hints kitten with this processor. E.g. for using
kitty_mod+y to right click on emojis add this to kitty.conf:
map kitty_mod+y kitten hints --type emoji --customize-processing hints_mouse_click.py right
This is used just like the standard hints kitten, except for these differences:
- You can specify the mouse button you want to use as the last argument. This
can be
left,middle,right,scroll_up,scroll_down,scroll_left,scroll_right,backorforward. Defaults toleftif not specified. - The
--typeoption supportsemojiandemoji_char_and_namein addition to the standard types.emojiwill match emoji characters.emoji_char_and_namewill in addition match the regex:[a-z0-9_+-]+:which is typically how emojis are represented by name in ascii. These two types force--minimum-match-lengthto1to be able to match emojis.