Potentiometers, rotary encoders, or both?
I'm new here and new to cockpit building. I'm trying to design a first experiment in making controllers, and I need some help. Hopefully I've posted this to the correct forum.
I want to make trim controllers that will work in IL-2 and FSX. IL-2 supports axes and keystrokes for trim, but FSX only supports an axis for elevator trim and requires keystrokes (or DirectX buttons) for adjustments to aileron and rudder trim. I want to use axes where possible and keystrokes where I can't.
I would like to actuate trim adjustments by turning a wheel. If it's IL-2, then I want it to be via an analog axis; if it's FSX (and not the elevator trim), then I need it to send the correct keystroke. To accomplish this without a lot of software voodoo I think I need to connect the wheel to both a potentiometer and an incremental rotary encoder. The potentiometer is the axis and the incremental rotary encoder detects the direction and speed of the movement which enables the keystrokes. (1) Do I have that right?
(I have four questions in this post. They're numbered parenthetically like above.)
Let me set up a series of related questions. I have a Saitek X52. In the software that comes with the stick, I can treat the controller's axes as something other than analog. I may not have phrased that accurately, so let me give you two examples to explain what I mean. First, I can program the X52 to send a keystroke based on the direction of movement of an axis. For example, if I rotate my rotary dial clockwise, it will send keystroke A; if I rotate my rotary dial counterclockwise, it will send keystroke B. Second, I can send a keystroke based on the position of the axis. For example, if I position my throttle from 0-50% along its axis, it will send keystroke C; if I position my throttle from 51%-100%, it will send keystroke D. Hopefully that all makes sense.
I have no idea how they accomplish this, but I assume that it's a software capability built on the pot info. Its position is checked at such and such an interval, but instead of sending the positional data to the game, the stick's software interprets the data and sends the desired keystroke. Of course, how they do it doesn't really matter to me. (2) I just want to know if it's possible to mimic this functionality in my homebrewed controllers with just a pot, or do I actually need both a potentiometer and a rotary encoder?
If it is possible, then... (3) do some I/O cards come with software with capabilities similar to what I described in the preceding paragraph? (4) Alternatively, are there any freeware or shareware programs out there that conditionally interpret controller data to transmit keystrokes?