Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mouse click mappings as default press keymaps #317

Open
GCrispino opened this issue Jan 3, 2025 · 0 comments
Open

Add mouse click mappings as default press keymaps #317

GCrispino opened this issue Jan 3, 2025 · 0 comments

Comments

@GCrispino
Copy link

It sounds reasonable to me to add a mouse click mapping to the default keymaps for press and press_queue, other than the current defaults of <CR> an <M-CR>, respectively.

For example, adding <2-LeftMouse> (double click) and <M-2-LeftMouse> (double click holding meta key) for press and press_queue, respectively.

This would require changing the following code:

alpha-nvim/lua/alpha.lua

Lines 740 to 743 in de72250

keymap = vim.tbl_extend("keep", if_nil(vim.tbl_get(config, "opts", "keymap"), {}), {
press = "<CR>",
queue_press = "<M-CR>",
})

to something like this:

 keymap = vim.tbl_extend("keep", if_nil(vim.tbl_get(config, "opts", "keymap"), {}), { 
     press = {"<CR>", "<2-LeftMouse>"}, 
     queue_press = {"<M-CR>", "<M-2-LeftMouse>"}, 
 }) 

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant