Files
haiku-beta6/headers/private/input/touchpad_settings.h
T
Samuel Rodríguez Pérez a3f6c4d484 input: Implement click finger behaviour (enabled by default)
input touchpad settings header:
- click finger behaviour (enabled by default)
- Emulation of different button clicks depending on the
  number of fingers that are pressed at the same time on
  any location of the touchable surface of the device.
    - Clicking with 1 finger triggers a primary button click,
      usually left button click.
    - Clicking with 2 fingers triggers a secondary button click,
      usually right button click.
    - Clicking with 3 fingers triggers a terciary button click,
      usually middle button click.

  This feature is useful for clickpads that are input devices
  lacking a separated set of buttons from the touch area.

input preflet:
- Implement clickfinger

input mouse:
- Handle and provide new settings for clickfinger behaviour

input mouse mm:
- Implement clickfinger in the user space
- Enables button emulation based on the number of fingers pressing
  at the same time the touch surface.

  Userful feature for clickpads.

Change-Id: Ibaa06df3887793158093cc08f6281fc080e85c3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9923
Reviewed-by: Adrien Destugues <[email protected]>
2026-01-02 11:01:29 +00:00

67 lines
1.4 KiB
C

/*
* Copyright 2001-2025, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef TOUCHPAD_SETTINGS_H
#define TOUCHPAD_SETTINGS_H
#include <SupportDefs.h>
typedef struct {
bool scroll_twofinger;
bool scroll_twofinger_horizontal;
float scroll_rightrange; // from 0 to 1
float scroll_bottomrange; // from 0 to 1
uint16 scroll_xstepsize;
uint16 scroll_ystepsize;
uint8 scroll_acceleration; // from 0 to 20
uint8 tapgesture_sensibility; // 0 : no tapgesture
// 20: very light tap is enough (default)
uint16 padblocker_threshold; //0 to 100
int32 trackpad_speed;
int32 trackpad_acceleration;
bool scroll_reverse;
bool scroll_twofinger_natural_scrolling;
uint8 edge_motion; // 0: disabled
// or combined flags of:
// 0x01: edge motion on move
// 0x02: edge motion on tap drag
// 0x04: edge motion on button click move
// 0x08: edge motion on button click drag
bool finger_click; // 1 finger click -> click button id 1
// 2 fingers' click -> click button id 2
// 3 fingers' click -> click button id 3
bool software_button_areas;
} touchpad_settings;
const static touchpad_settings kDefaultTouchpadSettings = {
true,
true,
0.15,
0.15,
7,
10,
10,
20,
30,
65536,
65536,
false,
true,
0x02,
true,
false
};
#define TOUCHPAD_SETTINGS_FILE "Touchpad_settings"
#endif /* TOUCHPAD_SETTINGS_H */