{
  "id": 18698964,
  "title": "J and K are the only keyboard shortcuts in our whole app, and the only two focus() calls are a heading and a panel",
  "url": "https://urgent.news/2026/11/07/j-and-k-are-the-only-keyboard-shortcuts-in-our-whole-app-and-the-only",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-07T11:22:32.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/daniel_pertu/j-and-k-are-the-only-keyboard-shortcuts-in-our-whole-app-and-the-only-two-focus-calls-are-a-1bgi"
  },
  "original_language": "en",
  "account": "Nakodo's outreach campaigns involve reading lists and deciding yes or no on items presented. The app's design lends itself well to keyboard shortcuts, leading to an audit of every key the app listens for, every focus change, and the proper boundaries. A user can test this without logging in, starting with the card on the home page that provides a short tour. Pressing Escape stops the tour.\n\nTwo keyboard shortcuts exist in one file: J and K. They control navigation through a list within a screen. Located in only one place, the component steps through the filtered list, returning to the original filtered view and moving either direction through the list. This is a common shortcut found in many email applications.\n\nThe React useEffect function adds a keydown listener to the window. The listener checks for modifiers, such as Cmd, Ctrl, Alt, or defaultPrevented, and skips the handler if any are present. It ensures that the handler only executes if the key is J and there is a next item to navigate to, or if the key is K and there is a previous item to navigate to. Two guards are implemented to prevent unintended behavior.\n\nThe focus moves in the app are limited to two separate calls to focus(): a heading and a panel. The rest of the app relies on keyboard shortcuts for navigation. Due to the lack of hotkey libraries, custom command palettes, or accessKey attributes, the only way to programmatically navigate is through the two shortcuts, J and K.",
  "summary": "Nakodo runs outreach campaigns for brands, and most of the work in it is reading a list and deciding yes or no about the thing in front of you. That shape invites keyboard shortcuts, and I have watched myself not add them for a month, so this is the audit: every key this app listens for, every time it moves focus, and the places it should and does not. One part you can try without an account. The…",
  "key_points": [
    "J and K are the only keyboard shortcuts in the app",
    "Two focus() calls are for a heading and a panel",
    "Navigation is limited to J and K shortcuts"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}