Please make shortcuts optional and off by default. I rely heavily on browser plugins for vi-like motions (Tridactyl for Firefox, Vimium for Chromium) and it drives me up the wall every time a website interferes with my plugin. I have a shoulder impingement and frequent switching between keyboard and mouse causes me physical pain, that’s why I rely on these types of plugins so I can keep my hands on the keyboard when I frequently switch between browser and editor.
@HiPhish thank you! We’re planning for the shortcuts to be compatible with vi-like extensions. Is there anything you think we should watch out for in particular to avoid interfering?
The plan is for the shortcuts to be optional and on by default, as that seems to be the standard in all web apps we reviewed that had good keyboard shortcut implementations.
I think you are referring to me, but type the wrong person’s name? To answer the question, my problem is on websites like for example GitLab when I press / I expect the browser’s native search function to open, instead it opens GitLab’s own search function. If the Django admin could somehow detect that / is already bound to something in the browser and not rebind it that would be idea. I have no idea how or if this would be possible.
ty, yes! No we can’t detect which browsers support which shortcuts, however this is part of our research to determine which key bindings are appropriate, and if we decide to use the same ones, make sure that’s intentional. For browsers specifically, we reviewed Chrome + Edge + Safari + Firefox + Opera + Brave, which corresponds to 97% desktop market share.
There are some shortcuts like / which we are currently planning to use even if browsers do too, and some which we are planning to avoid. This is case-by-case depending on what other admin-like apps are doing. So far we’ve reviewed about 15 apps, 500 shortcuts.
To be frank, I think default shortcuts in a web browser are a bad idea in general. The / key is already one instance where you are breaking accessibility for users who have rebound it. But then you are assuming that the user is using a QWERTY keyboard to begin with. What about QWERTZ keyboards? AZERTY? Dvorak? Non-Latin keyboards? You want to support vi-like keys, but that’s assuming the user has the same keyboard as Bill Joy in 1976. Sure, so do a lot of applications installed on my computer, but that’s the thing, they are installed on my computer, I have my dotfiles for them.
Django is a web development framework, so it’s used by technically higher literate users, and those people are the ones more likely to have custom keyboard layouts and browser plugins. If you can find a solution that works for everyone out of the box then more power to you, but I don’t think it’s possible.
I don’t understand what problem your are trying to solve in the first place. If someone wants vi-like keyboard navigation they can install a browser plugin that will work consistently across websites the way the user intends it. Why would every website have to re-invent it?
I’m not sure if you have experience implementing keyboard shortcuts in a web app, support for different keyboard layouts is a known quantity? It’s not possible to offer the exact same experience for all layouts (as the keys’ positions differ) but if you’re aware of the existence of different layouts you can design your shortcuts accordingly.
If you can find a solution that works for everyone out of the box then more power to you
Yes, the solution is to not reinvent the wheel and follow what other apps intended for the same type of audience have implemented, hence our selection of 15 web apps that are within a relatively similar space. There will always be unexpected cases of course, which is why we have also extensively researched how all those apps support disabling some or all shortcuts, and intend to support the same.
Generally-speaking, single-key punctuation shortcuts are relatively safe. Single-key letter shortcuts are often problematic. Shift/Alt+ shortcuts are best avoided. Ctrl/Cmd shortcuts can be suitable if it’s appropriate to override OS/browser behavior.
I don’t understand what problem your are trying to solve in the first place
See the project report, “The goal is to make the Django admin interface faster to navigate and more accessible to keyboard-first users.”. Specifically, there are a lot of parts of the admin that are really tricky to navigate with sequential (tab) keyboard navigation. Keyboard shortcuts are one way to achieve this. We’re considering other ways too.
@HiPhish I’ve tested the vim-based plugins you mentioned and it has only made it more apparent for me why website-specific shortcuts would exist…
I think that such plugins improve browser-wide navigation - prominent features being j/k for PageUp/PageDown or the link-hint mode for aribitrarily assigning key bindings to links.
But I believe that website-specific navigation could still be improved - hence website-specific shortcuts exist for that. For example j/k keys being used in Github, Gmail and others, to focus next/prev items rather than scrolling page. Another example is Ctrl+S to Save object in Django Admin - where keybindings are inconsistent at times when using Vimium’s link-hint mode: