Rotary switch that changes resistance on each click?
It is possible with an incremental encoder, a D flip-flop, two mosfets and a few passives.

An incremental encoder will give you pulses for each "click". There are two out-of-phase pulse outputs, so that you can guess the direction in which the encoder is turned:



(the "D" dashed line is when the detent happen on the knob)

You see that when the knob is turned clockwise, the rising edge of the B signal will happen while the A signal is high. When turning couter-clockwise, the rising edge of the B signal will happen while the A signal is low (read the above timing diagram respectively from right to left or from left to right). This is the principle.

Therefore, using a simple D flip-flop, you can register the direction is which the knob is turned. Wiring one of the encoder output to the D input, and the other to the CLK input, the flip-flop will have its output kept at 1 if the knob is turned clockwise, and 0 if it was turned counter-clockwise. You can also use the CLK pulses to trigger the required action for each click.

As we now have a signal indicating the direction and a signal indicating the click action, it is just a matter of correctly triggering a combination of resistors and fets to connect the appropriate resistors. Basically, when a click occurs, a 3.3k resistor must be connected between your two pins, and, if the direction was clockwise, we add a 1.5k resistor in parallel so the total equivalent resistance is roughly 1k, as per the spec.

Here is a basic schematic (assuming pin 23 is a common ground, that a 3.3V to 5V supply is available, and that pin 21 is not below the ground potential):







simulate this circuit &ndash; Schematic created using CircuitLab

You need R1 and R2 to pull down the encoder output signals. Also, even if it is not shown, you'll need some decoupling capacitor across the D flip-flop supplies (100nF is typically fine)

The choice of the D flip-flop is up to you. 74LVC1G79 is a perfect fit, but it is tiny (hard to solder by hand, and inappropriate for a breadboard). You could use a 74HC74, CD4013, etc... Be sure to read the datasheet and appropriately connect the unused inputs (set/reset) to the inactive level. Also check that your available supply is within the recommended supply voltage range of the component you choose.