input headers: - Add edge motion constants input touchpad settings header: - Edge motion (enabled by default as on tap drag) - Help moving the cursor and the primary finger transitions from one place of the touchpad to its edge and then stays on the edge for some time. The default matches the current hardcoded behaviour. input preflet: - Implement edge motion options input mouse: - Handle and provide new setting for edge motion input mouse mm: - Enable edge motion on tap drag based on settings instead of being hardcoded - Some users who didn't have a chance to read the users' documentation could wrognly believe that this feature is a bug by not understanting why unexpected cursor movement happen at constant speed on some scenarios sometimes not even realising that it happens when the finger is approaching to the edges of the touch area by mistake. At least, even if this is the current default setting at the moment, this enables the chance to change it instead of being a obscure hardcoded feature. input mouse mm: - Enhance edge motion with extra behaviours - Support for other edge motion aids apart from "on tap drag only". Change-Id: Ice50139f9f8001494f7e2a46bb1521a1e525cade Reviewed-on: https://review.haiku-os.org/c/haiku/+/9921 Reviewed-by: Adrien Destugues <[email protected]>
59 lines
1.2 KiB
C
59 lines
1.2 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
|
|
} touchpad_settings;
|
|
|
|
|
|
const static touchpad_settings kDefaultTouchpadSettings = {
|
|
true,
|
|
true,
|
|
0.15,
|
|
0.15,
|
|
7,
|
|
10,
|
|
10,
|
|
20,
|
|
30,
|
|
65536,
|
|
65536,
|
|
false,
|
|
true,
|
|
0x02
|
|
};
|
|
|
|
#define TOUCHPAD_SETTINGS_FILE "Touchpad_settings"
|
|
|
|
#endif /* TOUCHPAD_SETTINGS_H */
|