-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix: conflicting key bindings in default conf files (issue #4786) #4807
base: develop
Are you sure you want to change the base?
Conversation
iina/config/vlc-default-input.conf
Outdated
@@ -26,8 +26,8 @@ Shift+Meta+RIGHT seek 60 | |||
Shift+Alt+Meta+LEFT seek -300 | |||
Shift+Alt+Meta+RIGHT seek 300 | |||
e frame-step | |||
Meta+L ab-loop | |||
Meta+l cycle-values loop "inf" "no" | |||
Meta+l ab-loop |
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.
I'm thinking this is the wrong fix. IINA should match the VLC key bindings. When we choose to extend the VLC key bindings to provide access to IINA features like the log viewer, that key binding must avoid conflicting with the bindings defined by VLC. It is more important to match VLC than use the same key binding for IINA features in the different defaults.
iina/config/iina-default-input.conf
Outdated
@@ -23,7 +23,7 @@ Shift+RIGHT sub-seek 1 | |||
Meta+s screenshot | |||
|
|||
Meta+l ab-loop | |||
Meta+L cycle-values loop "inf" "no" | |||
Alt+Meta+l cycle-values loop "inf" "no" |
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.
As the log viewer is the new feature I would think it would be better to pick a key binding that doesn't conflict with an existing binding.
Why does the log view binding not appear in the key bindings file like we do for the keys that bring up other panels?
Let's see what the other reviewers think about my concerns. |
I agree with this, but I don't know what went into the decisions for some of these. I did some further research and found
The Log Viewer is hard-coded to that key - it's a menu item key equivalent. There are 5 sources of key bindings that I've seen, but only one (input config file) is shown in the Key Bindings table. Let me try this again... |
…ngs: fix incorrect line, and change panel bindings from Alt+Meta+* to Shift+Meta+* to fix conflicts
9c4b514
to
9adca5e
Compare
See my latest comment in the issue. Here's a copy:
It was a pain to go through and update Movist, but I stand by it. It doesn't really make sense to combine some of its Version 1 bindings with its modern ones, because there are conflicts between them. |
This has turned out to be a much bigger problem than I expected. Glad you are taking a close look at it. I was thinking this really needed to be addressed in 1.3.5 because the log viewer is new, so the conflicts introduced by the new key binding is a recent regression, which is what 1.3.5 is supposed to be addressing. However the changes to the Movist and VLC bindings are a big change that seems like something that should go into 1.4.0b1. On the Movist change, would it make sense to leave the current bindings and create a new I'm not clear on what criteria IINA uses for deciding to hardcode a key binding vs. adding a Need to hear from @uiryuu on this. |
You could certainly label the version that I submitted as "Movist V2". But what's in
I don't know if it that was actually an intentional decision. Hard-coding is the easiest solution because it's just entering a key binding into a text field in the XIB. It presently takes a lot more effort to make menu items configurable because each will need a text-based identifier and some extra code to match each menu item to a user key binding. Some apps (e.g. Movist) let the user configure every single menu item, including standardized commands like Why not just make |
On |
Let's move this to 1.4.0 beta 1, because it will be a breaking change.
We currently don't have iina command for all external windows (other examples include the inspector). I think these key bindings should be configurable, so we need to update the Swift code before merging this. We can even set a default key binding for a command when it's not occupied and not specified by the conf. I will implement this soon if there's no other concerns. For Movist keybinding, maybe we can have two separate configurations? Just keep the current one and add a |
Sounds good.
👌 - I will change status to draft for the time being. Will update for the above change when I can, and won't worry about the Log Viewer binding conflict as that can be addressed in a separate PR. Sounds like there is still some uncertainty about what will be done with
Mostly agree, but want to clarify some details about how default bindings would work. For system bindings ( I'll just put this idea out there. Maybe there could be a separate table added to |
Description:
Attempts to fix conflicts reported in the issue above. These are inherently subjective changes, so I took my best shot. I did look at VLC and Movist to observe their bindings, but there were no major insights there. For each conflict I generally tried to decide which command was more commonly used, and give that the easier key.
Notes / justifications for my changes:
movist-default
has bothbigger-window
andmultiply window-scale 1.1
(also the comparable small versions) which are somewhat similar, but not completely. Thebigger-window
menu item increases window width by 10 pixels at a time. No idea which would be more commonly used in this case, but I gave themultiply [...]
commands the favored keys because they more closely resemble Movist commands.movist-default
: I noticed that those bigger / smaller commands were not mapped to complementary keys. for example:Meta+-
→smaller-window
,Meta++
→bigger-window
. But while+
looks appropriate for "bigger" when read from text, it requires holding downShift
to type it. So from a typing perspective, the complement ofMeta+-
should beMeta+=
. Likewise, the complement ofMeta++
should beMeta+_
. At least on a US keyboard.-#@iina Meta++ bigger-window
+#@iina Meta+= bigger-window
iina-default
andvlc-default
had swapped keys forab-loop
andcycle-values loop "inf" "no"
, respectively. This seemed wrong to me, so I changed both invlc-default
, usingMeta+l
(lowercase L) forab-loop
instead of uppercase, which matchesiina-default
.Meta+Shift+L
for Window > Log Viewer, and instead changed the mapping forcycle-values loop "inf" "no"
toAlt+Meta+l
. Maybe I should have done it the other way around, since Log Viewer will only be used by developers?