GetTouchDeviceIndices

>Psychtoolbox>PsychHardware

[touchIndices, productNames, allInfo] = GetTouchDeviceIndices([typeOnly][, touchTypeOnly][, productName][, serialNumber][, locationID])

Return ‘touchIndices’ a set of handles to select touch input devices
like touchscreens, tablets and touchpads for touch input with the
TouchXXX functions (TouchQueueCreate.

Also returns corresponding productNames for the devices and detailed
info in the allInfo struct-array.

WINDOWS: ________________________________________________________________

This function currently returns nothing, as touch devices aren’t yet
supported.

OS X: ___________________________________________________________________

This function currently returns nothing, as OSX does not support touch
screens in a meaningful way as far as we know. And Psychtoolbox for OSX
currently does not implement any special support for touchpads or such.

LINUX: __________________________________________________________________

GetTouchDeviceIndices allows selection of different types of touch devices
via the optional ‘typeOnly’ argument:
‘masterPointer’ will only return indices of so called “master pointer”
devices. These correspond to visible mouse cursors. ‘slavePointer’ will
only return indices of slave pointer devices. Often only ‘slavePointer’
devices work properly or with full functionality for touch devices, that’s
why typeOnly defaults to ‘slavePointer’ if the argument is omitted.

_________________________________________________________________________

If you have touch devices connected you can restrict the set of
returned devices by specifying the following optional match-critera:

typeOnly = ‘masterPointer’ or ‘slavePointer’ or ‘allPointers’. If left
out, this will default to ‘slavePointer’.

touchTypeOnly = 0 for touchpads, 1 for true touchscreens.

product = Product name of target devices, as returned in ‘productNames’.

serialNumber = Serial number of target devices. This is a text string,
not a number!

locationID = Numeric id of where the device is connected to the
computer. The number is supposed to be unique for a given
connection port. E.g., the same number will be returned
whenever the device is connected to the same USB port of
the computer. The value should be persistent across
reboots of the machine, but may not be persistent across
operating system upgrades - or may not be persistent at
all in case of os bugs. Your mileage may vary…
__________________________________________________________________________________
see also: GetKeyboardIndices, GetKeypadIndices, GetGamepadIndices, GetMouseIndices

Path   Retrieve current version from GitHub | View changelog
Psychtoolbox/PsychHardware/GetTouchDeviceIndices.m