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

[Feature request] Mouse support #119

Closed
napcok opened this issue Jan 14, 2021 · 18 comments
Closed

[Feature request] Mouse support #119

napcok opened this issue Jan 14, 2021 · 18 comments

Comments

@napcok
Copy link

napcok commented Jan 14, 2021

It is possible to add mouse support to Pyradio?
I mean something like in bpytop that can be operated comfortably with both a keyboard and a mouse.

@s-n-g
Copy link
Collaborator

s-n-g commented Jan 15, 2021

No, I don't think this could be easily achieved.
Most commands are meant to be inserted by the keyboard and there are no (almost no) elements that could be considered "clickable".
Scrolling the station list, selecting and playing a station could be possible, but other than that, some kind of a menu system would have to be implemented in order to do anything else.
All in all, it would be too much of an effort and given that there are other things that need to be implemented, I would consider it a very low priority.

@napcok
Copy link
Author

napcok commented Jan 15, 2021

Scrolling the station list, selecting and playing a station with mouse would be a great feature.

@s-n-g
Copy link
Collaborator

s-n-g commented Jan 15, 2021

I think I got it...

Can you plese test the branch named napcok?

Here's what is implemented:

  • Left click: change selection
  • Left double click: connect to server
  • Scrolling up / down with the wheel
  • Middle click: mute player

Thanks!

@s-n-g
Copy link
Collaborator

s-n-g commented Jan 15, 2021

Just added:

  • Shift - wheel: volume up/down
  • Ctrl - Middle Click: Save volume

@napcok
Copy link
Author

napcok commented Jan 16, 2021

It works ... I mean left click, left double click, scrolling and middle click.

No luck with latter options. (maybe something is wrong with my setup)

Anyway it is perfectly usable with mouse now!
Thank you very much for implementing this :)

@s-n-g
Copy link
Collaborator

s-n-g commented Jan 16, 2021

Hm...
I have been testing it with several terminals, and it does not always work...
My problem is the middle click. If enabled, it can be used to "paste from keyboard" (Shift-Middle Click) and this can be a real mess...

So, we cannot use button3 (right click) because terminal use it themselves, we should stay away from button 2 (middle click) since if used incorrectly, it can mess things up.

All we are left with is left click (which I cannot used with any of alt, ctrl, shift) and the wheel, which (when SHIFTed) I find it hard to work with xterm (on manjaro it works, on a debian virtual machine it does not - something about congif I suppose).

I don't know...

I think I will let it rest for now, and have a look at it later...

@napcok
Copy link
Author

napcok commented Jan 16, 2021

Compiled it again, and Mute player (middle click) not working.
Can you please add it back?

Package for Manjaro/Mabox is available at https://repo.maboxlinux.org/stable/x86_64/ as pyradio-git.

I think those four options are enough for comfortable pyradio basic usage with mouse:

  • Left click: change selection
  • Left double click: connect to server
  • Scrolling up / down with the wheel
  • Middle click: mute player

@s-n-g
Copy link
Collaborator

s-n-g commented Jan 16, 2021

Noooooo!
Please do not distribute this package!
It is in early beta stage. I had already started working on the config window and I stopped that to work on the mouse thing.
Neither the config window is ready yet nor the mouse thing!
Please do downgrade to 0.8.8.2 and wait for an official release

I am really really sorry for the missunderstanding regarding the state of the package!

@napcok
Copy link
Author

napcok commented Jan 16, 2021

No problem, I removed "mouse" branch pkg from repo.
It works good anyway :)

@s-n-g
Copy link
Collaborator

s-n-g commented Jan 16, 2021

I have been reading regarding mouse support under console and it seems that there is no official standard, everybody implements things as he wants.

So, whatever works, works, depending on the therminal used.

I have re-enabled the middle click and removed the "save volume gesture".
Now I'm in the process to add a config option to enable or disable the mouse.
And I still have to finish the config window.
So...

@napcok
Copy link
Author

napcok commented Jan 16, 2021

Ok, I will keep testing it on my machine. Thanks.

@s-n-g
Copy link
Collaborator

s-n-g commented Jan 16, 2021

Ok, in that case I am updating branch napcok so you have the latest...
Thank you for helping out!

EDIT
As you will see there is a new "player selection" window (half implemented)
and the new mouse config option (I have to add a message to inform the user that the change will take effect next time the program runs)

@napcok
Copy link
Author

napcok commented Jan 21, 2021

Tested with latest commit, works and looks good :)

@s-n-g
Copy link
Collaborator

s-n-g commented Jan 21, 2021

Thanks for th feedback!
I am still working on the config window...

Does "mouse volume adjustment" work in mabox. In my installed system (on virtlib) I see pyradio opening with terminator, and volume adj. (SHIFT-Wheel up/down) does not work. Can you use any other terminal to open pyradio with? I know that alacritty, kitty, sakura roxtrem and termite will work ok...

@napcok
Copy link
Author

napcok commented Jan 22, 2021

Sure, I will find other terminal for that.
Unfortunately in Terminator SHIFT-Wheelup/down is hardcoded and binded to scroll terminal by page action :(
Tested also gnome-terminal, lxterminal and xfce4-terminal - all of them works ok with SHIFT-Wheel up/down.

@napcok
Copy link
Author

napcok commented Feb 10, 2021

Hello,
Sakura - very lightweight terminal also works fine.
Are you planning another release soon? Is there still much to be done?

@s-n-g
Copy link
Collaborator

s-n-g commented Feb 10, 2021

Hi again!
There's not much more to be done but I am currently busy at work (h/w failure) and I am 100% there for now.
So, I cannot plan anything for the moment. Sorry...

BTW, sakura is a great terminal, I agree

@s-n-g
Copy link
Collaborator

s-n-g commented Feb 26, 2021

Version 0.8.8.3 released!

@s-n-g s-n-g closed this as completed Feb 26, 2021
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

2 participants