Shuttle used a table lookup method to determine which jets to fire for a desired maneuver. If the full tables are available online, I am not aware of it, but there were some examples in training material.
For background on the shuttle RCS and its operations please review the following answers first:
This diagram shows the naming convention of the Orbiter jets and their groupings.
For a given command
(automatic or manual), the jet selection first references a look-up table to tell how many
jets are needed from each jet group. A jet group is a group of jets located on the same
pod (forward, left, or right) that point in the same direction, as shown in Figure 7-3.
There are several tables, and they take into account factors such as jet failures,
propellant feed constraints, and whether or not the jets are being fed OMS propellant
through an interconnect. Then, the jet priority table is referenced for the actual
selections. Pre-mission, each jet is assigned a rank within its jet group. Under normal
conditions, only the jets with the highest priority are commanded to fire. If a jet fails and
becomes deselected, it is removed from the table. Since jet RM keeps the DAP
informed as to which jets have failed, only those jets that are still available on the
priority table are commanded to fire.
An example for a pure positive yaw maneuver using primary jets and HI ROT selected on the Digital Autopilot.
Reference: Guidance and Control
G&C I/O/D 21002 (paper copy)
For Apollo, there is a useful paper Apollo Command and Service Module Reaction Control by the Digital Autopilot. It's unsurprisingly similar to shuttle - jet groups, lookup tables, etc. See paragraph 3.3.1.
There's also a discussion of phase plane control (figure 3.5) which might shed some additional light on Modeling attitude control: ramping/easing between attitude commands? and its answer & discussion in comments.