-
Notifications
You must be signed in to change notification settings - Fork 3k
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
input.conf: bind Ctrl+v to play the path in the clipboard #15576
Conversation
personally I use the following script: mp.add_key_binding("ctrl+v", "paste", function()
local s = from_clipboard()
s = s:match("^%s*(.-)%s*$")
if s == "" then return end
if mp.get_property_native("idle-active") then
mp.commandv("loadfile", s)
else
mp.commandv("loadfile", s, "append")
mp.osd_message("Appended " .. s)
end
end) I think this behavior would be useful |
Download the artifacts for this pull request: |
Isn't that just |
I guess. Except the visual feedback. |
Changed to Edit: actually even in this case we should show a message because the path can be a URL that loads slowly. |
Nevermind, with |
98d8a23
to
fdc045d
Compare
copy-paste-url.lua works by just pasting a URL and intermediately playing it if there is nothing playing. If something is playing it appends it to the playlist. uosc doesn't do that instead it has various functions...I wanted to keep the same behavior as copy-paste-url.lua so I have a shortcut after updating uosc each time to change behavior to just add pasted URL immediately.
|
You can just bind |
etc/input.conf
Outdated
@@ -171,6 +171,7 @@ | |||
#l ab-loop # set/clear A-B loop points | |||
#L cycle-values loop-file "inf" "no" # toggle infinite looping | |||
#ctrl+c quit 4 | |||
#Ctrl+v loadfile ${clipboard/text} append-play; show-text 'Appended ${clipboard/text}' # append the copied path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appended
seems quite ambiguous. Appended where? To what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe even shorter +> ${clipboard/text}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to + ${clipboard/text}
, if the > was not a typo I don't understand what it represents.
DOCS/man/mpv.rst
Outdated
@@ -242,6 +242,11 @@ F8 | |||
F9 | |||
Show the list of audio and subtitle streams. | |||
|
|||
Ctrl+v | |||
Append the file or URL in the clipboard to the playlist. If nothing is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two spaces
@@ -171,6 +171,7 @@ | |||
#l ab-loop # set/clear A-B loop points | |||
#L cycle-values loop-file "inf" "no" # toggle infinite looping | |||
#ctrl+c quit 4 | |||
#Ctrl+v loadfile ${clipboard/text} append-play; show-text '+ ${clipboard/text}' # append the copied path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works, not sure the shortcut is the best, but works.
No description provided.