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

'?' zooms instead of opening the keyboard shortcuts screen on Swedish keyboard #4079

Closed
bhousel opened this issue Jun 2, 2017 · 21 comments
Closed
Labels
bug A bug - let's fix this! localization Adapting iD across languages, regions, and cultures

Comments

@bhousel
Copy link
Member

bhousel commented Jun 2, 2017

from #3791 (comment)

It zooms because on the Swedish (and maybe others) keyboard, ? is ⇧+

@bhousel bhousel added bug A bug - let's fix this! localization Adapting iD across languages, regions, and cultures labels Jun 2, 2017
@bhousel bhousel closed this as completed in dffc354 Jun 2, 2017
@bhousel
Copy link
Member Author

bhousel commented Jun 2, 2017

@magol, can you test this fix in http://preview.ideditor.com/master ?
Thanks!

@magol
Copy link

magol commented Jun 2, 2017

@bhousel Unfortunately it still does not work.
It behaves in exactly the same way as before.

@bhousel
Copy link
Member Author

bhousel commented Jun 2, 2017

@magol Sorry, I'll reopen and hopefully someone with a keyboard like that can debug!

@bhousel bhousel reopened this Jun 2, 2017
@manfredbrandl
Copy link
Contributor

Just tried the preview with a german keyboard, '?' does not open keyboard shortcuts. On a german keyboard '?' is shift-'ß' just right of '0'.

@bhousel
Copy link
Member Author

bhousel commented Jun 2, 2017

Hmm maybe #3572 will work now that Chrome is a few versions further. cc @tyrasd

@magol
Copy link

magol commented Jun 2, 2017

@bhousel
I have also found out that even following keyboard shortcuts are not working on a Swedish keyboard:

  • / – Toggle minimap
  • Ctrl+| – Toggle info/measurements box
  • [ – Jump to previous vertex
  • ] – Jump to next vertex
  • Ctrl+[ – Jump to first vertex
  • Ctrl+] – Jump to last vertex
  • \ – Cycle through parent ways
  • ? – Show keyboard shortcuts

The problem is that you give this keys on a differently way on a Swedish keyboard then on a US keyboard

Char On a US keyboard On a Swedish keyboard
/ / Shift+7
\ \ Alt Gr+?
? Shift+/ Shift++
| Shift+\ Alt Gr+<
] ] Alt Gr+9
[ [ Alt Gr+8

Perhaps we should make it possible to localize the keyboard shortcuts?

Several of the keyboard shortcuts become unnecessary complicated when it require multiple keystrokes on a Swedish keyboard (and probably other keyboards as well).
In addition, the shortcuts based on letters are related to what it is called in English. In other languages, other letters may be more logical.

@bhousel
Copy link
Member Author

bhousel commented Jun 3, 2017

ok few things:

  • We know about / minimap being an issue
  • info box shortcut is Ctrl+i (not "pipe")
  • We knew about the vertex navigation shortcuts being an issue,
    which is why we added the PgUpPgDnHomeEndPause alternatives
  • I'm not surprised about ? shortcut screen being an issue for the same reasons as /.
    We only merged this code a few days ago.

(also - which browser/os are you testing with?)

@bhousel
Copy link
Member Author

bhousel commented Jun 3, 2017

@manfredbrandl said:

Just tried the preview with a german keyboard, '?' does not open keyboard shortcuts. On a german keyboard '?' is shift-'ß' just right of '0'.

We could probably fix this for German by keybinding shift+ß as we don't use ß for anything.

Swedish I'm less certain specifically because it shares the ? key with +.

@bhousel
Copy link
Member Author

bhousel commented Jun 6, 2017

@magol, @manfredbrandl : Can you test these issues again with the latest http://preview.ideditor.com/master ? When you test, let me know what browser and os you are using too, because that might matter.

I just merged #3572 (thanks @tyrasd!) which gives us a more reliable way to know which key was pressed in modern browsers.

@magol
Copy link

magol commented Jun 6, 2017

I tested on a Windows 7 with Chrome 58.0, and it WORKS!!!! :-D

All shortcuts are working now except for {, [, ], } and \. But for them it is a replacement so it does not matter.

@manfredbrandl
Copy link
Contributor

I tested '?' successfully with German Keyboards on Windows 64bit with Chrome 58, Firefox 53 and IE 11 and on Debian Linux 64bit with Firefox ESR 45 and Chromium 57. Midori shows a minimap in the upper left corner of the map, but that's not so important. Also in Servo iD did not work at all (no map), but that's also not so important.

@manfredbrandl
Copy link
Contributor

Some keys for browsing don't work on my German Keyboard, but the alternative keys work:
image

@magol
Copy link

magol commented Jun 6, 2017

The common for the shortcuts that still do not work is that everyone uses Alt Gr on a Swedish keyboard. So it seems like that Alt Gr is not handled properly.

@magol
Copy link

magol commented Jun 6, 2017

I'm missing shortcut for Delete. When I press that key a feature is removed, but it is not in the list of valid shortcuts.

@bhousel
Copy link
Member Author

bhousel commented Jun 6, 2017

@manfredbrandl:

I tested '?' successfully with German Keyboards on Windows 64bit with Chrome 58, Firefox 53 and IE 11 and on Debian Linux 64bit with Firefox ESR 45 and Chromium 57. Midori shows a minimap in the upper left corner of the map, but that's not so important. Also in Servo iD did not work at all (no map), but that's also not so important.

Great thanks! That is good news. We don't support it but I'll install Midori on my Windows machine just for fun. I'm not surprised that iD doesn't work at all in Servo - I don't think it has SVG support yet.

@magol:

The common for the shortcuts that still do not work is that everyone uses Alt Gr on a Swedish keyboard. So it seems like that Alt Gr is not handled properly.

Hmm that is interesting.. It's not one of the modifiers we check for, but I would expect the shortcuts to work anyway if we are using KeyboardEvent.key now. I think I can trick my keyboard into sending AltGr and see what happens.

I'm missing shortcut for Delete. When I press that key a feature is removed, but it is not in the list of valid shortcuts.

Yes, I didn't have space on the screen to include it without wrapping to another line, but I can try to make the modal a little bit wider.

@magol
Copy link

magol commented Jun 7, 2017

The Enter and Esc keys is on two lines because the Swedish translation of -or- has more letters than in English.

image

@magol
Copy link

magol commented Jun 7, 2017

I'm a little worried that users will miss that it is two separate views to choose from (Browse and Editing). I recommend that you make it graphically clearer that there are two tabs.

@magol
Copy link

magol commented Jun 7, 2017

By the way, why is there no way to get this window in any other way than with the ? key? The only place where I have found information about this is far down in an help text. I did not know anything this before, and the risk is high that most users do not know about it. I think there should be a visible button under the help to view this window.

@bhousel
Copy link
Member Author

bhousel commented Jun 7, 2017

The Enter and Esc keys is on two lines because the Swedish translation of -or- has more letters than in English.

I think the real reason that the columns are sized that way is because the text for Alt is too long. I could fix the widths though, so that if anything is going to wrap it will be the description side.

I'm a little worried that users will miss that it is two separate views to choose from (Browse and Editing). I recommend that you make it graphically clearer that there are two tabs.

I think it's ok.

By the way, why is there no way to get this window in any other way than with the ? key? The only place where I have found information about this is far down in an help text. I did not know anything this before, and the risk is high that most users do not know about it. I think there should be a visible button under the help to view this window.

Sure I'll add a button or link to the first page of the help screen. This feature was just added last week, and iD has existed for many years without it, so I'm not too worried about the risk of users not finding it.

@bhousel
Copy link
Member Author

bhousel commented Jun 9, 2017

Hey @magol I added an item on the help pane mentioning the keyboard shortcuts, and I increased the width of the popup a bit to accommodate larger texts.

Can you verify these items in http://preview.ideditor.com/master/
If you find anything else please open a new issue, thanks!

screenshot 2017-06-08 22 37 25

@magol
Copy link

magol commented Jun 9, 2017

Great

I can't find any translation of "Shot the keyboard shortcuts screen." in Transifex. But it may just be because it has not yet been synchronized there.

The only thing I react to is that the help panel is still displayed in the background when the view of keyboard shortcuts is displayed. When I then choose to change tabs in the view (between Browsing and Editing), the help will be hidden in the background.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this! localization Adapting iD across languages, regions, and cultures
Projects
None yet
Development

No branches or pull requests

3 participants