-- 输入配置(对应 input.conf) -- 参考 https://wiki.hypr.land/Configuring/Basics/Variables/#input hl.config({ input = { kb_layout = "us", kb_variant = "", kb_model = "", kb_options = "caps:escape", kb_rules = "", follow_mouse = 1, -- 合法范围 -1.0 ~ 1.0,0 表示不修改;旧 conf 中的 -10 已超出(原值被旧解析器忽略校验) sensitivity = -1.0, scroll_method = "2fg", touchpad = { natural_scroll = true, -- 自然滚动:双指上滑 = 页面向下翻(内容跟随手指) scroll_factor = 0.5, clickfinger_behavior = true, drag_lock = 0, tap_to_click = true, drag_3fg = 2, }, }, }) -- 触摸板手势(对应 input.conf 中的 gesture) -- 参考 https://wiki.hypr.land/Configuring/Advanced-and-Cool/Gestures/ hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace", }) hl.gesture({ fingers = 3, direction = "swipe", mods = "ALT", action = "move", }) -- 每设备配置(对应 input.conf 中的 device 块) -- 参考 https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ hl.device({ name = "elan07c8:00-04f3:3298-touchpad", sensitivity = -0.2, -- 注:旧配置里的 scroll_factor = 0 会使双指滚动失效(0 倍率),已移除,改用全局 input.touchpad.scroll_factor = 0.5 accel_profile = "flat", clickfinger_behavior = true, })