• Aldoo@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      11 months ago

      Unless I am mistaken, keyd is a kernel level input remapper (like kmonad and kanata). So it is a lower level component: even if you use keyd, xkb will still be there, downstream. The situation would be roughly the same as with xmodmap… except it won’t even be enough!

      Indeed, this method consists in mapping scan codes to other scan codes. At this level, there is not the notion that a key produces a character yet. Hence concretely, kernel level input remapping (like QMK, btw) cannot be used to map a key to a character that is not already declared in a higher level component (usually in xkb or xcompose, but it can also be a another component using X11 API, such as xmodmap, for instance).

      Edit: to make it more clear, in the end, it is the application who decides what character should be displayed. Typically, for doing so, the application relies on libraries from its toolkit, which implement either X11 or Wayland text input protocols; using standard keycode-to-character translation libraries (i.e., most notably, libxkb). To add new characters in a keymap, these characters need, in the end, to be produceable as the output of these libraries.