A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
window:current_event()
{{since('20220807-113146-c2fee766')}}
Returns the current event. For now only implemented for mouse events.
This example prints the delta scroll value
when you scroll up with your mouse wheel while holding CTRL:
local wezterm = require 'wezterm'
return {
mouse_bindings = {
{
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
mods = 'CTRL',
action = wezterm.action_callback(function(window, pane)
-- note that you want `WheelDown` for a `WheelDown` event
local delta = window:current_event().Down.button.WheelUp
wezterm.log_info('delta is: ' .. delta)
end),
},
},
}