Comments (6)
mpv.net
uses default mpv
quit command to close the player, so this falls more under a script responsibility:
either:
mp.add_key_binding("ESC", "confirmquit", function()
if confirm_timer then
mp.command("quit")
else
mp.osd_message("Press ESC again to quit", 1)
confirm_timer = mp.add_timeout(1, function()
if confirm_timer then
confirm_timer:kill()
confirm_timer = nil
end
end)
end
end)
or:
https://ss64.com/ps/messagebox.html
mp.add_key_binding("ESC", "confirmquit", function()
local confirm = mp.command_native({name = "subprocess", playback_only = false, args = {"powershell", "-NoProfile", "-Command", [[
Add-Type -AssemblyName System.Windows.Forms;
$result = [System.Windows.Forms.MessageBox]::Show('Press OK to quit', 'Confirmation', 'OKCancel', 'Question');
if ($result -eq 'OK') { exit 0 } else { exit 1 }
]]}})
if confirm and confirm.status == 0 then
mp.command("quit")
end
end)
Or even simply adding ESC ignore
to input.conf
, since i can't think of any player that allows closing it by pressing ESC
, seems far too problematic for how easy it is to do it by accident.
from mpv.net.
Additionally, most players use Esc to exit full-screen playback rather than terminating the player process.
from mpv.net.
Also, how do I disable Q exiting the player? This one is just as confusing as Esc.
from mpv.net.
If the confirmation dialog box cannot pop up, it is better to disable the Esc to exit the player by default, which will be more user-friendly.
It can, with one of the scripts. And from what I remember, it was mentioned somewhere that mpv.net
philosophy is that if it can be done with a script, then itβs the scripts role, especially when the provided functionality isnβt something implemented exclusively by mpv.net
.
Additionally, most players use Esc to exit full-screen playback rather than terminating the player process.
Also, how do I disable Q exiting the player? This one is just as confusing as Esc.
mpv.net
provides very basic set of keybinds out of the box, it's on the user to adjust them to their liking, and there's already a set of links in the manual that have examples of both, including mentions of build-in input editor
:
https://github.com/mpvnet-player/mpv.net/blob/main/docs/manual.md#input-and-context-menu
https://mpv.io/manual/master/#input-conf
https://github.com/mpv-player/mpv/blob/74b4c3c531bd454484ed5d04c9aad0bc531ccd4b/etc/input.conf#L85
https://github.com/mpv-player/mpv/blob/74b4c3c531bd454484ed5d04c9aad0bc531ccd4b/etc/input.conf#L12
https://mpv.io/manual/master/#command-interface-ignore
from mpv.net.
If the confirmation dialog box cannot pop up, it is better to disable the Esc to exit the player by default, which will be more user-friendly.
from mpv.net.
Thank you very much for your help! π
from mpv.net.
Related Issues (20)
- How Change Language ?
- Add support for "input-media-keys" option HOT 1
- Whats the difference between MPV and mpv.net player? Is it a fork? HOT 1
- Hi! Friends, triggering the Numeric key area Enter key in the lower right corner of the notebook cannot enable full-screen playback. HOT 1
- How To Use Anime4K shaders in this? HOT 3
- Subtitle: TTML support
- Can I run mpv.net with .NET Desktop Runtime 8+ without installing .NET Desktop Runtime 6.0?
- The very basic necessity of showing your "Playlists" feature are missing?!
- Window sometimes opens "twice" on Windows HOT 2
- Request to Add a New Language HOT 3
- how to get mpv.net react on the same input keys as normal mpv? HOT 2
- Add speech synthesizer to subtitles for visually impaired viewers
- Can No Longer Play DVD Isos HOT 2
- Controls stop working after switching vo via settings
- Window height keep increasing with border On and titlebar Off HOT 1
- Video stutters when on fullscreen on one screen and other maximized window on second screen HOT 3
- uosc and mpv-progressbar work bad? HOT 1
- Stay on top button in internal title bar HOT 4
- Profile selection doesn't work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv.net.