blob: 1ebbc0bd12079654355bda70b1683ce4f5dbd3e2 [file] [log] [blame] [edit]
# -*- coding: utf-8 -*-
#
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
''' This configuration file consists of:
Some path definitions and parameters:
gesture_files_path: the path of the gesture files
trackpad_device_file: the trackpad device file
trackpad_drivers: possible trackpad drivers that may be used
xorg_log: the xorg log file
xcapture_timeout: the timeout if there are no more X events coming in
xcapture_max_post_replay_time: the max allowable duration after
the completion of device file playback
functionality_list: details the specific functionalities to be tested.
filename_attr: specifies the components to generate test file names
'''
''' Path definitions '''
# gesture_files_path: specify the directory of the test files
gesture_files_path = '/var/tmp/trackpad_test_data/test_files'
# The device file is used to record/replay trackpad device events.
# The device file is created by evdev.
# Priority about which trackpad device file to use:
# (1) Using the tradpad device if specified on trackpad_record command line
# (2) Probing the trackpad device in the system.
# (3) Using the trackpad device specified in the config file here.
# (4) Using the trackpad device hardcoded in trackpad_util module.
# Note that the path of the device file may vary from model to model.
trackpad_device_file = '/dev/input/event6'
''' Parameters to find trackpad driver '''
trackpad_drivers = ('cmt', 'multitouch', 'synaptics')
xorg_log = '/var/log/Xorg.0.log'
''' Parameters for Xcapture '''
xcapture_timeout = 1
xcapture_max_post_replay_time = 20
''' area: a broader category that several functionalities belong to.
E.g., area[0]: 1 finger point & click.
It consists of a short name and a long name.
'''
area = {
0: ('click', '1 finger point & click'),
1: ('select', 'Click & select/drag'),
2: ('right_click', '2 finger alternate/right click'),
3: ('scroll', '2 finger scroll'),
4: ('palm', 'Palm/thumb detection'),
5: ('settings', 'Settings'),
6: ('requirements', 'Requirements across all Chrome OS components'),
}
''' functionality_list: the list of test functionalities
A functionality is a TrackpadTestFunctionality class and has the
following attributes:
TrackpadTestFunctionality(
name: the name of the functionality,
e.g., any_finger_click, any_angle_click
subname: specifying variations of a particular functionality
e.g., physical means a physical click
tap means a tap to click
left means the left hand
right means the right hand
Note: a subname of the functionality no_min_width_click looks as
subname=(('physical', 'tap'),
('left', 'right'),
),
In this case, the variations of the file name include
no_min_width_click.physical.left-...
no_min_width_click.physical.right-...
no_min_width_click.tap.left-...
no_min_width_click.tap.right-...
description: the description of the functionality
prompt, subprompt: Prompt messages about a functionality and its
subname when recording
area: the area to which the functionality belongs,
e.g., '2 finger scroll'
criteria: configurable criteria associated with a functionality.
It includes
'max_movement': the max cursor movement allowed
examples 1: To specify movement no more than 5 pixels
'max_movement': 5,
examples 2: To specify no movement allowed
'max_movement': 0,
'button': the count of button events specified.
examples 1: To specify one left button click:
'button': ('Button Left', 1),
examples 2: To specify five left button click:
'button': ('Button Left', 5),
examples 3: To specify no button events at all:
'button': None,
weight: the weight of each functionality, used to calculate how well
a driver performs. This attribute is for future use.
enabled: True or False to indicate whether this functionality will be
used during recording or during the autotest.
files: the list of test files. Can be specific file names, or '*', or
something like 'two_finger_scroll.down-*'
e.g., for the functionality of 'any_finger_click',
Some possible specifications are:
- '*': matches all files 'any_finger_click*':
- 'any_finger_click.tap.*'
- 'any_finger_click.physical.left.*'
- 'any_finger_click.physical.right.4-alex-john-*.dat'
),
'''
# the min distance of single drag gesture
select_drag_distance = 20
# the allowable max cursor movement during a click
click_movement = 5
# the allowable max cursor movement during palm contact
palm_movement = 5
# the ratio between the movement of the two axises
# E.g., if your finger is tracking left, y_move / x_move <= move_ratio.
move_ratio = 0.15
# max accumulated motion allowed in between button events
max_motion_mixed = 10
# max accumulated button wheel events allowed
max_button_wheel_mixed = 15
functionality_list = [
### Area 0: 1 finger point & click
TrackpadTestFunctionality(
name='any_finger_click',
subname=(('physical_click', 'tap'),
('left', 'right'),
('0', '1', '2', '3', '4'),
),
description='Any finger, including thumb, can click',
prompt='{0} exactly one time using the {2} of your {1} hand.',
subprompt={
'physical_click': ('Make a physical click',),
'tap': ('Make a tap to click',),
'left': ('left',),
'right': ('right',),
'0': ('thumb',),
'1': ('index finger',),
'2': ('middle finger',),
'3': ('ring finger',),
'4': ('pinky',),
},
area=area[0],
criteria={
'total_movement': ('Motion', '<=', click_movement),
'button': ('Button Left', '==', 1),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='any_angle_click',
subname=(('physical_click', 'tap'),
('left', 'right'),
('0', '45', '90', '135', '180'),
),
description='Finger can be oriented at any angle relative to '
'trackpad',
prompt='{0} exactly one time using any finger of your {1} hand '
'at {2} degree with the horizontal axis.',
subprompt={
'physical_click': ('Make a physical click',),
'tap': ('Make a tap to click',),
'left': ('left',),
'right': ('right',),
'0': (0,),
'45': (45,),
'90': (90,),
'135': (135,),
'180': (180,),
},
area=area[0],
criteria={
'total_movement': ('Motion', '<=', click_movement),
'button': ('Button Left', '==', 1),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='any_location_click',
subname=(('physical_click', 'tap'),
('left', 'right'),
('up', 'middle', 'bottom'),
),
description='Click can occur at any location on trackpad '
'(no hot zones)',
prompt='{0} exactly one time using any finger of your {1} hand '
'in the {2} part of the trackpad.',
subprompt={
'physical_click': ('Make a physical click',),
'tap': ('Make a tap to click',),
'left': ('left',),
'right': ('right',),
'up': ('upper',),
'middle': ('middle',),
'bottom': ('bottom',),
},
area=area[0],
criteria={
'total_movement': ('Motion', '<=', click_movement),
'button': ('Button Left', '==', 1),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='no_min_width_click',
subname=(('physical_click', 'tap'),
('left', 'right'),
),
description='Single finger click should not have a defined minimum '
'width (i.e. click possible with finger tip and/or '
'fingernail)',
prompt='{0} exactly one time using the finger tip (fingernail) of '
'your {1} hand.',
subprompt={
'physical_click': ('Make a physical click',),
'tap': ('Make a tap to click',),
'left': ('left',),
'right': ('right',),
},
area=area[0],
criteria={
'total_movement': ('Motion', '<=', click_movement),
'button': ('Button Left', '==', 1),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='no_cursor_wobble',
subname=(('physical_click', 'tap'),
('left', 'right'),
('5times',),
),
description='No cursor wobble, creep, or jumping (or jump back) '
'during clicking',
prompt='{0} using any finger of your {1} hand {2} times.',
subprompt={
'physical_click': ('Make a physical click',),
'tap': ('Make tap to clicks',),
'left': ('left',),
'right': ('right',),
'5times': (5,),
},
area=area[0],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Left', '==', 5),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='drum_roll',
subname=('l0r1', 'l1r1', 'r0r1', 'r1r2'),
description='Drum roll: One finger (including thumb) touches '
'trackpad followed shortly (<500ms) by a second finger '
'touching trackpad should not result in cursor jumping',
prompt='Use the {0} of your {1} hand touching trackpad followed '
'shortly (<500ms) by the {2} of your {3} hand touching trackpad',
subprompt={
'l0r1': ('thumb', 'left', 'first finger', 'right'),
'l1r1': ('first finger', 'left', 'first finger', 'right'),
'r0r1': ('thumb', 'right', 'first finger', 'right'),
'r1r2': ('first finger', 'right', 'middle finger', 'right'),
},
area=area[0],
criteria={
'total_movement': ('Motion', '==', 0),
'button': None,
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='2fscroll_1fclick',
subname=('up', 'down', 'left', 'right',),
description='2f scroll. Stop scrolling, then raise one finger. Click '
'with finger remaining on trackpad. Single finger click '
'should result.',
prompt='Two finger scroll {0}. Lift one of the finger. '
'The other finger make a physical click.',
subprompt={
'up': ('up',),
'down': ('down',),
'left': ('left',),
'right': ('right',),
},
area=area[0],
criteria={
'total_movement': ('Motion', '<=', click_movement),
'sequence': (('Button Wheel', '>=', 1),
('ButtonPress', 'Button Left'),
('ButtonRelease', 'Button Left'),
),
},
weight=1,
enabled=True,
files=('*',
),
),
### Area 1: Click & select/drag
TrackpadTestFunctionality(
name='single_finger_select',
subname=(('physical_click', 'tap_and_half'),
('left', 'right', 'up', 'down'),
),
description='(Single finger) Finger physical click or '
'tap & a half, then finger - remaining in contact '
'with trackpad - drags along surface of trackpad',
prompt='Use any finger to make {0} and drag {1} along half of the '
'surface of the trackpad.',
subprompt={
'physical_click': ('physical click',),
'tap_and_half': ('tap & a half',),
'left': ('left',),
'right': ('right',),
'up': ('up',),
'down': ('down',),
},
area=area[1],
criteria={
'sequence': (('Motion', '<=', click_movement),
('ButtonPress', 'Button Left'),
('Motion_x_or_y', '>=', select_drag_distance),
('ButtonRelease', 'Button Left'),
('Motion', '<=', click_movement),
),
'move_ratio': move_ratio,
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='single_finger_lifted',
subname=(('left', 'right', 'up', 'down'),
),
description='(Single finger) If finger leaves trackpad for only '
'800ms-1s, select/drag should continue',
prompt='Use any finger to make tap & a half and drag {0} along '
'half of the surface of the trackpad. Lift your finger '
'no more than 800ms-1s and drag {0} again along half of '
'the surface.',
subprompt={
'left': ('left',),
'right': ('right',),
'up': ('up',),
'down': ('down',),
},
area=area[1],
criteria={
'sequence': (('Motion', '<=', click_movement),
('ButtonPress', 'Button Left'),
('Motion_x_or_y', '>=', select_drag_distance),
('NOP', '1st Finger Lifted'),
('Motion_x_or_y', '>=', select_drag_distance),
('ButtonRelease', 'Button Left'),
('Motion', '<=', click_movement),
),
'move_ratio': move_ratio,
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='two_fingers_select',
subname=(('physical_click', 'tap_and_half'),
('left', 'right', 'up', 'down'),
),
description="(Two fingers) 1st finger click or tap & a half, "
"2nd finger's movement selects/drags",
prompt='Use 1st finger to make {0}, and 2nd finger to drag {1} along '
'half of the surface of the trackpad.',
subprompt={
'physical_click': ('physical click',),
'tap_and_half': ('tap & a half',),
'left': ('left',),
'right': ('right',),
'up': ('up',),
'down': ('down',),
},
area=area[1],
criteria={
'sequence': (('Motion', '<=', click_movement),
('ButtonPress', 'Button Left'),
('Motion_x_or_y', '>=', select_drag_distance),
('ButtonRelease', 'Button Left'),
('Motion', '<=', click_movement),
),
'move_ratio': move_ratio,
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='two_fingers_lifted',
subname=(('physical_click', 'tap_and_half'),
('left', 'right', 'up', 'down'),
),
description='(Two fingers) Continues to drag when second finger '
'is lifted then placed again.',
prompt='Use 1st finger to make {0}, and 2nd finger to drag {1} along '
'half of the surface of the trackpad. Lift your finger for '
'a while and then drag {1} again along half of the surface.',
subprompt={
'physical_click': ('physical click',),
'tap_and_half': ('tap & a half',),
'left': ('left',),
'right': ('right',),
'up': ('up',),
'down': ('down',),
},
area=area[1],
criteria={
'sequence': (('Motion', '<=', click_movement),
('ButtonPress', 'Button Left'),
('Motion_x_or_y', '>=', select_drag_distance),
('NOP', '2nd Finger Lifted'),
('Motion_x_or_y', '>=', select_drag_distance),
('ButtonRelease', 'Button Left'),
('Motion', '<=', click_movement),
),
'move_ratio': move_ratio,
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='two_fingers_no_delay',
subname=('left', 'right', 'up', 'down'),
description='(Two fingers) Drag should be immediate (no delay '
'between movement of finger and movement of '
'selection/drag)',
prompt='Use 1st finger to click and hold, use 2nd finger to '
'drag {0}, and then release two fingers.',
subprompt={
'left': ('left',),
'right': ('right',),
'up': ('up',),
'down': ('down',),
},
area=area[1],
criteria={
'sequence': (('Motion', '<=', click_movement),
('ButtonPress', 'Button Left'),
('Motion_x_or_y', '>=', select_drag_distance),
('ButtonRelease', 'Button Left'),
('Motion', '<=', click_movement),
),
'delay': 0.2,
'move_ratio': move_ratio,
},
weight=1,
enabled=True,
files=('*',
),
),
### Area 2: 2 finger alternate/right click
TrackpadTestFunctionality(
name='x_seconds_interval',
subname=(('0.3', '1', '3'),
),
description='1st use case: 1st finger touches trackpad, '
'X seconds pass, 2nd finger touches trackpad, '
'physical click = right click, where X is any '
'number of seconds',
prompt='1st finger touches trackpad, wait {0} seconds, and then '
'2nd finger touches trackpad. Lift two fingers together.',
subprompt={
'0.3': ('0.3',),
'1': ('1',),
'3': ('3',),
},
area=area[2],
criteria={
'total_movement': ('Motion', '<=', click_movement),
'button': ('Button Right', '==', 1),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='roll_case',
subname=('300',),
description='2nd use case ("roll case"): If first finger generates a '
'click and second finger "rolls on" within 300ms of first '
'finger click, an alternate/right click results.',
prompt='1st finger generates a click, and 2nd finger rolls on '
'within {0} milliseconds. Lift two fingers together.',
subprompt={
'300': ('300',),
},
area=area[2],
criteria={
'total_movement': ('Motion', '<=', click_movement),
'button': ('Button Right', '==', 1),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='one_finger_tracking',
subname=('left', 'right', 'up', 'down'),
description='1 finger tracking, never leaves trackpad, 2f '
'arrives and there is a click. Right click results.',
prompt='1st finger drags {0} along half of the surface of trackpad, '
'never leaves trackpad, and then the 2nd finger arrives and '
'make a click. Lift two fingers together.',
subprompt={
'left': ('left',),
'right': ('right',),
'up': ('up',),
'down': ('down',),
},
area=area[2],
criteria={
'sequence': (('Motion', '>=', select_drag_distance),
('ButtonPress', 'Button Right'),
('Motion', '<=', click_movement),
('ButtonRelease', 'Button Right'),
('Motion', '<=', click_movement),
),
'move_ratio': move_ratio,
},
weight=1,
enabled=True,
files=('*',
),
),
### Area 3: 2 finger scroll
TrackpadTestFunctionality(
name='near_parallel',
subname=(('up', 'down', 'left', 'right'),
('parallel', '45',),
),
description='1st: Two fingers moving near parallel result in scroll',
prompt='Use a finger of your left hand and a finger of your right '
'hand with two fingers about 1 cm apart. Scroll {0} across '
'half of the trackpad with two fingers moving {1}',
subprompt={
'up': ('up',),
'down': ('down',),
'left': ('left',),
'right': ('right',),
'parallel': ('in parallel',),
'45': ('far away with an angle about 45 degrees.',),
},
area=area[3],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Wheel', '>=', 10),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='2nd_finger_vertical',
subname=('up', 'down'),
description='2nd: 1st finger contacts trackpad, 2nd finger '
'moves vertically and scroll mirrors that movement',
prompt='Touch the trackpad with one finger, and use 2nd finger '
'to move {0} across half of the trackpad.',
subprompt={
'up': ('up',),
'down': ('down',),
},
area=area[3],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Wheel', '>=', 10),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='2nd_finger_horizontal',
subname=('left', 'right'),
description='2nd: 1st finger contacts trackpad, 2nd finger '
'moves horizontally and scroll mirrors that movement',
prompt='Use a finger contacts the trackpad, and use 2nd finger '
'to move {0} across half of the trackpad.',
subprompt={
'left': ('left',),
'right': ('right',),
},
area=area[3],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Wheel', '>=', 10),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='exclude_thumb',
subname=('up', 'down', 'left', 'right',),
description='Test that finger exclude thumb in scroll',
prompt='Use a finger of your one hand contacts the bottom of '
'the trackpad, and use two fingers of the other hand '
'to scroll {0} across half of the trackpad.',
subprompt={
'up': ('up',),
'down': ('down',),
'left': ('left',),
'right': ('right',),
},
area=area[3],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Wheel', '>=', 10),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='finger_spacing',
subname=(('up', 'down',),
('close', 'proper', 'distant',),
),
description='Scroll should occur regardless of spacing '
'(close or distant) between fingers',
prompt='Use two fingers {1} to scroll {0} across half of '
'the trackpad.',
subprompt={
'up': ('up',),
'down': ('down',),
'close': ('contacting together',),
'proper': ('spacing naturally in your own way',),
'distant': ('spacing far on two sides of the trackpad',),
},
area=area[3],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Wheel', '>=', 10),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='reflect_vertical',
subname=('up', 'down',),
description='Vertical scroll, reflecting movement of finger(s)',
prompt='(1) Use two fingers to scroll {0} slowly for about 4 '
'seconds. Lift the fingers.\n '
'(2) Use two fingers to scroll {0} again at a medium speed '
'for about 1~2 seconds. Then lift fingers.\n '
'(3) Use two fingers to scroll {0} again at a fast speed '
'for less than 0.5 seconds. Then lift fingers. ',
subprompt={
'up': ('up',),
'down': ('down',),
},
area=area[3],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Wheel', '>=', 10),
'wheel_speed': ('Wheel Speed Multiplier', '>=', 1.5),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='reflect_horizontal',
subname=('left', 'right',),
description='Horizontal scroll, reflecting movement of finger(s)',
prompt='(1) Use two fingers to scroll {0} slowly for about 4 '
'seconds. Lift the fingers.\n '
'(2) Use two fingers to scroll {0} again at a medium speed '
'for about 1~2 seconds. Then lift fingers.\n '
'(3) Use two fingers to scroll {0} again at a fast speed '
'for less than 0.5 seconds. Then lift fingers. ',
subprompt={
'left': ('left',),
'right': ('right',),
},
area=area[3],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Wheel', '>=', 10),
'wheel_speed': ('Wheel Speed Multiplier', '>=', 1.5),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='no_sudden_jump',
subname=('up', 'down', 'left', 'right'),
description='Consistent scrolling with two fingers '
'(no sudden jumps)',
prompt='Use two fingers to scroll {0} steadily to the bezel edge.',
subprompt={
'up': ('up',),
'down': ('down',),
'left': ('left',),
'right': ('right',),
},
area=area[3],
criteria={
'total_movement': ('Motion', '==', 0),
'button': ('Button Wheel', '>=', 10),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='regardless_prior_state',
subname=(('up', 'down',),
('single_finger_movement',
'right_click',
'click_and_drag',
'three_finger_contact',),
),
description='Scroll occurs whenever the requirements are met, '
'regardless of prior state (e.g. single finger '
'movement, right click, click & drag, three finger '
'contact with trackpad)',
prompt='{1} Use the two fingers to scroll {0}.',
subprompt={
'up': ('up',),
'down': ('down',),
'single_finger_movement': ('Use a finger tracking arbitrarily. '
'Without the finger leaving the pad, '
'a 2nd finger touches the trackpad.',),
'right_click': ('Use two fingers to make a right click. '
'All fingers leave the Trackpad. '
'Within 300ms, two fingers touch the '
'trackpad again.',),
'click_and_drag': ('Make a click and drag gesture in any '
'direction. All fingers leave the trackpad. '
'Within 300ms, two fingers touch the trackpad '
'again.',),
'three_finger_contact': ('Use two fingers to scroll in any '
'direction. Have a 3rd finger in '
'contact. Then go back to two fingers.',),
},
area=area[3],
criteria={
'sequence': (('*'),
('Button Wheel', '>=', 10),
('Motion', '==', 0),
),
},
weight=1,
enabled=True,
files=('*',
),
),
### Area 4: Palm/thumb detection
TrackpadTestFunctionality(
name='palm_presence',
subname=('left', 'right', 'both'),
description='No unintended cursor movement, click, scroll due to '
'presence of palm',
prompt='Place {0} on the trackpad for about 5 seconds in the '
'way as you are typing. Then lift the palm(s).',
subprompt={
'left': ('your left palm',),
'right': ('your right palm',),
'both': ('both palms',),
},
area=area[4],
criteria={
'total_movement': ('Motion', '<=', palm_movement),
'button': None,
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='hovering_thumb',
subname=(('left', 'right'),
('contact', 'above',),
),
description='No unintended cursor movement, click, scroll due '
'to presence of "hovering thumb" (Hovering thumb '
'defined as Thumb above, or in contact with, bottom '
'¼ of pad; thumb in any orientation)',
prompt='Place your {0} thumb (in any orientation) {1} bottom ¼ of '
'pad for about 5 seconds.',
subprompt={
'left': ('left',),
'right': ('right',),
'contact': ('in contact with',),
'above': ('slightly above',),
},
area=area[4],
criteria={
'total_movement': ('Motion', '<=', palm_movement),
'button': None,
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='pointing',
subname=('up', 'down', 'left', 'right',),
description='Example: Palm/thumb sitting on bottom edge of '
'trackpad, primary finger comes in contact with '
'and moves on trackpad: Pointing should occur rather '
'than scrolling',
prompt='Place any thumb on the bottom edge of trackpad. '
'Use primary finger to move {0} across half of trackpad. '
'Then lift both fingers.',
subprompt={
'up': ('up',),
'down': ('down',),
'left': ('left',),
'right': ('right',),
},
area=area[4],
criteria={
'sequence': (('Motion', '<=', palm_movement),
('NOP', '2nd Finger Landed'),
('Motion_x_or_y', '>=', select_drag_distance),
('NOP', '2nd Finger Lifted'),
('Motion', '<=', palm_movement),
),
'move_ratio': move_ratio,
'button': None,
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='scroll',
subname=('up', 'down', 'left', 'right',),
description='Example: Palm/thumb sitting on bottom edge of '
'trackpad while two fingers move in parallel on '
'trackpad: Scroll should result',
prompt='Place any thumb on the bottom edge of trackpad. '
'Use two fingers to scroll {0} across half of trackpad. '
'Then lift all fingers.',
subprompt={
'up': ('up',),
'down': ('down',),
'left': ('left',),
'right': ('right',),
},
area=area[4],
criteria={
'sequence': (('Motion', '<=', palm_movement),
('NOP', '3rd Finger Landed'),
('Button Wheel', '>=', 10),
('NOP', '3rd Finger Lifted'),
('Motion', '<=', palm_movement),
),
},
weight=1,
enabled=True,
files=('*',
),
),
TrackpadTestFunctionality(
name='click',
subname=None,
description='Example: Palm/thumb sitting on bottom edge of trackpad '
'while primary finger clicks: Primary click results '
'rather than alternate click',
prompt='Place any thumb on the trackpad. Use primary finger to '
'make a click.',
subprompt=None,
area=area[4],
criteria={
'total_movement': ('Motion', '<=', palm_movement),
'button': ('Button Left', '==', 1),
},
weight=1,
enabled=True,
files=('*',
),
),
]
''' filename_attr: A test file name is composed of the following attributes
functionality name and subname: This prefix is generated automatically for
each functionality. E.g., two_finger_scroll.down
prefix: the prefix string before the functionality in the file name.
If you want the area name of each functionality to be used as the
prefix string in the file name automatically, specify 'DEFAULT' as
['prefix', 'DEFAULT'],
You can give a prefix name here as an area name
['prefix', 'click'],
If you do not want a prefix string to show up before the
functionality name in the file name, you can assign None.
['prefix', None],
model: the model of the machine.
To let the system figure out the model automatically,
specify 'DEFAULT', as in:
['model', 'DEFAULT'],
Note: Currently, the model name is looked up in '/etc/lsb-release'
as CHROMEOS_RELEASE_BOARD. For systems that do not support it,
a model name such as 'alex' below or None must be explicitly
given.
You can specify a specific model name. E.g.,
['model', 'alex'],
If you do not want the model name to show up in the file name,
you can just assign None.
['model', None],
firmware_version: the firmware version of the trackpad. This field can be
generally omitted if any updated trackpad firmware provided by the
trackpad manufacturer does not affect the performance of the trackpad.
When the firmware version needs to be specified, do it like:
['firmware_version', 'v8.5'],
[other custom attributes come in here]: e.g., 'kernel_driver_version',
'trackpad_material', etc.
tester: the tester name is to be shown on the file name. Different testers
might have different ways of making gestures. If the tester is None,
trackpad record program will prompt the user to enter the name when
capturing gesture data files. To specify the name:
['tester', 'tom'],
timestamp: the timestamp when the file is captured. UTC time is employed.
It is generated automatically. The format is composed of year, month,
day, hour, minute, and second. E.g., 20110407_185746
ext: the extension of the data file. E.g.,
['ext', 'dat']
The name of a test file looks as:
two_finger_scroll.down-mario-john-20110407_185746.dat
'''
filename_attr = [
['prefix', 'DEFAULT'],
['model', 'DEFAULT'],
['firmware_version', None],
['tester', None],
['ext', 'dat']
]