Documentation ¶
Index ¶
- Constants
- func SetKeyboardRepeat(enabled bool, delay, interval uint32) error
- type Mouse
- func (m *Mouse) CanChangeAccelProfile() bool
- func (m *Mouse) CanLeftHanded() bool
- func (m *Mouse) CanMiddleButtonEmulation() bool
- func (m *Mouse) CanNaturalScroll() bool
- func (m *Mouse) CanWheelEmulation() bool
- func (m *Mouse) CanWheelHorizNaturalScroll() bool
- func (m *Mouse) CanWheelHorizScroll() bool
- func (m *Mouse) Enable(enabled bool) error
- func (m *Mouse) EnableLeftHanded(enabled bool) error
- func (m *Mouse) EnableMiddleButtonEmulation(enabled bool) error
- func (m *Mouse) EnableNaturalScroll(enabled bool) error
- func (m *Mouse) EnableWheelEmulation(enabled bool) error
- func (m *Mouse) EnableWheelHorizNaturalScroll(enabled bool) error
- func (m *Mouse) EnableWheelHorizScroll(enabled bool) error
- func (m *Mouse) IsAdaptiveAccelProfileEnabled() bool
- func (m *Mouse) IsEnabled() bool
- func (m *Mouse) MiddleButtonEmulationTimeout() (int16, error)
- func (m *Mouse) MotionAcceleration() (float32, error)
- func (m *Mouse) MotionScaling() (float32, error)
- func (m *Mouse) MotionThreshold() (float32, error)
- func (m *Mouse) SetMiddleButtonEmulationTimeout(timeout int16) error
- func (m *Mouse) SetMotionAcceleration(accel float32) error
- func (m *Mouse) SetMotionScaling(scaling float32) error
- func (m *Mouse) SetMotionThreshold(thres float32) error
- func (m *Mouse) SetRotation(direction uint8) error
- func (m *Mouse) SetUseAdaptiveAccelProfile(useAdaptiveProfile bool) error
- func (m *Mouse) SetWheelEmulationButton(btnNum int8) error
- func (m *Mouse) SetWheelEmulationTimeout(timeout int16) error
- func (m *Mouse) WheelEmulationButton() (int8, error)
- func (m *Mouse) WheelEmulationTimeout() (int16, error)
- type Touchpad
- func (tpad *Touchpad) CanDisableWhileTyping() bool
- func (tpad *Touchpad) CanEdgeScroll() bool
- func (tpad *Touchpad) CanLeftHanded() bool
- func (tpad *Touchpad) CanNaturalScroll() bool
- func (tpad *Touchpad) CanPalmDetect() bool
- func (tpad *Touchpad) CanTapToClick() bool
- func (tpad *Touchpad) CanTwoFingerScroll() (bool, bool)
- func (tpad *Touchpad) Enable(enabled bool) error
- func (tpad *Touchpad) EnableDisableWhileTyping(enabled bool) error
- func (tpad *Touchpad) EnableEdgeScroll(enabled bool) error
- func (tpad *Touchpad) EnableLeftHanded(enabled bool) error
- func (tpad *Touchpad) EnableNaturalScroll(enabled bool) error
- func (tpad *Touchpad) EnablePalmDetect(enabled bool) error
- func (tpad *Touchpad) EnableTapToClick(enabled bool) error
- func (tpad *Touchpad) EnableTwoFingerScroll(vert, horiz bool) error
- func (tpad *Touchpad) GetPalmDimensions() (int32, int32, error)
- func (tpad *Touchpad) IsEnabled() bool
- func (tpad *Touchpad) MotionAcceleration() (float32, error)
- func (tpad *Touchpad) MotionScaling() (float32, error)
- func (tpad *Touchpad) MotionThreshold() (float32, error)
- func (tpad *Touchpad) ScrollDistance() (int32, int32)
- func (tpad *Touchpad) SetMotionAcceleration(accel float32) error
- func (tpad *Touchpad) SetMotionScaling(scaling float32) error
- func (tpad *Touchpad) SetMotionThreshold(thres float32) error
- func (tpad *Touchpad) SetPalmDimensions(width, z int32) error
- func (tpad *Touchpad) SetRotation(direction uint8) error
- func (tpad *Touchpad) SetScrollDistance(vert, horiz int32) error
- type Touchscreen
- type Wacom
- func (w *Wacom) GetArea() (x1, y1, x2, y2 int, err error)
- func (w *Wacom) MapToOutput(output string) error
- func (w *Wacom) QueryType() int
- func (w *Wacom) ResetArea() error
- func (w *Wacom) SetArea(x1, y1, x2, y2 int) error
- func (w *Wacom) SetButton(btn int, value string) error
- func (w *Wacom) SetMode(mode string) error
- func (w *Wacom) SetPressureCurve(x1, y1, x2, y2 int) error
- func (w *Wacom) SetRawSample(sample uint32) error
- func (w *Wacom) SetRotate(value string) error
- func (w *Wacom) SetSuppress(value int) error
- func (w *Wacom) SetThreshold(thres int) error
Constants ¶
const ( // see also randr RotationDirectionNormal uint8 = 1 RotationDirectionLeft = 2 RotationDirectionInverted = 4 RotationDirectionRight = 8 )
const ( WacomTypeUnknown = iota WacomTypeStylus WacomTypeEraser WacomTypePad )
Variables ¶
This section is empty.
Functions ¶
func SetKeyboardRepeat ¶
Types ¶
type Mouse ¶
type Mouse struct { Id int32 Name string TrackPoint bool // contains filtered or unexported fields }
func NewMouseFromDeviceInfo ¶
func NewMouseFromDeviceInfo(dev *utils.DeviceInfo) (*Mouse, error)
func (*Mouse) CanChangeAccelProfile ¶
blumia: currently only allow config accel profile when using libinput TODO: Evdev support ref: http://510x.se/notes/posts/Changing_mouse_acceleration_in_Debian_and_Linux_in_general/
func (*Mouse) CanLeftHanded ¶
func (*Mouse) CanMiddleButtonEmulation ¶
func (*Mouse) CanNaturalScroll ¶
func (*Mouse) CanWheelEmulation ¶
func (*Mouse) CanWheelHorizNaturalScroll ¶
func (*Mouse) CanWheelHorizScroll ¶
func (*Mouse) EnableLeftHanded ¶
func (*Mouse) EnableMiddleButtonEmulation ¶
EnableMiddleButtonEmulation enable mouse middle button emulation "Evdev Middle Button Emulation"
1 boolean value (8 bit, 0 or 1).
func (*Mouse) EnableNaturalScroll ¶
func (*Mouse) EnableWheelEmulation ¶
EnableWheelEmulation enable mouse wheel emulation "Evdev Wheel Emulation"
1 boolean value (8 bit, 0 or 1).
func (*Mouse) EnableWheelHorizNaturalScroll ¶
func (*Mouse) EnableWheelHorizScroll ¶
func (*Mouse) IsAdaptiveAccelProfileEnabled ¶
func (*Mouse) MiddleButtonEmulationTimeout ¶
func (*Mouse) MotionAcceleration ¶
func (*Mouse) MotionScaling ¶
func (*Mouse) MotionThreshold ¶
func (*Mouse) SetMiddleButtonEmulationTimeout ¶
SetMiddleButtonEmulationTimeout set middle button emulation timeout "Evdev Middle Button Timeout"
1 16-bit positive value.
func (*Mouse) SetMotionAcceleration ¶
func (*Mouse) SetMotionScaling ¶
func (*Mouse) SetMotionThreshold ¶
func (*Mouse) SetRotation ¶
func (*Mouse) SetUseAdaptiveAccelProfile ¶
Set to false to use flat accel profile
func (*Mouse) SetWheelEmulationButton ¶
SetWheelEmulationButton set wheel emulation button "Evdev Wheel Emulation Button"
1 8-bit value, allowed range 0-32, 0 disables the button.
func (*Mouse) SetWheelEmulationTimeout ¶
SetWheelEmulationTimeout set wheel emulation timeout "Evdev Wheel Emulation Timeout"
1 16-bit positive value.
func (*Mouse) WheelEmulationButton ¶
func (*Mouse) WheelEmulationTimeout ¶
type Touchpad ¶
func NewTouchpad ¶
*
- touchpad properties see:
- http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html#sect4 *
- Also use 'xinput list-props <id>' to list these props. *
func NewTouchpadFromDevInfo ¶
func NewTouchpadFromDevInfo(dev *utils.DeviceInfo) (*Touchpad, error)
func (*Touchpad) CanDisableWhileTyping ¶
func (*Touchpad) CanEdgeScroll ¶
func (*Touchpad) CanLeftHanded ¶
func (*Touchpad) CanNaturalScroll ¶
func (*Touchpad) CanPalmDetect ¶
func (*Touchpad) CanTapToClick ¶
func (*Touchpad) CanTwoFingerScroll ¶
func (*Touchpad) Enable ¶
*
- Property 'Synaptics Off' 8 bit, valid values (0, 1, 2):
- Value 0: Touchpad is enabled
- Value 1: Touchpad is switched off
- Value 2: Only tapping and scrolling is switched off *
func (*Touchpad) EnableDisableWhileTyping ¶
func (*Touchpad) EnableEdgeScroll ¶
*
- Property "Synaptics Edge Scrolling" 8 bit (BOOL), 3 values, vertical,
- horizontal, corner. :
- Option "VertEdgeScroll" "boolean":
- Enable vertical scrolling when dragging along the right edge.
- Option "HorizEdgeScroll" "boolean" :
- Enable horizontal scrolling when dragging along
- the bottom edge.
- Option "CornerCoasting" "boolean":
- Enable edge scrolling to continue while the finger stays
- in an edge corner. *
func (*Touchpad) EnableLeftHanded ¶
func (*Touchpad) EnableNaturalScroll ¶
*
- Property "Synaptics Scrolling Distance" 32 bit, 2 values, vert, horiz.
- Option "VertScrollDelta" "integer":
- Move distance of the finger for a scroll event.
- Option "HorizScrollDelta" "integer" :
- Move distance of the finger for a scroll event. *
- if delta = 0, use value from property getting *
func (*Touchpad) EnablePalmDetect ¶
EnablePalmDetect set synaptics palm detect 'Synaptics Palm Detection' 8 bit (BOOL)
func (*Touchpad) EnableTapToClick ¶
*
- Property 'Synaptics Tap Action' 8 bit,
- up to MAX_TAP values (see synaptics.h), 0 disables an element.
- order: RT, RB, LT, LB, F1, F2, F3.
- Option "RTCornerButton" "integer":
- Which mouse button is reported on a right top corner tap.
- Option "RBCornerButton" "integer":
- Which mouse button is reported on a right bottom corner tap.
- Option "LTCornerButton" "integer":
- Which mouse button is reported on a left top corner tap.
- Option "LBCornerButton" "integer":
- Which mouse button is reported on a left bottom corner tap.
- Option "TapButton1" "integer":
- Which mouse button is reported on a non-corner one-finger tap.
- Option "TapButton2" "integer":
- Which mouse button is reported on a non-corner two-finger tap.
- Option "TapButton3" "integer":
- Which mouse button is reported on a non-corner
- three-finger tap. *
func (*Touchpad) EnableTwoFingerScroll ¶
*
- Property 'Synaptics Two-Finger Scrolling' 8 bit (BOOL),
- 2 values, vertical, horizontal.
- Option "VertTwoFingerScroll" "boolean":
- Enable vertical scrolling when dragging with
- two fingers anywhere on the touchpad.
- Option "HorizTwoFingerScroll" "boolean" :
- Enable horizontal scrolling when dragging with
- two fingers anywhere on the touchpad. *
func (*Touchpad) GetPalmDimensions ¶
func (*Touchpad) MotionAcceleration ¶
func (*Touchpad) MotionScaling ¶
func (*Touchpad) MotionThreshold ¶
func (*Touchpad) ScrollDistance ¶
func (*Touchpad) SetMotionAcceleration ¶
func (*Touchpad) SetMotionScaling ¶
func (*Touchpad) SetMotionThreshold ¶
func (*Touchpad) SetPalmDimensions ¶
'Synaptics Palm Dimensions' 32 bit, 2 values, width, z
func (*Touchpad) SetRotation ¶
func (*Touchpad) SetScrollDistance ¶
type Touchscreen ¶
func NewTouchscreen ¶
func NewTouchscreen(id int32) (*Touchscreen, error)
func NewTouchscreenFromDevInfo ¶
func NewTouchscreenFromDevInfo(dev *utils.DeviceInfo) (*Touchscreen, error)
func (*Touchscreen) Enable ¶
func (touch *Touchscreen) Enable(enabled bool) error
func (*Touchscreen) IsEnabled ¶
func (touch *Touchscreen) IsEnabled() bool
func (*Touchscreen) SetRotation ¶
func (touch *Touchscreen) SetRotation(direction uint8) error
type Wacom ¶
func NewWacomFromDevInfo ¶
func NewWacomFromDevInfo(dev *utils.DeviceInfo) (*Wacom, error)
func (*Wacom) MapToOutput ¶
Mapping PC screen to tablet, such as "VGA1"
func (*Wacom) SetArea ¶
Area x1 y1 x2 y2 Set the tablet input area in device coordinates in the form top left x/y and bottom right x/y.
func (*Wacom) SetButton ¶
Button button-number [mapping] Set a mapping for the specified button-number. Numeric button mappings indicate what X11 button number the given button-number should correspond to. For example, a mapping of "3" means a press of the given button-number will produce as a press of X11 button 3 (i.e. right click).
Action mappings allow button presses to perform many events. They take the form of a string of keywords and arguments. For example, "key +a +shift b -shift -a" converts the button into a series of keystrokes, in this example "press a, press shift, press and release b, release shift, release a".
func (*Wacom) SetMode ¶
Mode Absolute|Relative Set the device mode as either Relative or Absolute. Relative means pointer tracking for the device will function like a mouse. Absolute means the pointer corresponds to the device's actual position on the tablet or tablet PC screen.
func (*Wacom) SetPressureCurve ¶
PressureCurve x1 y1 x2 y2 A Bezier curve of third order, composed of two anchor points (0,0 and 100,100) and two user modifiable control points that define the curve's shape. Raise the curve (x1<y1 x2<y2) to "soften" the feel and lower the curve (x1>y1 x2>y2) for a "firmer" feel. Sigmoid shaped curves are permitted (x1>y1 x2<y2 or x1<y1 x2>y2).
Default: 0 0 100 100, a linear curve. range of 0 to 100 for all four values.
func (*Wacom) SetRawSample ¶
The the window size for incoming input tool raw data points Default: 4, range of 1 to 20
func (*Wacom) SetRotate ¶
Rotate valid values: none|half|cw|ccw none: the tablet is not rotated and uses its natural rotation half: the tablet is rotated by 180 degrees (upside-down) cw : the tablet is rotated 90 degrees clockwise ccw : the tablet is rotated 90 degrees counter-clockwise
func (*Wacom) SetSuppress ¶
Suppress level Set the delta (difference) cutoff level for further processing of incoming input tool coordinate values. To disable suppression use a level of 0. Default: 2, range of 0 to 100.
func (*Wacom) SetThreshold ¶
Threshold level Set the minimum pressure necessary to generate a Button event for the stylus tip, eraser, or touch. The pressure levels of all tablets are normalized to 2048 levels irregardless of the actual hardware supported levels. This parameter is independent of the PressureCurve parameter. Default: 27, range of 0 to 2047.