GUIs should be fully keyboard-driven

(ckardaris.com)

119 points | by ckardaris 2 hours ago

37 comments

  • cosmic_cheese 1 hour ago
    Keyboard accessibility is one of those things that tends to get swept under the rug or forgotten about entirely alongside accessibility in general. The funny thing is that the former usually falls out of the latter.

    Part of the blame lands on the shoulders of popular UI frameworks (or in the case of those choosing to eschew use of such, the developers who made that choice). The older frameworks tend to make this fairly easy; for example, in Cocoa/AppKit (Mac native UI framework), one can pretty easily wire up their entire UI for proper keyboard navigation entirely visually (mostly just consists of connecting nextKeyView outlet between controls to produce a logical chain to tab-focus through). Defining key shortcuts is also simple; add a menu item for a command and set its corresponding shortcut (which in turn allows the user to rebind the shortcut in System Settings at will).

    That sort of design has fallen out of favor with newer frameworks, unfortunately. The new preferred style seems to be a wireframe that the dev chooses which parts fill in, and often only the barest of essentials makes the cut.

    • pathartl 1 hour ago
      Funny that you bring macOS, because for _decades_ I've struggled with navigating it without a keyboard. Windows components however, especially old ones, are incredibly accessible
      • cosmic_cheese 1 hour ago
        As a system macOS definitely has some holes in keyboard navigation, as well as a couple corners which are KB-navigable but the way to focus them is not immediately obvious.

        On the app level, keyboard navigability depends on the developer. If they take the time to dot their I's and cross their T's it's between decent and great, but if they don't care it'll be bad.

        • dpark 1 hour ago
          MacOS has intentional holes in keyboard support. You have to go into settings and turn on a config for keyboard navigation to reach all elements. Apple intends for most users to navigate with a mouse.

          It’s in the accessibility settings.

          https://support.apple.com/en-za/guide/mac-help/mchlc06d1059/...

        • cyberax 1 hour ago
          "Some holes"? That's an understatement.

          There's no option to bring up a context menu with the keyboard. And there are no keyboard accelerators _AT_ _ALL_. Windows will underline the shortcut characters when you hold "alt".

          • kccqzy 16 minutes ago
            The philosophy was that anything visible in a context menu should also be in the app-wide menu bar. Instead of bring up a context menu and click Copy, you would find the Copy menu item in the menu bar. Therefore such menu items can be assigned any keyboard shortcut by the user.

            I quote from Apple https://developer.apple.com/design/human-interface-guideline...:

            > Always make context menu items available in the main interface, too. […] In macOS, an app’s menu bar menus list all the app’s commands, including those in various context menus.

            Therefore one can rightly conclude that there is no need for a key to bring up a context menu.

          • cosmic_cheese 57 minutes ago
            > There's no option to bring up a context menu with the keyboard.

            That used to be the case but has changed. Since at least macOS 15 the context menu key on typical keyboards is recognized and functions, and on other keyboards it can be opened with Ctrl+Return.

  • manlymuppet 24 minutes ago
    Power user experience is not the same thing as user experience in general. If you want to make the argument that all developer tooling should be keyboard-driven, fine, be my guest. But most people aren't willing to deal with the learning curve of keyboard-driven GUIs, and that's okay. We shouldn't force it.

    HN's insistence on acting like all users are Arch Linux efficiency perfectionist hacker types is painfully corny.

    (This reads harsher than I intended. Sorry about that. I love Arch Linux people. It's just think it's no less noble to serve the average Joe than to create the perfect tool for power users.)

    • OroPla 16 minutes ago
      The argument is that both should be supported, which seems like a valid wish. There's really no reason to either-or this. Just have both work.
      • magicalhippo 9 minutes ago
        Which, if you made say a regular Win32 application, was guaranteed. These newfangled frameworks dropped the ball, if anything.
      • manlymuppet 14 minutes ago
        Well the two--building for power users vs for a general audience--often work against each other.

        And trying to satisfy every audience at once is a good way to satisfy none. You don't want your app to be a Jack of all trades; focus is really valuable.

        • oneeyedpigeon 5 minutes ago
          Do you have an example of how supporting a keyboard shortcut for every action could be bad for a general audience?
    • fny 8 minutes ago
      Power user experience is not the same across disciplines either.

      God forbid I should ever be forced to use Blender or Inkscape with only buttons.

  • marklar423 1 hour ago
    I agree but I think being usable by the keyboard isn't enough, because the shortcuts are often hard to discover and remember. I think the ideal is - like good TUIs - GUIs should put obvious hints on screen how to navigate via keyboard.

    It would be really great to have some GUI frameworks for the common platforms (including web!) designed to do this and have some opinions on common shortcuts for common actions so we can standardize on something.

    • OroPla 12 minutes ago
      Agreed. Also, I would support everyone building off of vim principles. If keyboard bindings are somewhat consistent across applications, that would be really nice and there are already a bunch of options using vim bindings as a starting point, since they make intuitive sense once you've learned the "language" vim uses.
  • jolmg 18 minutes ago
    > While it’s true that if you randomly pick a GUI and a TUI application, the latter is more probable to be fully keyboard-driven, this does not tip the scale in favor of developing TUIs over GUIs3. What it does is highlight the inadequacies of keyboard navigation in many GUI applications.

    Something to consider is a terminal that has keyboard navigation of its own. Through a terminal shortcut, I can move the cursor at will and copy any text at all, even if it's part of the interface of a TUI. If I want to copy the filepath of the file I'm working on in vim to then use in a shell, for example, it takes like 5 keys to copy it straight off vim's statusbar. A graphical text editor can display the filepath in a tab or something, but I can't copy the text off the tab.

    I don't know if I'm alone in this, but it's very frustrating to want a piece text, see it in front of you, and you can't copy it because the developer for one reason or another didn't implement copying of that text, so you have to type it out even if it's right there.

    Sometimes it seems on purpose too. For example, when a game on Steam gets updated terms of use, you get presented with a window showing the terms, but you can't copy them to save them. It's like the purpose is to just accept and forget the terms. A TUI can't prevent the user from copying text by its very nature.

    Any terminal can implement this kind of arbitrary-text keyboard navigation on its own and have it work for all TUIs. Were e.g. GTK to implement something like this, it would only work for GTK apps, not for all GUI apps. This is exclusive of TUIs because TUIs are text-driven while GUIs are pixel-driven.

  • orbital-decay 3 minutes ago
    >But I want to oppose a recurring argument in favor of TUIs that in my opinion does not have a solid foundation. To paraphrase various commenters: TUIs should be preferred because they are keyboard-driven.

    Yes. One problem with this argument in particular is that every TUI reinvents the wheel and designs its own schema.

    To reinforce author's point, classic GUI frameworks and their guidelines actually provide hotkey schemas for common actions by default, and hot paths for quick interface traversal. They're universal and work by default, so in a lot of cases you don't even need to think about it, only extend it with your own actions. Absolutely nothing prevents you from doing the same in a TUI framework, but at this point the supposed simplicity and flexibility is lost.

    New GUIs have other innovations, see for example Microsoft Ribbon that adopted link navigation from Vimperator to make classic toolbars discoverable, compact, accessible from the keyboard, and customizable - all at the same time! Unthinkable for any other UI paradigm.

    It's incredible that after the Electron devastation era this unification and keyboard accessibility feels like some kind of lost art, and the perceived lack of keyboard driven GUIs is used a strawman to criticize GUI as a principle. Status quo is not the principle. It's also not true, essentially all good GUI apps are keyboard driven, and surely most professional/heavy user ones.

    Design good interfaces, not bad ones, regardless of the paradigm. This is harder than it seems, and TUI is not a automatic substitute for your lack of this skill. If you think it is, you will design a bad app, in the same way like pixel art looks hideous when used to compensate for game designer's laziness. In fact, a lot of recent TUI apps I see are pure terminal cargo cult and are simply worse by being TUIs.

  • phegler 4 minutes ago
    Why though?

    The way we are moving I believe soon we will be talking to the websites not just clicking or typing around...

  • FranklinMaillot 7 minutes ago
    Command palettes are great in this regard. They make commands accessible and discoverable entirely from the keyboard. I'm happy to see them becoming more popular.
  • mattpk 10 minutes ago
    The mouse is amazing, if you have a good sensor, a mousepad and no mouse acceleration. Not many have this setup, but those who do can wield their cursor with insane speed and accuracy. Consider top osu! or Starcraft players.
    • sakjur 3 minutes ago
      In video games, you're typically resting one hand on the mouse and the other on the keyboard fairly consistently.

      Going back and forth between the keyboard and the mouse is what's awful about bad interfaces in my opinion, not the mouse as a pointing device.

  • eviks 1 hour ago
    > In fact, many GUI framework application guidelines explicitly encourage GUI application developers

    Instead they should be engineered in a way that allows users to bypass those developers in a (at least) framework-consistent way as there will never be a time when they collectively become "keyboard-wise".

    • ckardaris 8 minutes ago
      In some cases they do.

      For example a GTK app main context menu can be triggered with F10. But this relies on the developer to correctly "tag" said context menu.

      In simple cases it is obvious what to do, but in more complicated designs, where you may be able to achieve the same visual output in different ways, it may not be so obvious.

      In that case, it is up to the developer as well to read and try to follow the published guidelines.

  • yipinwong 15 minutes ago
    > The takeaway is simple. Do not compromise on the user experience you provide with your application

    Same thing I hear from everyone.

    "You can't compromise on UX" - UX experts.

    "You can't compromise on security" - Security experts.

    "You can't compromise on Accessibility" - a11y experts.

    We gotta make trade-offs, and I gotta get my thing shipped (for me I learn toward security for my service)

    • Rygian 10 minutes ago
      > We gotta make trade-offs

      You could compromise on not-shipping-before-it's-ready.

      • deathanatos 2 minutes ago
        Or even the original premise of agile, which was to iterate on it. But "iterate" these days means "onwards to the next feature that we'll only drive to MVP", not, "polish & fix bugs" or … do things like enhanced UI for power users.
  • thibran 33 minutes ago
    The problem with keyboard navigation is that there seems to be no mature GUI keyboard-first UX concept. "Mouse things" are the way they are, because they fit the mouse-way. We need the same for the keyboard-way. Until then, there seems to be no design concept that can just be copied.
    • Rygian 6 minutes ago
      Top of my head:

      - Tab to move across fields.

      - Left-to-right, top-to-bottom focus.

      - Space to toggle togglable stuff.

      - Alt-Down Arrow to deploy drop-down stuff.

      - Arrows to move around.

      - Enter/Esc to accept/discard a modal.

      Or maybe I misunderstand the things you call "mouse things".

    • esikich 25 minutes ago
      There is, whether or not developers follow it is a different story.

      https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface...

      • leleat 0 minutes ago
        I don't think this really addresses GP's comment as far as I understood it.

        Your resource mostly describes how to make keyboard-based workflows accessible. But just because the full functionality of an app is keyboard accessible, doesn't mean that it works as well as the pointer-based approach - especially if you have an app with multiple menus, sidebars, headers, footers etc. Maybe you could tab through everything, but a pointer will be faster. This is where a "keyboard-first UX concept" is missing (from GP).

        I think an interesting idea to solve this would be a "focus navigation mode". Enter this mode with 1 shortcut and then navigate between items with a few keys; like a combination of mnemonics and screen reader navigation e.g. jump between headers with "h" etc.

      • thibran 6 minutes ago
        That's not what I mean. The site you linked is about how to make a mouse-first website more keyboard friendly, but what I would like to exist is a mature keyboard-first guide.

        I mean something like this (my wip keyboard-first file manager): https://ibb.co/G3WBW5C1

        The hard part is, there seems to exist no UI & UX design language I can follow to create a nice keyboard-first app, so I have to think through everything (which is fun but tiring).

  • keriati1 27 minutes ago
    A few years back I started to try to use my computer by not touching the mouse. Ended up writing a bunch of Tampermonkey scripts for my most used web pages to add fast keyboard navigation shortcuts.

    Also a lot of webpages have it already built in, by pressing "?" they show a nice overlay. For example github and gmail have it.

    For github I still ended up adding a quite a few more shortcuts.

  • ivanjermakov 1 hour ago
    Three levels of GUI workflow operation: touchpad < mouse < keyboard. This is the main reason people fall in love with programs like vim: with enough experience it allows one to completely eliminate interface friction.
  • hombre_fatal 1 hour ago
    Agreed, but what "prevents" it is that making a good keyboard-driven UI takes a lot of taste, extra effort to build it, and it must be revisited any time the UI changes. It's duplicated work.

    Ideally all GUIs/TUIs are usable with keyboard and mouse independently.

    A good example of this is when you have a fancy keyboard-driven workflow yet you can't even do the most trivial task without placing two hands on your keyboard. Sometimes I just want to reach over and do it with one hand on the trackpad.

    • halfcat 43 minutes ago
      > extra effort to build it

      Also extra effort to use it. This is why we have the “how do I exit vim?” meme.

      A good user interface needs escape hatches so users can keep their head above water while they learn to swim.

      Most of what people want when they say keyboard-driven is closer to a cockpit (requires expert knowledge) than a general purpose UI.

  • BeetleB 1 hour ago
    Mildly off topic, but getting to the original GUI vs TUI debate: Speed can also be a factor. I've yet to find a GUI file manager that is better than Midnight Commander/Far. I think there are some graphical orthodox file managers, but I could never do things as quickly in them as I could in mc.

    So sure, add keyboard support to the GUIs. That's always a good thing. Just make sure they're also as responsive as in a TUI. Dialogs should appear instantly, etc.

    The other headaches I've had with GUIs (in Linux) is the appearance can change if an underlying library changes. Even if I haven't upgraded the SW, if I upgrade one of the toolkits it relies on the app's appearance and behavior can change.

    Somehow this is never an issue with TUIs.

  • kixiQu 19 minutes ago
    I really like this kind of thing but I wish there were more tutorials to help get good with keyboard shortcuts. vimtutor was lifesaving
    • az09mugen 9 minutes ago
      My take in this case is to learn incrementally. Like the pebbles in the shoe, I remove the more painful one first (the shortcut for the action I do the most), get used to it, then remove next more painful., and so on. Usually I begin to get a little comfortable with 4 or 5 shortcuts.
  • WillAdams 1 hour ago
    Where possible, there should be keyboard shortcuts/navigation.

    Where appropriate, the labeling of fields and so forth should be such that it will work for a screen reader.

    Often, the expedient option is to use an HTML front-end so that one can off-load most of that to the user's selection of web-browser (and where possible, things should be engineered so that Lynx is a valid option).

    That said, I use OneNote and Macromedia Freehand and so forth w/ a stylus --- horses for courses.

  • walrus01 1 hour ago
    I have seen more GUIs these days that don't support even the bare minimum of using tab to cycle through various fields and selector buttons. Which as I recall was introduced in like windows 3.0.
    • kps 1 hour ago
      Or page up/down.
      • g3f32r 16 minutes ago
        I'd posit that less than a half a percentage of users have used the page up/down keys in the last year.
  • danielvaughn 1 hour ago
    I've been on this kick for a long time. A few years ago I was exploring a UI design tool that was entirely keyboard-driven, using pneumonic keychords inspired by Vim: https://github.com/danielvaughn/stride

    My experience is that while it's awesome to have really deep keyboard-driven experience, it can't _only_ be that. You need some graphical controls to help guide users.

    • ckardaris 47 minutes ago
      Ideally you should have both. Every action should be doable by mouse only and by keyboard only. That way you can cater to all kinds of users.
  • ungreased0675 1 hour ago
    It is excellent when I can do common tasks in an application without taking my hands off the keyboard. Especially utility apps like a calculator or password manager that I usually just need for a few seconds.

    Bitwarden used to be keyboard friendly, but recent updates have removed those functions for reasons I can’t understand.

  • escot 1 hour ago
    I think we should also be finding ways to make things keyboard-driven that currently require a mouse. My side project is a keyboard centric flowchart editor which tries to merge the two between something typically 2D with pixel coordinates (normal flowchart software) and fitting it into a grid that has discrete coords so you can navigate with arrow keys.
  • jvreeland 39 minutes ago
    I hate nothing more than when a random mistype on a website or app causing shit i don’t understand to happen without reasonable ways to undo it or discover it. I don’t really care if the app can be controlled with a keyboard i want the ui to be discverable and usefull.
    • ckardaris 15 minutes ago
      This can happen if the applications exposes single keys as shortcuts. If they are "hidden" behind the different modifiers (i.e. Ctrl, Cmd, Alt), then mis-clicks should not be possible or should be more tolerated.

      The "intuitiveness" argument is also related. You cannot rebind well-known shortcuts to different actions and expect the user to not get frustrated.

  • waffletower 7 minutes ago
    Keyboard driven UIs are easier to instrument by alternative interfaces and has very positive accessibility implications. However, "shoulds" in computing lead toward a "tyranny of compounding responsibilities"; adding interface complexity to a project, particularly the suggested alternative input vectors may cross an upfront and/or maintenance development cost limit for a project.
  • projproj 38 minutes ago
    Such a funny coincidence. I opened HN in this new, 100%-rust browser[1] I'm working on to actually test some keyboard fixes I did last night.

    Every action was keyboard first and only got mouse access later. Browsing by keyboard is not the browser's specific goal, but it was a feature from day 1!

    [1] https://github.com/tayler/hww

  • arjie 1 hour ago
    The one UI invention many web UIs now add is the universal command search bar. I’m most familiar from it from Jetbrains IDEs where it’s been for over a decade and it is a remarkable upgrade on browsing menus. With the KeyPromoter extension on I even learned the keyboard shortcut over time. Good UI pattern and now this universal command search is everywhere: Cloudflare, Mercury, etc.

    Love it.

    • cosmic_cheese 1 hour ago
      Similarly, under macOS in most apps ⌘⇧/ opens a full menubar search which can surface most app functionality from the keyboard. Not quite as good as a command palette but close, and devs don't need to do anything to opt in except populate the app's menus properly.
      • arjie 1 hour ago
        Well TIL. Great tip. I only ever hit that key combination when I look around Finder and find myself unable to go up one level easily from the icon bar - an action I do constantly.
  • onion2k 1 hour ago
    On the web, keyboard accessible web UIs are a WCAG 2.1.1 level A requirement - that's literally the most basic level of accessibility standard (unless you count 'failed' as a level). If your website / web app isn't achieving that then you haven't tried very hard.
    • phoghed 1 hour ago
      Keyboard driven, and keyboard accessible are not the same thing.

      I’ve made a web application at work able to be keyboard driven one time and exactly 0 users out of thousands made use of it. People just don’t want to pay the upfront cost. In the old TUI days it was the only way to use something so you had no choice.

      To be completely keyboard inaccessible I’d argue that you almost have to try and achieve it.

  • neuroelectron 11 minutes ago
    A lot of comments on VIM here. Vim is a terrible example and a pretty bad design overall, objectively. Legends of great productivity with vim is highly legendary, i.e. fiction. Classic Notepad/Word and similar Guis that have been widely adopted in Linux windowing systems are clearly superior and that's why they're so widely and silently adopted. Not a lot of fanfare for hierarchical GUI menus with keyboard shortcuts.
  • yangshi07 59 minutes ago
    But it is really hard to remember the shortcuts
    • ckardaris 39 minutes ago
      You don't really need to remember everything though. Mouse navigation does not need to go away. The keyboard shortcuts should be available if you opt to use them, after which point you will be able to memorize them in short time.

      The intuitive part of my argument also falls under this. By following known conventions as close as possible, we can eliminate the need to remember the most common actions.

      Additionally, it is important to present your shortcuts in a shortcut window/dialog in a logical way for when the user needs to remember something.

      In any case, an excesive number of keyboard shortcuts can have a negative effect on usability, so this is also important to keep in mind.

  • ModernMech 1 hour ago
    People gave the ribbon interface a lot of shit but one thing they definitely got right was making absolutely every option reachable from some keyboard shortcut. Some of the shortcuts get a little long but you can just add those as a hotkey if you use them a lot.
  • bigstrat2003 1 hour ago
    I agree 100%. The mouse is great and I don't think GUIs should drop it or anything, but it's wonderful to have the ability to keep your hands on your keyboard when doing data entry tasks and the like. I also think that when you design for both keyboard and mouse input, it will force you to consider rough edges of your UI design in a way that you wouldn't have to if you were just designing for one. So the app will be better as a result.
  • dcrazy 1 hour ago
    Why, are we speed running the de-evolution of UI?
    • Arainach 1 hour ago
      Because not everyone has a mouse or is able to use a mouse. Accessibility matters.
      • Joker_vD 1 hour ago
        Not everyone has a (non-screen) keyboard either, you know.
        • sejje 1 hour ago
          Right, so we should have both options.
  • gjvc 1 hour ago
    Spin up a Windows 3.11 and later instance to try this out.
  • sciencesama 1 hour ago
    yes please ! even AI would appreciate this !
  • binary132 1 hour ago
    Yes and no. The big advantage of a GUI is having interactive 2D coordinate input support (aka a pointer, or gestures.) While I think a keyboard can be a great control surface, that’s one thing it really lacks and only GUIs really offer. So to enforce that the whole GUI must be keyboard-drivable requires limiting the major advantage of the GUI. I’m a fan of the Emacs or Plan9 styles where the keyboard and pointer are able to be used together synergistically. You also see some of this in tools like video, DAW, and 2D/3D graphical scene editors.
    • ckardaris 33 minutes ago
      I agree. I mention this briefly in one of the footnotes. There are some tasks that greatly benefit from the mouse (e.g photo editing tasks where arbitrary region point and click is required).

      This does not contradict the argument. The rest of the interface, everything that is known and stable in advance, should be full keyboard-driven.

    • eviks 1 hour ago
      What's specifically is the limitation?
  • colesantiago 1 hour ago
    I'm glad the fad of TUIs are dying, I don't get the hype of them.

    We just need better, efficient and faster GUIs to put these TUIs to an end.

    Take a look at gpgui and glaze leading on this. There should be no reason to use TUIs anymore.

    It is time to move on from using this arcane technology from the 60s-70s.

    https://gpui.rs/

    https://glaze.app/

    • sejje 59 minutes ago
      > gpui.rs

      I clicked. Never trust a gui library without screenshots.

      I'll never quit building TUIs, though. I'm building more TUIs now than ever, with AI assistance making it easy.

    • mglvsky 49 minutes ago
      > We just need better, efficient and faster GUIs to put these TUIs to an end.

      I think, firstly, we need less meaningless red-tape shenanigans from MS/Apple to publish GUI apps

    • Joker_vD 1 hour ago
      > We just need better, efficient and faster GUIs to put these TUIs to an end.

      Well, yeah, it just that those GUIs failed to appear for at least 30 years.

      > It is time to move on from using this arcane technology from the 60s-70s.

      You mean the GUIs? They were being in development since the early 70s, you know, but they really have flourished in the 80s. So, it's already a 40-years-old paradigm that still haven't managed to displace another contemporary paradigm of TUIs. Well, who knows, maybe in 40 more years it'll make it.

  • olivewong 1 hour ago
    ain't no way my mom is learning vim
    • Arainach 1 hour ago
      Read the article. The argument is not "GUIs should require keyboard navigation", it's "everything should be possible with the keyboard".
  • sublinear 2 hours ago
    TUIs are an abomination and most GUIs should just be web.

    CLIs should be preferred when available. Learning them pays you back when it's time to write a script or pipe massive amounts of data.

    • Arainach 1 hour ago
      > most GUIs should just be web.

      Hard disagree. Most web interfaces are worse than most native UIs. Inconsistent rendering, keyboard shortcuts and navigation between apps, slow response times, and more.

      There's a reason everyone who knows what Electron is bashes every "native" app built with Electron.

      • sejje 56 minutes ago
        yeah--the reason is the bloat and overhead electron brings.

        nobody cares about the web layer

        • Arainach 15 minutes ago
          You're ignoring all of the other things I said.

          Keyboard shortcuts, navigation, and more are inconsistent in web apps. Will they work at all? Will they use different keys? No one knows. Will they respect my OS theming? What about my font choices or font sizes? Almost certainly not.

    • BeetleB 54 minutes ago
      > and most GUIs should just be web.

      Yikes, no! One of the reasons old timers like me say that using a computer has sucked a lot in the last ~20 years is the use of a browser as an interface to everything.

      If you want to make an app that needs a browser to use, then please drastically improve the browser's interface. I mean, this is a no brainer. TUIs are way more superior to doing things via Safari/Firefox/Chrome.