Skip to content
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

why shift cannot be bound with number in input.conf #9060

Closed
hooke007 opened this issue Jul 28, 2021 · 7 comments
Closed

why shift cannot be bound with number in input.conf #9060

hooke007 opened this issue Jul 28, 2021 · 7 comments

Comments

@hooke007
Copy link
Contributor

As the question mentioned in the title.
I tried shift+1 in the input.conf but it doesn't work as my expectation.
I know ! can work but I'm confused why I cannot use the another way to bind. (shift+123456 should be clearer than !@#$%^)

Log file

I do not think it is a bug.

@avih
Copy link
Member

avih commented Jul 28, 2021

Different keyboards (layouts, languages) have different mappings (output) for shift+number, and for simplicity mpv looks at the output rather than the raw KB state.

That's not likely to change anytime soon.

@avih avih closed this as completed Jul 28, 2021
@hooke007
Copy link
Contributor Author

Thanks for answering. Maybe add some tips in the manual or console warning (when people try to do that) would be better.

@avih
Copy link
Member

avih commented Jul 28, 2021

If you have a useful and short note to add at the manual, you can send a pull request with your suggested changes.

@avih
Copy link
Member

avih commented Jul 28, 2021

Or rather, a more correct way to describe it, is that with the usual ways to get KB output - shift changes the key output fundamentally and is not sent to the program as "SHIFT+KEY" but rather the result of holding shift while pressing the key (like ! for shift+1), and that's unlike ALT or CTRL which are sent as base-key + ALT and/or CTRL.

On some systems it's possible to get the raw KB values and understand that the press was, for instance, shift+1, however that's usually more complex, different between systems, and adds complexity of how should the default bindings be configured (because this doesn't work on all systems). So mpv is not likely to support it anytime soon.

@hooke007
Copy link
Contributor Author

A long and specific description is difficult for me to write by one PR (English is not my mother language).
Short and simple note would be possible for me but I think users maybe confused.

@avih
Copy link
Member

avih commented Jul 28, 2021

but I think users maybe confused

Yeah. I think people usually figure it out on their own, or they can ask, like you did.

@garoto
Copy link
Contributor

garoto commented Jul 28, 2021

There's an old and busy issue regarding keyboard layout/mappings woes here: #351

avih pushed a commit that referenced this issue Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants