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

Should sites be able to control Responsive Input Language? #31

Closed
BenjamP opened this issue Dec 10, 2014 · 13 comments
Closed

Should sites be able to control Responsive Input Language? #31

BenjamP opened this issue Dec 10, 2014 · 13 comments
Milestone

Comments

@BenjamP
Copy link

BenjamP commented Dec 10, 2014

If Responsive Input adapts to locale, should it be the browser's locale only or should sites be able to change it? Say you're using a German PC with an English site: should you get German or English keyboard->Responsive Input default mappings?
-From MS Office Team

@rniwa
Copy link
Contributor

rniwa commented Dec 10, 2014

Shouldn't this be automatically determined by the UA based on lang attribute?

@BenjamP
Copy link
Author

BenjamP commented Dec 10, 2014

It can be. We just need to decide that it should work that way. Probably with a SHOULD?

@rniwa
Copy link
Contributor

rniwa commented Dec 10, 2014

I don't even know if this is worth mentioning in the spec. Keyboard binding may, for example, depend on the screen orientation and other environmental factors. So the only thing UA should do in this regard is to follow the platform convention in my opinion. Perhaps we can just state that?

@NorbertLindenberg
Copy link

This may depend on the functionality. For keyboard bindings, I'd agree that they should probably follow platform conventions. What functionality is the MS Office team thinking of?

@BenjamP
Copy link
Author

BenjamP commented Dec 31, 2014

If you're using an English Office account on a German pc on vacation, should you get English or German keyboard shortcuts? Seems like the app should be able to affect this.

@rniwa
Copy link
Contributor

rniwa commented Jan 1, 2015

Sounds like the apps can already do that by changing lang attribute on html/body?

@BenjamP
Copy link
Author

BenjamP commented Jan 22, 2015

I think the question is, do we want to suggest what language is used for a given situation so that authors know what they're getting? If an English OS with a French keyboard active and a site with German lang attribute gets French keyboard shortcut defaults on Windows and German defaults on OSX, developers will have to do the mapping themselves to get consistency. Do we want to avoid that situation?

@rniwa
Copy link
Contributor

rniwa commented Jan 23, 2015

Are you saying we want to expose the "computed" language the browser is using? Or rather what kind of keyboard the user is using? It appears to me that's exactly the sort of the things device independent events should encapsulate. Authors shouldn't have to manually map key codes depending on the language of the keyboard if we've designed our API right.

@BenjamP BenjamP added this to the V1.1 milestone Jan 28, 2015
@NorbertLindenberg
Copy link

Are keyboard shortcuts actually localized? I haven't dealt with this issue in quite some time, but a long time ago at Apple we came to the conclusion that it's a bad idea. See the "what to avoid" section on page 26 of http://norbertlindenberg.com/work/ov20.pdf .

@spocke
Copy link
Contributor

spocke commented Feb 20, 2015

I think localized shortcuts is a bad thing since for example in Sweden Ctrl+F produces bold text in MS Office but in the browser Ctrl+F means Find so it would be an collision. Also it's very confusing to have different shortcuts for different applications a.f.a.i.k Office is the only program that does localized keyboard shortcuts.

@BenjamP
Copy link
Author

BenjamP commented Feb 20, 2015

Hi Spocke- not sure I understand. Do you expect Ctrl+F to be bold in all applications in Sweden? Or are you saying that Ctrl+B should be bold?

@spocke
Copy link
Contributor

spocke commented Feb 22, 2015

Ctrl+B is bold in Sweden for all applications I ever used except MS office they use Ctrl+F instead in the Swedish version so it's some what confusing. So I think it's better to not add that behavior to any spec but let the web applications decide if they want that behavior by adding custom logic for handling shortcuts since it's clearly not a common thing to do so in desktop apps nor should it be that common on the web. Haven't had any requests for us to localize any of the keyboard shortcuts we use in TinyMCE either.

@johanneswilm
Copy link
Contributor

This is another example of how adding formatting input events just overcomplicates things. Given that we have moved this to user land any more, I don't think this applies any more. Please reopen if I am mistaken.

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

5 participants