Blink shell touch actions to custom mouse actions

33 views
Skip to first unread message

Julius Hamilton

unread,
Feb 23, 2022, 8:36:50 AM2/23/22
to vim...@googlegroups.com
Hey,

I’m using iOS SSH apps (Blink shell; Termius) which support various touch gestures; I believe they get mapped to certain mouse actions in the terminal.

I’d like to customise the effect of these touch gestures in Vim.

I am pretty sure I can’t change what mouse action a touch gesture corresponds to but I hopefully can change what Vim does on a certain mouse event.

So for example, I would like accelerated scrolling, maybe when you hold and drag down, the speed of scrolling slowly speeds up. Or, if you press two fingers and swipe down, that’s faster than just one finger.

Can anyone recommend how I might remap mouse actions to accelerated scrolling in Vim?

Thank you,
Julius




Christian Brabandt

unread,
Feb 23, 2022, 1:34:04 PM2/23/22
to vim...@googlegroups.com
I guess it depends on how your terminal receives those gestures. I am
not sure, if a terminal can receive special mouse gestures like touch
scroll but it really depends.

Try in your terminal to go to insert mode, type Ctrl-V and then use one
single gesture and see what vim receives.

Best,
Christian
--
Zwei Schafe auf der Wiese. Sagt das eine: "Määähhh!", darauf
das andere: "Mäh selbst!"

Julius Hamilton

unread,
Feb 24, 2022, 12:40:40 PM2/24/22
to vim...@googlegroups.com
Awesome, thanks very much.

What is the formal name of those character combinations?

Then I will see about mapping them to mouse events I suppose?

Or do the mouse events get mapped to Vim navigation commands or something?

Thanks very much,
Julius



--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20220223183354.GF346149%40256bit.org.

Gary Johnson

unread,
Feb 24, 2022, 1:20:42 PM2/24/22
to vim...@googlegroups.com
On 2022-02-24, Julius Hamilton wrote:

> On Wed 23. Feb 2022 at 19:34, Christian Brabandt wrote:

> I guess it depends on how your terminal receives those gestures. I am
> not sure, if a terminal can receive special mouse gestures like touch
> scroll but it really depends.
>
> Try in your terminal to go to insert mode, type Ctrl-V and then use one
> single gesture and see what vim receives.

> Awesome, thanks very much.
>
> What is the formal name of those character combinations?

One way to find the names is to type Ctrl-K instead of Ctrl-V before
generating the characters. For example, Ctrl-K followed by the left
arrow key will insert the six characters "<Left>".

See
:help i_CTRL-V
:help i_CTRL-K

> Then I will see about mapping them to mouse events I suppose?
>
> Or do the mouse events get mapped to Vim navigation commands or something?

See
:help mouse-overview
:help 09.2

Regards,
Gary

Reply all
Reply to author
Forward
0 new messages