blinksh / blink

Blink Mobile Shell for iOS (Mosh based)
https://blink.sh
GNU General Public License v3.0
6.18k stars 576 forks source link

Mouse controls for Drag #395

Open nils-tekampe opened 7 years ago

nils-tekampe commented 7 years ago

Hi, I love your app! brings me a real terminal to my iPad :-) I often use MOSH to cope with limited bandwidth and frequent interrupts in our mobile networks and have tmux running on my server. tmux splits the screen in multiple panels and one can enable mouse control to use the mouse to select the currently active panel. However, this does not work via blink. Is there anything special in mouse controls? Or can I do anything to makes this work? Thanks Nils

carloscabanero commented 6 years ago

Mouse controls for Blink, whether on tmux or other apps is a must. Changing the title.

piyush-nimbalkar commented 6 years ago

Yes, it would be a great to have feature. Especially with tmux scrolling with mouse mode on.

schappim commented 6 years ago

Mouse controls would be fantastic for the Micro Text Editor https://github.com/zyedidia/micro

nils-tekampe commented 6 years ago

I just wanted to ask whether there are any plans on this feature. Any idea whether/when it will be implemented?

yury commented 6 years ago

Basic touch reports are in testing now (TestFlight). And we hope will be released in a week or so.

We are currently limited to clicks. So tmux panel selection is working. But selecting text and scrolling are tricky to implement, because they conflicting with general scroll and text selection. We can’t figure out the best way to do it yet.

If you have any suggestions, please share.

nils-tekampe commented 6 years ago

Great to hear that! For scrolling I would think that a two finger swipe could help to figure out whether the user wants to scroll within the terminal or the application. But I have no idea, how I would implement the text selection part. For me it would be OK if I would be required to double-click with two fingers or so before I can actually select text within a terminal. But I'm not sure whether this is really intuitive.

yury commented 6 years ago

Two thinger swipe is for kb dismiss and control panel. Also two fingers tap open new session. Also two fingers drag sometimes conficts with zoom. So we should find better solution.

nils-tekampe commented 6 years ago

I see. Seems to be really tricky, what about a “catch mode” similar to how Parallels or VirtualBox work. As long as I’m caught in the terminal, all mouse gestures go to the terminal. If I want to control the app, I have to release the mode first (e.g. by the use of a certain gesture or button). Definitely less intuitive but could work.

bradleyjones commented 6 years ago

“Catch mode” could be interesting, that would allow you to use familiar gestures for scrolling (one/two fingers) without interferring with the rest of the app. Failing that even just a 3 finger scroll would be ok with me and just scroll whatever pane has focus. Personally tmux scrolling is more important than selection, I’m quite happy just making a panel fullscreen and selecting text using the normal methods.

yury commented 6 years ago

What about this way?

https://youtu.be/UZLjhSPsIVY

Need to find a way to do that with hardware kb..

nils-tekampe commented 6 years ago

Not bad :-) Can I also click in to the separate windows to set the focus for the cursor to them?

yury commented 6 years ago

@nils-tekampe you can do that in current version already. Just tap on the pane you need to focus on.

nils-tekampe commented 6 years ago

Great to hear. I stopped using blinksh after I learned that his was not working in the version that I tried at this time. Will give it a try later!

NyaMisty commented 6 years ago

It seems that this issue and #119 #566 #584 are all about the mouse scroll support. Which one should we use to track the progress?

willpuckett commented 4 years ago

Hi I have mouse clicks working with this in VIM (set mouse=a). I am wondering if a meta key for scrolling was ever decided on? Can't seem to locate anything.....

Editing now:

I just added:

set mouse=a " tell vim to recognize mouse commands in "all" modes set ttymouse=xterm2 " tell vim you're using xterm, this isn't necessary but I believe improves performance set ttyfast " improve fluidity of mouse commands, this isn't necessary but I believe improves performance set paste " don't mess up the indenting of pasted text vmap "+y " map ctrl-c to copy a block of text selected by the mouse

To my .vimrc and can two finger scroll in files and file browser. Thanks a million blink.sh team!!

arkku commented 3 years ago

One mouse control that is still missing is drag, e.g., to select text in split tmux panes rather than in the whole terminal. I understand that this conflicts with text selection, but I wonder if it would be doable with some modifier key to override the selection and instead just pass the dragging to the terminal? This behaviour could even be made invertable, i.e., pass by default and only select if a modifier is held…

aabdellah commented 3 years ago

I think an option to disable text selection or make it only work with a modifier would be very welcome as it conflicts with the following tmux functionalities:

nohr commented 4 months ago

i'm surprised to see this dead after three years. mouse drag is so crucial for me in vim and tmux. is there any chance there might be an update on that? currently iSH has it implemented pretty well but i'd much rather use blink for its simplicity...

carloscabanero commented 4 months ago

Honestly, we haven't gotten much requests for mouse drag controls. Most people just use the keyboard for that, plus it creates a mode (need to disable selection so all input will go to the remote).

That being said, we are moving to a different terminal emulator and this should be tackled then.

I will separate in a different issue so this is more specific.

metawops commented 1 week ago

Just adding myself here because I’d really like Blink to have full mouse controls. As soon as I’ll be able to drag pane split line in my tmux session with the trackpad of my Apple hardware keyboard I’m happy! Any news on this, @carloscabanero? 😳 Finished the “move to a different terminal emulator” already? And which issue should I track to stay informed on this topic? 🙏

carloscabanero commented 5 days ago

No, moving to a different terminal emulator has not been started yet and it is not an easy task. Other critical components like Keyboard, UI, gestures, etc... depend on it.

Adding to this, the only mouse controls not working are the drag operations. These also collide with selection, and if I recall we would need to have a special mode to implement them.

This is a good issue to track. Once it becomes a priority, when there are multiple issues that can be closed at the same time by a "parent" issue, I try to keep all of them updated.