Revision
1.5 – 29th Jan
2013 www.touch-base.com\documentation\general UPDD mouse emulation |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Most pointer
devices emulate the actions of the mouse; pen down, cursor movement, pen up
to generate left clicks, right clicks, double clicks etc. These actions have to be derived from the
triggers generated from the pointer device. In the case of a standard single
stylus touch screen these triggers are initial touch, movement, stationary
touch and last touch - effectively a complete touch sequence. There can also
be pressure and dual touch triggers. Important note: It is important
to note that the driver’s mouse emulation settings are only active if the
driver is responsible for mouse emulation via the system’s mouse interface
when using single touch. Any alternative touch interface, such as Windows 7 /
8 extended touch or Mac OS X gestures will dictate the single touch mouse
emulation performed. Emulation Modes
With UPDD version 3 we
had 15 mouse emulation modes. Many
customers suggested we had too many settings in version 3 and part of the
version 4 remit was to simplify the GUI and the settings. As part of this
simplification process we reduced the number of listed emulation modes to 4
and renamed them in the process as shown below:
Although the logic
remains in the V4 driver to support all the above emulation modes we have only
exposed the new names in the UPDD Console program to simplify the end user
manual selection: The driver can actually hold
two emulation modes against each touch device for each Event
that can occur on a device; the Primary
click mode and an alternative or Secondary
click mode that can be switched to as required. The UPDD Console, Click Mode dialog (shown
above) shows the Primary click mode setting for the default
event. UPDD V3 Console did
show/allow update of all primary and secondary click modes for all events but
it was such a rarely used function we have removed it under version 4 as part
of the simplification process. As standard the UPDD
driver will be supplied with the primary click mode set to ‘Click then drag’
or ‘Interactive touch’ and the secondary click mode set to ‘Touchdown Right’
but other default modes can be defined if required. Changing the primary and secondary click modes
There are various ways to
change the primary and secondary click modes as follows:
Switching between primary and secondary modes
Once the required primary
and secondary click modes are defined the user/system can switch between the
two click modes as follows: An Event Selector utility is
supplied to allow an end user to switch between click modes. Application Programming Interface An application can call the TBApiSetEventSelectorState(n)
to switch to the primary or secondary modes. n = 0 = Primary, n = 1 = Secondary as required. Mouse Emulation Notes
These notes are referenced
from within this document and should be read in context with the associated
point of reference: Events
An Event refers to the
triggers on a touch device that can be associated with a click mode. In 99% of cases a touch device has the UPDD
default event defined and no others. This is configured in the UPDD
controller database for a given controller as follows: The default event is the
touching of the device and has two trigger points. One, when the stylus
contacts the touch screen for the first time and the other when it leaves the
touch screen for the last time. This
allows for the click modes to be associated with these default event trigger
points. E.g. Pen down on contact, pen up on last touch. However, a touch device
may generate a number of events that can be used as triggers for mouse
emulation actions. Take for example a
PS/2 touch controller that allows a real PS/2 mouse to piggy back on the
touch controller and deliver both touch and mouse packets to the driver. The driver would also receive the mouse
data packets that carry left and right button click data. In this case the controller would be
configured in UPDD for the default touch event but also the Left and Right
button events as shown below: In this example, the
controller will send both data packets to the driver; Mouse and Touch. The
mouse packet shows where the L (Left button) and R (Right button) are defined
in the incoming data stream and when they are set (=1) then the driver will
perform the click mode associated with the L binding. Depending on the event selector setting the
Primary or Secondary/Alternative click mode will be performed. Settings
UPDD settings are held in
the system at various places depending on OS and UPDD release as shown:
For Windows 4.1.x the click
mode settings are held in the .INI file [updd\parameters\N] section For Windows 4.0.x the
click mode settings are held in the registry / registry file at the
[updd\parameters\{..}\N] branch where N = the device handle, normally 1 for
the first device, 2 for the second device etc and are named event bind n=Bind name event mode n=Primary Click Mode event alt mode n=Secondary Click Mode event name n=Event Name These set of click mode
settings will be present for each device event [1] defined where n = 0 for the first event defined, 1
for the second event defined etc. It is VERY unlikely that the name or bind
setting will need to be changed, only the primary and secondary click mode
names. Valid names are listed in the “UPDD Mouse Click Mode emulation names
table above”. Important: These settings
still utilise the UPDD version 3 click mode names. Example A device is defined in
UPDD with one Event, being the default touch event This will result is the
following settings: event bind 0=DFLT event mode 0=Touchdown
Left event alt mode
0=Touchdown Right event name 0=Default For UPDD 4.1.x and above
only update these settings via the UPDD Advance Console, command line user interface or the
TBAPISetSettingsSZ API function call. To manually update the settings via an
alternative method, stop the driver (Net Stop tbupddwu), make the change and
then either restart the driver to reread the settings (Net Start tbupddwu) or
reboot the system. If changing either mode
to Interactive Touch, the right click is generated after the stylus has been
held steady for a period of time at dictated by the setting “interactive
touch time”, where: interactive touch
time=0x00000001 = fastest (right click almost immediately) interactive touch
time=0x00000064 = Slowest (right click after about 3 or 4 seconds) This setting is
effectively ‘Click Down and Drag’ but with the right button down. Mouse click UPDD API interface
The UPDD API provides
callbacks to indicate mouse events (up / down) by registering the appropriate
callback type, as follows: #define
_ReadDataTypeEvent 0x0002 // button
state changes TBApiRegisterDataCallback
{Parameters} Related Mouse emulation system and UPDD settings
There are a number of system or UPDD settings that can affect the
performance of mouse emulation as follows:
ContactFor further information or technical assistance please email the technical support team at technical@touch-base.com |