-
Notifications
You must be signed in to change notification settings - Fork 129
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
next/prev keys for quick station change in playlist mode #135
Comments
hi @jirikrepl Let us just see what these keys are. Please use this python program to get the keycodes
Please press all the keys you are interested in (make a note which is which) As far as I can see the following keys are already defined:
You can see the definitions of KEY_ constants here: To see key names - keycodes, execute
and look for the KEY_* constants |
great! thanks for the tips. but this next/prev functionality is not yet implemented in console UI, or is it? If I want to select next radio I need to do it with |
Yeah, I see now I was not clear... Sorry, about that... So, please save this as
Open a console (terminal) and type
Press the keys you are interested in ( |
I got some time to work on it, so Open a terminal and type
This will download and install my Now, when you play a station you can press ^N (Ctrl-N) and ^P (Ctrl-P) to play the next / previous station. If your Just test it out and tell me if your |
Hi @s-n-g sorry for my late answer. I tested your code and ^N and ^P works great! On my keyboard when using media keys I can do prev/next, play/pause Spotify, even if Spotify does not have focus Currently I can do play/pause when using pyradio with mplayer and terminal does not focus. Here is my keyboard layout where there are those media keys Here are some screenshots with keycodes I tested your script but it will not print anything if I press media keys. It works only fine with single letter keys I used karabiner event view to print keycodes for those media keys (there are keydown and keyup events):
|
Oh, I see what you mean! I do not think this can be done with Now, there is a way to do it: a keyboard listener
You will have to install the following python module beforehand: Save the program as
Focus any other window and start typing. Please do tell me how that goes! Finally, I may be able to incorporete this functionality to I will leave this issue open, so that I do not forget about it :) |
Hi @coderholic @s-n-g ,
thanks for this great app. It would be nice if there were two keyboard shortcuts for
playing next/previous station in a playlist.
It would be great if mvp or another player could use these shortcuts.
I mean I have
next/prev
pause/play
physical keys on my keyboard which works in many apps which are playing in the background e.g. Spotify.I also noticed that the
pause/play
key on my keyboard already works (only) with mvp player.If you agree and can give me some info. I can create a PR.
The text was updated successfully, but these errors were encountered: