-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
CZ quotation marks in Gutenberg don’t work #13118
Comments
Hi @sibiranka welcome to project Gutenberg's Github. The commands for „ and ” with a CZ keyboard layout are Shift + Option + N and Shift + Option + J and it appears that using Gutenberg Shift + Option + J works and inserts ” but Shift + Option + N is bound to a specific action inside the editor: Navigate to a the next part of the editor (alternative). | Shift+Alt+N | ⇧⌥N I believe other locales may be affected by binding the shift + option + LETTER keys because it is OSX's way to allow for extra special chars. |
Hi @afercia—If I remember correctly, you know a bit about these shortcuts? I think the only way forward might be to change these shortcuts to something else. 😢 |
In the Gutenberg accessibility report, it was noted that keyboard shortcuts create their own problems and are very likely to produce conflicts with existing shortcuts. Different browsers on different operating systems, assistive technologies, different locales: they all implement different shortcuts and it's basically impossible to avoid conflicts. That's one of the main reasons why Gutenberg shouldn't rely on keyboard shortcuts: they can help but they shouldn't be the only solution to usability and accessibility problems. That said, the only way to mitigate this problem is a mechanism to allow users to remap the existing keyboard shortcuts. This was pointed out in #3218 one year and a half ago 🙂 |
A couple of thoughts:
// Translators: Use this to specify an alternative shortcut that doesn't interfere with
// character input in your locale's typical keyboard layouts. Do not translate.
// Set to 'off' to disable the shortcut.
shortcut = _x( 'Option-Shift-n', 'Keyboard shortcut: Navigate to the next part of the editor' );
|
Could we start the mechanism to remap the existing keyboard shortcuts by simply allowing users to disable certain shortcuts? I am thinking a basic local storage key / value that won't map the shortcut to the listener if present. Then, in the UI, we could go for something like: I am thinking that a full blown keyboard shortcut manager is a complex feature, finding actions, registering keys as shortcuts and so on and so forth. Disabling some defaults is easy and can be linked to a manual page. In theory, we could also detect if a user is struggling with shortcuts and suggest them to review the list :) Also 👍for @mcsf 's idea with * locales handling these situations on a one by one basis. |
Disabling shortcuts sounds like a good idea that can probably happen the fastest. I'm all for it 👍 However, it still feels like a band aid - we know certain shortcuts will be always broken in certain locales. And not even locales because this really depends on the keyboard layout, not a locale. I'm using English interface with Czech keyboard layout. As far as I know this is undetectable in the browser environment 😕 |
Any reason not to use something like alt+tab? |
alt+tab is a system shortcut on Windows for switching between apps (like cmd+tab on mac). It's a tough problem as most of those shortcuts that "make sense" are already used by the operating system or a browser for a different purpose. In general, you are right about trying to figure out a shortcut that doesn't involve keys with potentially printable chars. |
Is there any combination free on Windows? We could use |
I haven't used Windows in last 10 years but I believe tab shortcuts might be taken.
In both cases, the combination with shift works too, just browses things in reverse order so we cannot use that either. Maybe ctrl+alt+tab and ctrl+alt+shift+tab could be used? I don't have means to test it myself. Edit: definitely taken on Ubuntu, Windows not confirmed. https://defkey.com/what-means/ctrl-alt-tab |
Isn't there also the AltGr and Windows modifier keys. Or is the presence on the keyboard inconsistent? |
Another dumb idea: press one of the modifier keys (maybe ctrl/cmd) for x amount of seconds, or maybe better, twice uninterrupted, and switch between "tab modes". Normally it tabs between elements, otherwise between areas. Do the same thing to switch back. Of course, this should have audible and visual feedback etc. |
AltGr presence is not consistent but mainly, it's roughly equal to pressing ctrl+alt instead of being a unique detectable modifier key https://en.wikipedia.org/wiki/AltGr_key#Control_.2B_Alt_as_a_substitute |
This is reminiscent of #5709, which also hinged on separate modes for tabbing/navigating. |
@mcsf Any learned lessons there? What do you think about the tabbing modes? |
Hi @ellatrix! I think the main problem with 'modes' is that they're based on short term memory, keeping in mind what mode you're in. That means we'd need a visual or/and other kind of helper that alerts the user on what mode they're currently in. Would it reset when leaving the page? I have 'mouse keys' set to turn on after X times pressing 'some' key and I never know how to revert back b/c I never remember which key it is. I use the mouse to disable mouse keys :))) If I blog once a week switching KBD shortcut modes in GTB might be just as hard, all that just insert a quote sign! :) |
@draganescu Yeah, I know the problem. :) The fact that the areas are clearly marked when you navigate through them could tell me that I'm in this mode. To go back to the "normal" mode, you could press escape or again double press ctrl/cmd. We could also show a message during that mode if escape or the combination is not enough. Leaving the page would escape the mode too. |
Something else that we could do is return to normal mode on click. So then we'd have: click, escape, or press cmd/ctrl twice to go back. |
There was a lot of discussion there, and I'd have to dig back in to refresh my memory. However, Andrei identifies one of the salient issues:
Related to that, I think one important point of criticism with modes was that, just like arbitrary keyboard shortcut, they avoid the question of a clear tab-ready flow through the application. IIRC. |
I personally think we should change those shortcuts, as they conflict for quite a wide number of users, and most would have the expectation that the key combinations for those quotation marks work out of the box. The 'access' modifiers (Ctrl+Option on Mac / Shift+Alt on Windows) might be decent options for the shortcut if we can test they don't clash. Could probably still use 'N' and 'P', which would mean the shortcuts only change for Mac users. Here's a big spreadsheet where I've tried to compare Gutenberg shortcuts against browser/os shortcuts, though it might be a bit out of date now: |
See #11154. I'd like to remind it's not just about browser/os shortcuts (which may change based on the locale). It's also about assistive technologies shortcuts. Also, default shortcuts may change for a variety of reasons. There's really very little chance to find key combinations that don't conflict with anything. That's also the reason why any software shouldn't rely exclusively on keyboard shortcuts. For reference, I've already mentioned in another issue that in the new WAI-ARIA Authoring Practices 1.1 |
That's unfortunate. Shift+Option+Command is the other option. I still feel strongly that the shortcut should be changed. A user shouldn't have to change a setting to be able to type punctuation—this is an editor for the written word. |
All the shortcuts have the same potential problem 🙂 It's certainly possible to consider to change this specific shortcut but still we're not solving the broader issue.
It's a web application too. Not a full-page editor application like Google Docs and the like. Thus, it has to balance two (often conflicting) needs: keyboard navigation through the interface and preserving native text input/selection keystrokes. |
This specific improvement is orthogonal to two other discussions mentioned here:
As it's orthogonal, let's make the change. We won't ever fix shortcuts for everyone, but will improve things for many. |
Till the new shortcuts will conflict with something else 🙂 |
That's fine, we'll reassess then. Presumably by then there'll be a solution set up to disable problematic shortcuts, whether per locale or per other criteria. |
I kindly disagree. I don't see how a solution that isn't a solution can help in any way. Added the accessibility label as the change proposed here impacts a11y. |
Shortcuts can be problematic in many ways. Some of them we have identified, some we haven't yet. They will also impact a11y. Which is why I think this is an important area to work on, and why I identified separate discussions that fit into it. However, right now, people on Czech keyboard layouts can't input Czech quotation marks, and it's likely that other configurations are similarly affected. I'd rather fix that identified case now and reassess our possibilities as we go. A partial solution remains a solution. |
This is an issue for every keyboard in every language on a Mac. |
#14681 should fix this issue. |
Describe the bug
Gutenberg doesn’t react to Czech quotation marks: „ and “
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: