• Max-P@lemmy.max-p.me
    link
    fedilink
    arrow-up
    3
    ·
    9 months ago

    What I meant is those virtual shortcuts are all you get, at all. The application declares the shortcuts with an optional suggested key binding for it, but it’s up to the OS to ultimately handle the keys and tell the application which shortcut is called for.

    That’s exactly what Steam Input does: the game specifies actions like “player movement”, “jump”, “fire”, “look” and Steam just sends those values to the game. The game doesn’t have to implement mouse, keyboard or controller inputs at all, Steam does it all for you. In return, the game can run with controllers we’ll make 10 years from now, and the player can finally just map every single button to their liking, universally. It’s so much easier to deal with when thinking of “Ok, so A is jump” rather than “So I want to press A to jump which is X in the game”.

    Applications shouldn’t have to care about how you input stuff, it’s ugly and complex, leave it to the operating environment to figure that out for you.

    • Atemu
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      9 months ago

      I was being unclear; I meant the optional suggested keybinding would be bound to virtual keys for common actions.

      The goal of that is to rebind common actions globally. Without this, you’d have to change each application’s individual “copy” action to your preferred shortcut. You’d do so in the OS rather than the app but you’d still have to do it for each app individually.

      Alternatively, there could be a set of pre-defined common actions that applications would simply use rather than defining their own action. I think that’s what you mean.