Keyboard Encoder Shift Keys



15 Oct 04 - Updated the page to show the I-PAC "stealth-mode" shift function.


A shift function is a routine on the I-PAC, KeyWiz, and MK64 encoders that allows one input to send one code when pressed directly, and a different code when pressed along with another key (the Shift Key).  The main uses are to allow additional functions without having a bunch of buttons on your Control Panel, or to allow for additional inputs for administrative functions, without having to buy a more expensive encoder with more inputs.  However, in no case should shift keys be used for other than administrative functions such as Pause, Escape, Tab, Coin Input, or Player Start keys.  Generally I avoid using Shift Keys because it gets too hard to remember or explain “Okay, I want to insert a Player 2 Coin, so I press Player 1 Start and move the P1 Joystick Up (or was it Left), etc”.  However, the KeyWiz has some additional functionality that avoids most of these problems.

Also, there has been some confusion as to how the shift function worked on the various encoders and what the differences between them are. So I decided to make a page to explain this somewhat involved topic.  Here is an explanation of shift functions on the three main keyboard encoders:


MK64 (Discontinued) - First off, if you need to use shift keys in addition to 64 inputs, you had better re-think your panel design ;-).  The original MK64 allowed you to send seven shift keys, however, only input 00 could be assigned as the key that activates the shift function and only Inputs 01 through 07 can be shifted.  Input 00 (the shift key) can be assigned to send any code (P1Start would be default), but you would want to plan this out before building your panel or you would end up having to rewire your controls if you changed your mind.  The redesigned MK64 offers the option to send macros (key combinations), but I don’t think any of the other functionality changed.  It can be considered to operate the same as the I-PAC from a usage standpoint for the purposes of this discussion.

I-PAC - The I-PAC/2 has 28 inputs.  Any one of these can be set as a Shift input using the WINIPAC software, and any of the other 27 can be programmed to send an alternate code when the Shift Key is depressed.  The I-PAC/4 has 56 inputs, it is basically set up as two I-PAC/2's siamesed together.  Any of the Player 1 or Player 2 inputs can be set as a first shift input, and the remaining Player 1 and Player 2 keys sent to send an alternate code when the first shift key is depressed and any of the Player 3 and Player 4 inputs can be set as a second shift input and any of the remaining Player 3 and 4 buttons set to send a shifted input when the second shift key is depressed.

KeyWiz - The KeyWiz has 32 inputs plus an additional shift (Shazaaam!) input.  24 keys may be assigned to alternate inputs when the shift key is depressed.  The joystick directionals cannot be re-mapped and do not register when the Shazaaam! key is depressed.   Also, depressing Shazaaam! and moving the primary joystick left or right shifts between the default and the alternate loaded codeset; however, this function can be disabled as described here.


I-PAC - I will only briefly cover usage of the I-PAC, as the product has been out long enough that most people are familiar with it, and most of data is available at   Basically, you assign one key to activate the shift function (default P1 Start).  Now when this key is pressed, the I-PAC does not do anything until:

See the section I-PAC Stealth Mode below for a discussion of how to connect a button(s) on the I-PAC so it activates a shifted input automatically.

KeyWiz Differences - The KeyWiz Shift function has one fundamental difference from the I-PAC.  This difference leads to two practical differences.  The fundamental difference is the KeyWiz has 32 inputs PLUS Shazaaam!, while the I-PAC has 28 inputs, ONE OF WHICH is shift.   The practical differences are:  Since Shazaaam! is considered an independent function (not tied to a key which has it’s own primary function), the shifted keys can be activated on KeyDown without having to decide whether the user is going to want the shifted function or the primary function.  This also reduces the likelihood of a shifted key being activated accidentally.  The other practical difference is that having the keys activate on KeyDown allows for some added functionality in the shift function through diodes or adapters which RandyT sells ($1.50 each, ten for $10), which I will discuss next.

Here is a Schematic that RandyT provided showing the different ways to wire up the Shazaaam! buttons.  Note that these methods are only applicable to the KeyWiz, they cannot be used (won't work) on the other encoders.

keywiz_shift_wiring.jpg (84399 bytes)

Click the image to enlarge or better yet, right-click and open in a new window, or download and print out the Word or PDF versions, as I will refer to them often in the discussion that follows.

The diodes above would be 1N4148 switching diodes (others might work also, but I know these are okay) available from allelectronics for 15 for $1.  RandyT's adapters could also be used in place of the diodes.  Here is a schematic that I made showing how to do the Advanced Method wiring using diodes and terminal blocks for the cheap or solder-phobic (or both).  NOTE: You need twice as many terminals as the number of One-Click buttons that you want to connect.

terminal_blocks.png (21848 bytes)

Click the image to enlarge

There are three ways the KeyWiz shift function may be actuated.  For lack of a better term, I am calling them “Classic Mode”, “I-PAC Compatibility Mode”, and Stealth Mode.  (Mode is not really a good term.  Configuration would be better, as you cannot select between them (once the button is wired up, it will continue to operate that way).  You could, however, use a combination of the modes, for example, a Pause button using Stealth mode, and a Classic Mode Shazaaam! button for other inputs.   Here is how they work:

Classic Mode - This is shown as the Simple Method on the left side of RandyT's schematic above.  For visualization, I picture this mode as having a black (non-obvious) button mounted in the top left of the control panel and wired to the Shazaaam! input on the KeyWiz.  To activate the Shift function, you simply press this button and then the button that you want to send the shifted input for.  This is a very simple configuration and is less likely to “bite” you than either of the other methods.

Considerations - Personally, I don’t like having to remember all the different combinations.  “Tab is Shazaaam! and one of these buttons, which one!”.  Also many people don’t like having an extra button on their panel just to access the shift function.  These people preferred the set-up of the I-PAC.  Is there a way to get this functionality and still use the KeyWiz?  The answer is 95% yes.  Read on.

I-PAC Compatibility Mode - This is shown as the Advanced Method on the right side of RandyT's schematic.  By default, for this mode, Shazaaam! + Y (One Click) would be mounted as the Player1 Start button.  The Shazaaam! + X button would not be used or connected at all in this mode.  IMHO, this is the least desirable configuration of the KeyWiz.  You still have to remember the combinations, and you are also much more likely to “accidentally” send a shifted input.  I would only recommend using this mode if 1) you absolutely want the minimum number of buttons on your panel, or 2) you are replacing an I-PAC or have a friend’s cab with one and want to mimic it’s controls as closely as possible.  Here is how to set it up:  Using  RandyT's adapters or two diodes (note polarity), wire one button up to both the Shazaaam! input and the input that we want to shift.  For example, we can use Terminal I which is P1 Start.  Now set the KeyWiz so the Shifted P1 Start sends “1”.   Now when this button is pressed, it sends the KeyWiz into shift mode and sends “1” (P1 Start in MAME).  Pressing this button and any other button will cause that button to send it’s shifted input.

Consideration 1 - I said earlier the KeyWiz had 32 inputs plus the Shift function.  It looks like this method drops us down to 32 inputs including the shift function, correct?  No!  Consider the example above; we no longer need for Terminal I (unshifted) to send “1” since that in now done with the shifted button.  So we can reprogram the KeyWiz to send a different input for Terminal I.  Now we wire a button to this and we are back to 32 inputs plus Shift.

Consideration 2 - This mode is not identical to the I-PAC in that you are now sending the 1P Start Input (keycode 1) along with the Shifted Input whenever the key is pressed.  The I-PAC would only send the shifted input.  In the real world, this would rarely have an impact, but I thought it should be mentioned.

Consideration 3 - If the P1 Joystick is accidentally moved left of right while the Shazaaam! (or P1 Start, in this case) button is pressed, the KeyWiz will load an alternate codeset.  If you would like to prevent this, see this page.

Stealth Mode - This is an extension of the concept above; however, instead of having one button send a shifted input which we can then use to send shifted inputs when another button is pressed, we simply use multiple buttons to send multiple individual shifted inputs.  This is shown on the right side as the Advanced Method and could be expanded to use more than two buttons.  For example, we program the KeyWiz so that Terminal I shifted is Tilde, and Terminal K shifted is Start 4 (4).  Now we use two of  RandyT's adapters (or four diodes) and connect one between Shazaaam! and Terminal I and wire it to a button and connect the other one between Terminal K and Shazaaam! and wire it to a button with the four little people on top of it.  Now we can press these buttons and they will always send the corresponding Shifted codes.  In theory, we could use this method to add up to 24 additional buttons to our control panel.

Considerations - This has the advantage that we can have additional inputs on the control panel, and not have to worry about which key combination to press to activate the shift function.  The button acts like an additional input.  Did we really gain 24 more inputs?  No!  Remember that pressing a shifted button causes all the buttons to send their shifted inputs.  Using the example above, remember that by default Terminal I (unshifted) is P1 Start.  Now let’s assume that Player 4 presses his Start button (shifted Terminal K) and Player 1 presses his Start button before Player 4 releases his.  When Player 1 presses his button, the KeyWiz will send shifted Input I and call up the Tilde menu.  Also, since the joysticks don't register when a shifted input is pressed, neither players character will move on screen until the Player 4 Start button is released.  Even worse, if one of these buttons is pressed while Joystick 1 is moved right or left, the KeyWiz will load a completely different codeset (unless this is disabled as shown on this page).


After the initial release of this page, Andy Warne pointed out that an effect similar to the KeyWiz Stealth Mode can be achieved with the I-PAC series of encoders.  Andy's circuit is shown here, and repeated below:

extra_shift.jpg (32180 bytes)

There are a couple of points to note between the KeyWiz and I-PAC circuits.  First, the I-PAC circuit is more complicated and expensive to build (although with are talking about dime components here), the I-PAC circuit requires a capacitor, resistor, and diode per input instead of just two diodes.   The I-PAC circuit requires a capacitor, resistor, and two diodes per input for multiple inputs.   Also, there is a time delay built into this circuit which is not present with the KeyWiz.  (Presumably, this is minimized by the choice of component values.)   Finally, the same restrictions mentioned above about a shifted input shifting all other inputs also applies.  And again, using this method still leaves you with 27 action buttons and 27 shifted inputs.

I was not sure if this method could be applied to more than one input, but SoundDoc posted the following on BYOAC:

"Just my quick  2 cents, Andy's extra button shift works great, I have 28 additional inputs at my disposal for "extra" things. Just to help, here's the protoboard layout I used (just keep adding parts for more inputs) use the res/cap values on his page and you'll be fine. Red lines are "traces" you need to make on the backside of the protoboard, the rest is just components. The circles are just used hole locations.  This is just a quick cut out of a much larger control board I'm building up for my cab, if you need values etc, let me know and I'll throw them on."

NOTE: Again - SoundDoc has 27 additional inputs, because the Shift button cannot send a shifted output.  SoundDoc's circuit is shown below:

shift_circuit-Layout1.jpg (23133 bytes)

Click the image to enlarge


I stated previously that the I-PAC circuit is more complicated and expensive to build, and while that may have sounded like empty rhetoric, I would like to re-visit that statement in depth. Let's assume that I wish to add 8 more inputs (four coin and four start), which is about the maximum I would feel comfortable about adding.

With the KeyWiz, I can do this using RandyT's adapters and no soldering for $1.50 each or $12.00 additional.  If I use bulk diodes and two 16-terminal terminal blocks, I can reduce the cost to less than $6.00 (if I shop carefully) still with no soldering required.

With the I-PAC, it's not so much a matter of component cost, as it is one of complexity.  Because of the number of components involved, you are almost left with the prospect of soldering the components to a project board to make an expansion board for the additional inputs.  While the cost of this is not much more than the $10 quoted above, the skills required are beyond the average hobbyist, and if they were not, the average hobbyist could just as easily end up adding a keyboard hack for the additional inputs.  Alternatively, a KeyWiz Eco could be used in conjunction with the I-PAC, or if this were planned from the beginning and the soldering skills were not available, you would be better off spending the same price difference as the cost of the KeyWiz ECO to get an I-PAC/4.

Fact is the KeyWiz stands to gain more from this method than the I-PAC does.  Oddly enough, it benefits more for two opposing reasons: A more flexible shift routine, and a less expandable interface.   Lets look at each issue:

More flexible shift routine:   Because of the way the KeyWiz set up it's shift routine, all 32 inputs are available as action keys.  This means that it is absolutely possible to support 4-player 4-button games with shifted inputs for Coin and Start.  The KeyWiz works even better for 4-player 3-button games with dedicated buttons for Pause and Escape (and two other functions) and shifted inputs for coin and Start.  On the other hand, if you are using shift functions, the I-PAC/2 (J-PAC, Mini-PAC) only has 27 inputs, so the best you can do is 4-player, 2-button games.  The I-PAC VE fares a little better, but not as well as the KeyWiz.  With 31 action inputs, it can support 4-player 3-button games with dedicated Pause and Escape (and one additional input), but 4-player 4-button games are not possible.

Less expandable interface:  OTOH, the I-PAC is much easier to use in conjunction with a keyboard hack or even a second encoder using the encoder in USB mode or using the keyboard pass-through.  In contrast, the KeyWiz is PS/2 only and has a switched keyboard pass-thru.  This means that if you purchased a KeyWiz and discovered that you needed additional inputs, your only options are the stealth-shifted inputs as shown above, using an I-PAC series encoder in USB mode in conjunction with the KeyWiz, or possibly hacking a USB keyboard or gamepad to use in conjunction with the encoder.  NOTE: Because of technical issues, a USB keyboard hack is not acceptable as a primary interface, however it should be suitable for adding a couple of auxiliary inputs.


I generally try to avoid or minimize the use of Shift keys for the reasons shown above.  In any case, they should only be used for admin and coin/select functions, and never for action keys for the reasons shown above.

Be especially careful with Pause and Escape.  These are useful keys to have on a panel, but not necessarily something you want to dedicate an input to, so they are likely candidates for the shift function.   But remember that any Shifted input will cause all other keys to send their Shifted inputs, so it is quite possible to inadvertently end your game by accidentally sending a shifted ESC code.  Generally, I don't mind using shift keys for ESC and Pause if the other shift keys will rarely be activated (Tab, Tilde, F11, F10, Etc.).  If I have other shift keys that will be used during gameplay (Coin Inputs, Start Keys, etc.) then I recommend either having dedicated Pause and Escape inputs, or mapping Pause and Escape to the combined joystick directionals as shown on this page.

I agree with a recommendation made by _Iz- of BYOAC that any buttons which will not be used in a shifted manner be set to send the same code when they are shifted or unshifted.  This way pressing the shift button and then the button will not cause something unexpected to happen.

As stated above, the KeyWiz will load an alternate code set when the Player 1 Joystick is moved left or right with the Shazaaam! key depressed.  If you will make extensive use of the KeyWiz shift function (particularly in Stealth or I-PAC Compatibility mode), and either use one application exclusively, or don’t mind using batch files to load an alternate codeset, I recommend you disable this feature as shown here.

Eightbit of BYOAC and others have pointed out that the same functionality is available in MAME (R36B12 and up).  For example, if you program MAME so that UI CANCEL (Escape) is mapped to “1 AND 2” you get the same functionality as the I-PAC default set-up.  (With the same limitations as shown above, i.e. MAME will receive keycode 1 and process it before receiving keycode 1 and 2 and ending).  Also, this is only useable in an emulator like MAME that allows key combinations for inputs, whereas shift functions on an encoder are useable with any program.

In addition, you can avoid using Shift keys for Start buttons, by using the method shown here, and you can get four more inputs out of your encoder (in MAME) using the method shown here.