pothi.love/0200-on.keychord_press

14 lines
345 B
Plaintext

on.keychord_press = function(chord, key)
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
elseif Cursor_node then
edit.keychord_press(Cursor_node.editor, chord, key)
end
end