Hyprland is a dynamic tiling Wayland compositor that offers extensive customization options.
If you want to disable the touchpad on your system while using Hyprland, you can do so by following these steps.
Firstly, use this command to list all input devices connected to your system.
Here, hyprctl is the command-line tool for Hyprland.
The devices parameter is used to list all recognized input devices.
Find the device that contains “touchpad” in its name and note down its name.
The output of the command is typically organized by device type:
通常,这条命令的输出按设备类型组织:
Mice: Shows the device name, speed, and other properties.
Keyboards: Lists the name, rules, active keymap, and the status of Caps Lock and Num Lock.
Tablets: Displays information for touchscreens and styluses.
Touch: Provides details about touch input devices.
Switches: Provides details about any other input-related devices, like power/lid events.
However, the touchpad does not always appear under the “Touch” category; sometimes it may be recognized as a mouse device, so make sure to check the device list carefully.
If you only want to disable the touchpad while typing to avoid accidental cursor movements, you can add the following section to your Hyprland configuration file:
Alternatively, you can disable the touchpad by adding a line to your Hyprland configuration file, typically located at ~/.config/hypr/hyprland.conf.
The following example maps the key combination Super + Alt + P to disable the touchpad and Ctrl + Super + Alt + P to enable it again.
另外,您也可以通过将一行添加到您的 Hyprland 配置文件(通常位于~/.config/hypr/hyprland.conf)中来禁用触摸板。以下示例将键组合Super + Alt + P映射为禁用触摸板,Ctrl + Super + Alt + P则重新启用它。