Help, Undo, Redo, New, Open, Close, Reply, Forward, Send, Spell, Save, Print These all work in GlovePIE, but they don’t tell you when they are released.
The MyDocuments key doesn’t work!!! It doesn’t seem to have a scancode, or an AppCommand, so GlovePIE can’t detect it or trigger it, and doesn’t even list it. Messenger doesn’t seem to work either.
MyPictures, MyMusic, Mute,
PlayPause, MediaStop, VolumeUp, VolumeDown, PrevTrack, NextTrack, MediaSelect,
Mail, WebHome, Messenger, Calculator, LogOff, Sleep Note that the MyPictures, MyMusic, and LogOff keys can’t be read properly.
The PlayPause, MediaStop, PrevTrack, and NextTrack keys only work for the correct duration if you have XP and your script includes multiple keyboards, or enables RawInput. For example:
key.RawInput = true
debug = PlayPause
Will show correctly when the PlayPause key is released.
MyMusic is the same key as OfficeHome. Intellitype needs to be set up with the correct keyboard type to perform the correct action.
NEW! Acer laptop Euro and Dollar keys
If you have an Acer laptop, you can now use the Euro and Dollar keys (near the arrow keys). But they only work if you exit or disable the Launch Manager program.
ppjoy.digital0 = Euro
ppjoy.digital1 = Dollar
Emulating these new keys will not type a euro or dollar sign, although some games may allow them to be used as game keys. To type a dollar sign, use Unicode0024. To type a Euro sign, use Unicode20AC. This is not a new feature.
Unicode0024 = Wiimote.A
Unicode20AC = Wiimote.B
Other keys can be specified by their names or by their hexadecimal scan codes, like this:
Left, Right or Don’t Care
Keys with Left or Right versions, like Shift or Control, can be specified like this:
If you want to emulate a joystick with PIE, you need to download and install PPJoy. Download it from http://www.geocities.com/deonvdw/PPJoy.htm
You then need to configure PPJoy to add a virtual joystick or two. Go to “Parallel Port Joysticks” in Control Panel (or the CP-Settings menu of GlovePIE), and choose “Add”. Then under “Parallel Port” choose “Virtual joystick” and under “Controller Number” choose a number between 1 and 16, which will be the number of the Virtual Joystick. It’s best to start with 1.
Then you need to create a custom mapping for the virtual joystick. Choose the number of Axes (I recommend 8), the number of buttons (I recommend 32), and the number of POV hats (I recommend 2). Then you need to set which axes you want the 8 available axes to be. Then click next and choose which analog axes you want to correspond to those axes. The analog values are how you set that axis in PIE, just choose any numbers here, but remember them later. I recommend using analog 0 to analog 7. Then click next.
Then choose which digital values you want to correspond to the first 16 buttons. I recommend 0 to 15. Then click next and set the next 16. Then set the two POV hats.
Once you have a Virtual Joystick set up in PPJoy, you can set its analog and digital values with PIE:
PPJoy1.analog0 = 0.5
PPJoy1.digital0 = true
Analog values can be between -1 and 1.
Digital values can be either true or false.
If you want to set “PPJoy Virtual Joystick 2” then set the values for PPJoy2.
“PPJoy” by itself without a number refers to “PPJoy Virtual Joystick 1”.
If the analog corresponds to an axis, then 0 is centred and -1 and 1 are the two extremes.
But if the analog corresponds to a a POV hat switch, then -1 corresponds to pushed at an angle of 0 degrees (forwards). -0.5 corresponds to 90 degrees (right). 0 corresponds to 180 degrees (backwards), 0.5 corresponds to 270 degrees (left) and 1 corresponds to centred.
Games which let you choose which joystick you use will need to be set to the appropriate PPJoy Virtual Joystick in the game. Other games which just use the default Joystick will require you to go to the Control Panel joystick settings (Use GlovePIE’s CP-Settings menu to get there quickly), and change the default joystick there.
If you want to control the game with a real joystick and just add some scripted actions to it, you will set the game or control panel to the virtual joystick and assign values from the real joystick to the PPJoy fields.
Joysticks, Game pads, Steering Wheels, and most other Direct Input devices that aren’t keyboards or mice, are considered to be Joysticks by GlovePIE.
If you want to read from a joystick you can use the Joystick object, but if you want to write to it, you need to use the PPJoy object.
Most fields of the Joystick are read-only, but the two joystick fields which you can set are the Vibration1 and Vibration2 fields. These are the force feedback on the two axes, and can be set to any value between -1 and 1. 0 is no effect. In this case the Joystick is acting as an output device. On a Gamepad, Vibration1 will be rumble, and Vibration2 will be buzz. On a real Joystick they will push the stick in a direction (I think).
The Joystick buttons are numbered 1 to 128. Most joysticks won’t have that many buttons though. You can read them with:
Joystick.Button1 to Joystick.Button128
You can tell how many axes the joystick has with the Joystick.NumberOfAxes value.
Each joystick axis has a value between -1 and 1.
The joystick axes are referred to as follows:
x = sideways position. -1 = left, 0 = centre, 1 = right
y = forwards/backwards position -1 = forwards, 1 = backwards
z = Right Analog stick forwards/backwards -1 = forwards, 1 = backwards
roll = joystick twist, or right analog stick left/right -1 = left, 1 = right
vx, vy, vz, vroll, vpitch, vyaw, vslider, vdial = Extra axes which DirectInput supports, supposedly for velocity (which seems kind of redundant), but could be anything. Not normally used. They don’t tell you the velocity on a normal joystick.
You can also read the axes as a vector:
Pos = [x, y, z]