enabling the other two will create two zones, one for ClickFinger2 and one for
ClickFinger3. Boolean value. Defaults to false.
+**BottomEdgeZonesEnable** -
+Whether to enable button zones in the bottom edge. If this feature is
+enabled then touches in the BottomEdge region determine which button
+is sent. The vertical division of the zones is as for
+ButtonZonesEnable. If there is no touch in the bottom edge, then
+button 0 will be sent (or the button according to ButtonZonesEnable,
+if that is enabled). This is particularly useful for clickpads with
+integrated buttons. Defaults to false.
+
**ButtonTouchExpire** -
How long (in ms) to consider a touching finger as part of button emulation. A
value of 0 will not expire touches. Integer value. Defaults to 100.
#define DEFAULT_BUTTON_ENABLE 1
#define DEFAULT_BUTTON_INTEGRATED 1
#define DEFAULT_BUTTON_ZONES 0
+#define DEFAULT_BOTTOM_EDGE_ZONES 0
#define DEFAULT_BUTTON_1TOUCH 3
#define DEFAULT_BUTTON_2TOUCH 2
#define DEFAULT_BUTTON_3TOUCH 0
int button_integrated; // Is the button under the touchpad? 0 or 1
int button_expire; // How long to consider a touch for button emulation. >= 0
int button_zones; // Use button zones for emulation?
+ int bottom_edge_zones; // Use bottom edge zones for emulation?
int button_1touch; // What button to emulate when one finger is on the
// pad or the first zone is clicked? 0 to 32
int button_2touch; // What button to emulate when two fingers are on the
if (cfg->button_zones && earliest >= 0) {
pos = ms->touch[earliest].x;
}
+ if (cfg->bottom_edge_zones) {
+ int latest_bottom = -1;
+ foreach_bit(i, ms->touch_used) {
+ if (!GETBIT(ms->touch[i].state, MT_BOTTOM_EDGE))
+ continue;
+ if (GETBIT(ms->touch[i].state, MT_PALM) && cfg->ignore_palm)
+ continue;
+ /* we deliberately don't ignore thumbs for bottom button zones */
+
+ if (latest_bottom == -1 || timercmp(&ms->touch[i].down, &ms->touch[latest_bottom].down, >))
+ latest_bottom = i;
+ }
+ if (latest_bottom >= 0)
+ pos = ms->touch[latest_bottom].x;
+ }
if (pos >= 0) {
int zones, left, right;
cfg->button_integrated = DEFAULT_BUTTON_INTEGRATED;
cfg->button_expire = DEFAULT_BUTTON_EXPIRE;
cfg->button_zones = DEFAULT_BUTTON_ZONES;
+ cfg->bottom_edge_zones = DEFAULT_BOTTOM_EDGE_ZONES;
cfg->button_1touch = DEFAULT_BUTTON_1TOUCH;
cfg->button_2touch = DEFAULT_BUTTON_2TOUCH;
cfg->button_3touch = DEFAULT_BUTTON_3TOUCH;
cfg->button_integrated = xf86SetBoolOption(opts, "ButtonIntegrated", DEFAULT_BUTTON_INTEGRATED);
cfg->button_expire = MAXVAL(xf86SetIntOption(opts, "ButtonTouchExpire", DEFAULT_BUTTON_EXPIRE), 0);
cfg->button_zones = xf86SetBoolOption(opts, "ButtonZonesEnable", DEFAULT_BUTTON_ZONES);
+ cfg->bottom_edge_zones = xf86SetBoolOption(opts, "BottomEdgeZonesEnable", DEFAULT_BOTTOM_EDGE_ZONES);
cfg->button_1touch = CLAMPVAL(xf86SetIntOption(opts, "ClickFinger1", DEFAULT_BUTTON_1TOUCH), 0, 32);
cfg->button_2touch = CLAMPVAL(xf86SetIntOption(opts, "ClickFinger2", DEFAULT_BUTTON_2TOUCH), 0, 32);
cfg->button_3touch = CLAMPVAL(xf86SetIntOption(opts, "ClickFinger3", DEFAULT_BUTTON_3TOUCH), 0, 32);