Copyright 6 Vista 7 new! Languages 8 Glovepie scripts 9

Download 489 Kb.
Size489 Kb.
1   ...   9   10   11   12   13   14   15   16   ...   30

NEW! Touchpad

The touchpad can be read as a mouse. But if you’re the kind of person who thinks a touchpad is just a mouse, GlovePIE isn’t for you.

A touchpad can measure the absolute position of your finger, and how hard you are pushing it. It also normally comes with buttons. Mine has a LeftButton, RightButton and a DPad in the middle.
GlovePIE can only read Synaptics brand touchpads. They are the most common.
Touchpad.FingerPresent is true when your finger is touching the touchpad, and false when it is not.
Touchpad.x is the horizontal position of your finger. It is between 0 and 1. The right hand edge will be 1. If your finger is not touching the touchpad it will be the same position as last time you touched it.
Touchpad.y is the vertical position of your finger. It is between 0 and 1. It is 0 at the top, and 1 at the bottom. If your finger is not touching it, it will remember the last position.
Touchpad.z and Touchpad.w are how hard you are pushing down with your finger. It is NOT between 0 and 1. W and Z both measure almost the same thing, but they are in different units. Z is much more precise. Sometimes it will be slightly above zero even when you are not touching the touchpad.
Warning! Touchpads don’t bend when you push them, your finger does! Touchpads are a solid object that measures how much electricity your finger can store. That changes depending on how much of your finger is touching the touchpad, and how squashed your finger is.
Touchpad.LeftButton is the touchpad’s left “mouse” button. It does not include left-clicks caused by taps. Touchpad.RightButton is the touchpad’s right “mouse” button. Touchpad.MiddleButton is the touchpad’s middle mouse button, which may or may not exist.
If your touchpad has a DPad between the left and right buttons (for scrolling) like mine, then you can use the Touchpad.DPadUp, Touchpad.DPadDown, TouchPad.DPadLeft, and Touchpad.DPadRight buttons. It is possible for DPadUp and DPadDown to both be true if you push the whole DPad in, and the same goes for DPadLeft and DPadRight.
Your touchpad might also have other Up and Down buttons. Mine doesn’t. They will be touchpad.UpButton and touchpad.DownButton.
If you want your touchpad to stop controlling the mouse, you need to set Touchpad.swallow = true. Then only GlovePIE, and other programs that know how to read a touchpad will read it.
If your touchpad can work with a stylus then you can read touchpad.StylusPresent to detect when the stylus is touching it. Mine doesn’t work with a stylus.
There are also some other touchpad values you can experiment with.


You can read or write to the keyboard using the keyboard object, or just by using the name of the key without anything in front of it.

You can emulate keys that don’t actually exist on your keyboard if you want. For example the multimedia keys, or the Excel key, etc.
NEW! Keyboard emulation will now trigger the auto-repeat you normally get when you hold down a key on a real keyboard. Although you can disable this if you want. To disable it, set:

Keyboard.RepeatFakeKeys = False

Normally a keyboard will only repeat the most recent key that you pressed. GlovePIE will simulate that same behaviour by default. If you hate that feature, and wish you could move diagonally in Notepad by holding two keys at once, you can disable it like this:
Keyboard.RepeatMultipleFakeKeys = False
By default GlovePIE will use the same key repeat rate as your real keyboard. But you can tell GlovePIE to repeat keys at a different rate if you prefer:
Keyboard.RepeatRate = 10 Hz
It is measured in Hz (Hz just means times per second).
Like a real keyboard, keys don't start repeating until after a delay. After the delay it will start repeating. You can set the delay like this:
Keyboard.RepeatDelay = 0.4 seconds
NEW! A very cool feature is that you can now swallow keys. When you swallow keys, other programs will not be able to read them. Only GlovePIE will be able to read them.
For example:
A = swallow(Left)

D = swallow(Right)

This means that when you press the Left arrow key the game won't receive the left arrow key, but it will receive the A key. If you didn't use swallow, the game would receive both the real key (Left) and the fake key (A).
If you have multiple keyboards, you can only swallow the key on all keyboards, not on specific keyboards. If you swallow a key on all keyboards, it is impossible for GlovePIE to tell which keyboard it came from.
Keyboard emulation doesn’t work as well on Windows 9x, because it won’t work in DirectInput games on 9x.
Keys can be either true or false. True when they are down and false when they are up. Some keys (like Pause) only tell you when they are pressed but not released, so the computer assumes they are released soon after.
Unless you are using Windows 9x, the keyboard keys will be the actual physical keys, ignoring whatever keyboard layout you are using.
Keyboard values, for example the F1 key can be set or read in various ways:


There are also special ways of writing key combinations:


Ctrl and C
Also most keys have multiple names, which include most of the abbreviations you see written on the keys, as well as the full names. So just the guess key names and you will be fine.

Special Keyboard Fields

You can read or set Keyboard.ScanCode or Keyboard.VK to get or set the scancode or the virtual key code of the key that is currently down. They will be 0 when no key is down.
You can read Keyboard.Row to find out the row of the key that is currently down. It returns -1 if no key is down, or if it has no well-defined position (like backslash).
You can read or set Keyboard.AnyKey to tell if any key is currently down.
Set Keyboard.RawInput to force GlovePIE to use RawInput instead of DirectInput for the keyboard.

Share with your friends:
1   ...   9   10   11   12   13   14   15   16   ...   30

The database is protected by copyright © 2019
send message

    Main page