-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmousemaps.lua
More file actions
83 lines (69 loc) · 2.03 KB
/
Copy pathmousemaps.lua
File metadata and controls
83 lines (69 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
-- mouse --
local wez = require("wezterm")
local act = wez.action
local mux = wez.mux
----------------------------------
local M = {}
local keys =
{
{ --wheel scroll up
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
mods = "NONE",
action = act.ScrollByCurrentEventWheelDelta,
alt_screen = false,
},
{ --wheel scroll down
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
mods = "NONE",
action = act.ScrollByCurrentEventWheelDelta,
alt_screen = false,
},
{--Ctrl+wheel zoom +
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
mods = 'CTRL',
action = act.IncreaseFontSize,
},
{--Ctrl+wheel zoom -
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
mods = 'CTRL',
action = act.DecreaseFontSize,
},
{--no paste on middle click
event = { Down = { streak = 1, button = "Middle" } },
mods = 'NONE',
action = act.Nop,
},
{--drag win
event = { Drag = { streak = 1, button = 'Left' } },
mods = 'SHIFT|ALT',
action = act.StartWindowDrag,
},
-- Sel
{
event = { Down = { streak = 1, button = "Left" } },
mods = "NONE",
action = act.SelectTextAtMouseCursor("Cell"),
alt_screen = false,
},
{
event = { Drag = { streak = 1, button = "Left" } },
mods = "NONE",
action = act.ExtendSelectionToMouseCursor("Cell"),
alt_screen = false,
},
{
event = { Up = { streak = 1, button = "Left" } },
mods = "NONE",
action = act.CompleteSelection("ClipboardAndPrimarySelection"),
alt_screen = false,
},
}
function M.apply_to_config(config)
config.disable_default_mouse_bindings = true
config.bypass_mouse_reporting_modifiers = 'NONE'
-- config.alternate_buffer_wheel_scroll_speed = 1
-----------------------------------------------------------------
config.mouse_bindings = keys
end
--------
return M