Replies: 1 comment 1 reply
-
On Wed, Mar 10, 2021 at 02:08:02AM -0800, Florian Neumann wrote:
I'd like to get an idea how to create a PR to make mouse buttons configurable regarding @kovidgoyal's comment at #1684 (comment).
I would be happy to end up with some kind of todo-list which steps to solve in order to make this happen.
I guess (and i do not feel very informed about Kitty's architecture) there are three steps involved:
1. Expose any mouse-button (1-n) and every mouse-action (like paste) as config parameter (which seems to be handled by the `config.py`).
You dont want just mouse actions, you want any action to be mappable to
any button press + modifiers.
Basically you do the same thing in mouse.c as happens in keys.c via
dispatch_possible_special_key in boss.py.
You start by creating support for mapping in kitty.conf
using something like
mousemap shift+button1 some_action
Once you have that in place, you create the equivalent of
dispatch_possible_special_key for mouse actions. This will be somewhat
more difficult than for keys, because terminal applications can "grab"
the mouse then mouse events go to them, except when pressing the shift
modifier. Which would itself become configurable.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to get an idea how to create a PR to make mouse buttons configurable regarding @kovidgoyal's comment at #1684 (comment).
I would be happy to end up with some kind of todo-list which steps to solve in order to make this happen.
I guess (and i do not feel very informed about Kitty's architecture) there are three steps involved:
config.py
).mouse.c
more universal?boss.py
)?❓ I guess it would be a good idea to finally end up with a default configuration like
map mouse_2 copy_to_clipboard
or in my casemap mouse_2 no_op
.Any hint in which direction to think would be very appreciated.
I will foster the following ToDo list as the discussions grows:
ToDos
Beta Was this translation helpful? Give feedback.
All reactions