[Feature request] Mouse support
napcok opened this issue · 18 comments
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.
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.
Scrolling the station list, selecting and playing a station with mouse would be a great feature.
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!
Just added:
- Shift - wheel: volume up/down
- Ctrl - Middle Click: Save volume
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 :)
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...
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
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!
No problem, I removed "mouse" branch pkg from repo.
It works good anyway :)
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...
Ok, I will keep testing it on my machine. Thanks.
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)
Tested with latest commit, works and looks good :)
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...
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.
Hello,
Sakura - very lightweight terminal also works fine.
Are you planning another release soon? Is there still much to be done?
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
Version 0.8.8.3 released!