Module: cwc.pointer

Low-level API to manage pointer and pointer device

Info:

  • Copyright: 2024
  • License: GPLv3
  • Originally authored by: Dwi Asmoro Bangun
    (Full contributors list available on our github project)

Static module functions

cwc.pointer.bind (modifier, mouse_btn, on_press, on_release, data) Register a mouse binding.
cwc.pointer.clear () Clear all mouse binding.
cwc.pointer.get_position () -> table Get main seat pointer position.
cwc.pointer.set_position () Set main seat pointer position.
cwc.pointer.move_interactive () Start interactive move for client under the cursor.
cwc.pointer.resize_interactive () Start interactive resize for client under the cursor.
cwc.pointer.stop_interactive () Stop interactive mode.

Config functions

cwc.pointer.set_cursor_size (size) Set cursor size.
cwc.pointer.set_sensitivity (sensitivity) Set mouse sensitivity.
set_scroll_method. (enum)
cwc.pointer.set_click_method (enum) Set click method.
cwc.pointer.set_send_events_mode (enum) Set send events method.
cwc.pointer.set_accel_profile (enum) Set acceleration profile.
cwc.pointer.set_tap_button_map (enum) Set tap button map.
cwc.pointer.set_tap_to_click (set) (Trackpad) Enable tap to click.
cwc.pointer.set_tap_and_drag (set) (Trackpad) Enable tap and drag.
cwc.pointer.set_drag_lock (set) (Trackpad) Enable drag lock.
cwc.pointer.set_natural_scrolling (set) (Trackpad) Enable natural scrolling.
cwc.pointer.set_disable_while_typing (set) (Trackpad) Enable disable while typing.
cwc.pointer.set_left_handed (set) (Trackpad) Enable left handed
cwc.pointer.set_middle_button_emulation (set) (Trackpad) Enable middle button emulation.


Static module functions

🔗 cwc.pointer.bind (modifier, mouse_btn, on_press, on_release, data)
Register a mouse binding.

Parameters:

Name Type(s) Description
modifier table or number Table of modifier or modifier bitfield
mouse_btn number Button from linux input-event-codes
on_press func Function to execute when pressed
on_release Optional func Function to execute when released
data Optional table Additional data
group Optional string Keybinding group
description Optional string Keybinding description

See also:

cuteful.enum.modifier Keyboard modifier constant mapped from wlr_keyboard.h (cuteful.enum) tables
cuteful.enum.mouse_btn Yoink'd from Linux input-event-codes.h (cuteful.enum) tables
cwc.kbd.bind Register a keyboard binding. (cwc.kbd) static module functions
🔗 cwc.pointer.clear ()
Clear all mouse binding.
🔗 cwc.pointer.get_position () -> table
Get main seat pointer position.

Returns:

    table Pointer coords with structure {x,y}
🔗 cwc.pointer.set_position ()
Set main seat pointer position.
🔗 cwc.pointer.move_interactive ()
Start interactive move for client under the cursor.
🔗 cwc.pointer.resize_interactive ()
Start interactive resize for client under the cursor.
🔗 cwc.pointer.stop_interactive ()
Stop interactive mode.

Config functions

🔗 cwc.pointer.set_cursor_size (size)
Set cursor size.

Parameters:

Name Type(s) Description
size integer Cursor size
🔗 cwc.pointer.set_sensitivity (sensitivity)
Set mouse sensitivity.

Parameters:

Name Type(s) Description
sensitivity number Number in range [-1, 1]
🔗 set_scroll_method. (enum)

Parameters:

Name Type(s) Description
enum integer SCROLL_XXX enum

See also:

cuteful.enum.pointer Pointer constant used for configuring pointer device from libinput.h Ref: https://wayland.freedesktop.org/libinput/doc/latest/api/group__config.html (cuteful.enum) tables
🔗 cwc.pointer.set_click_method (enum)
Set click method.

Parameters:

Name Type(s) Description
enum integer CLICK_METHOD_XXX enum

See also:

cuteful.enum.pointer Pointer constant used for configuring pointer device from libinput.h Ref: https://wayland.freedesktop.org/libinput/doc/latest/api/group__config.html (cuteful.enum) tables
🔗 cwc.pointer.set_send_events_mode (enum)
Set send events method.

Parameters:

Name Type(s) Description
enum integer SEND_EVENTS_XXX enum

See also:

cuteful.enum.pointer Pointer constant used for configuring pointer device from libinput.h Ref: https://wayland.freedesktop.org/libinput/doc/latest/api/group__config.html (cuteful.enum) tables
🔗 cwc.pointer.set_accel_profile (enum)
Set acceleration profile.

Parameters:

Name Type(s) Description
enum integer ACCEL_PROFILE_XXX enum

See also:

cuteful.enum.pointer Pointer constant used for configuring pointer device from libinput.h Ref: https://wayland.freedesktop.org/libinput/doc/latest/api/group__config.html (cuteful.enum) tables
🔗 cwc.pointer.set_tap_button_map (enum)
Set tap button map.

Parameters:

Name Type(s) Description
enum integer TAP_MAP_XXX enum

See also:

cuteful.enum.pointer Pointer constant used for configuring pointer device from libinput.h Ref: https://wayland.freedesktop.org/libinput/doc/latest/api/group__config.html (cuteful.enum) tables
🔗 cwc.pointer.set_tap_to_click (set)
(Trackpad) Enable tap to click.

Parameters:

Name Type(s) Description
set boolean
🔗 cwc.pointer.set_tap_and_drag (set)
(Trackpad) Enable tap and drag.

Parameters:

Name Type(s) Description
set boolean
🔗 cwc.pointer.set_drag_lock (set)
(Trackpad) Enable drag lock.

Parameters:

Name Type(s) Description
set boolean
🔗 cwc.pointer.set_natural_scrolling (set)
(Trackpad) Enable natural scrolling.

Parameters:

Name Type(s) Description
set boolean
🔗 cwc.pointer.set_disable_while_typing (set)
(Trackpad) Enable disable while typing.

Parameters:

Name Type(s) Description
set boolean
🔗 cwc.pointer.set_left_handed (set)
(Trackpad) Enable left handed

Parameters:

Name Type(s) Description
set boolean
🔗 cwc.pointer.set_middle_button_emulation (set)
(Trackpad) Enable middle button emulation.

Parameters:

Name Type(s) Description
set boolean
generated by LDoc 1.5.0 based on AwesomeWM template