aboutsummaryrefslogtreecommitdiffstats
path: root/mouse.lua
diff options
context:
space:
mode:
authorTeddy Wing2019-06-14 20:02:59 +0200
committerTeddy Wing2019-06-15 20:31:33 +0200
commitb6e2be3b7aedcfaf352b45f612ebf775c480c60c (patch)
tree9ad98daa946de123443607173f0385bf487c1a7b /mouse.lua
parent6d78336fd15c3add86ade3ac0c9c53079e22abb1 (diff)
downloaddothammerspoon-b6e2be3b7aedcfaf352b45f612ebf775c480c60c.tar.bz2
mouse: Activate mode with num lock
Add an additional mode switch with the num lock or 'clear' key.
Diffstat (limited to 'mouse.lua')
-rw-r--r--mouse.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/mouse.lua b/mouse.lua
index 1f6659b..4b9bb79 100644
--- a/mouse.lua
+++ b/mouse.lua
@@ -80,6 +80,11 @@ mouse_mode:bind({'ctrl', 'option', 'shift'}, 'm', 'Mouse Off', function()
mouse_mode:exit()
end)
+mouse_mode = hs.hotkey.modal.new({}, 'padclear', 'Mouse')
+mouse_mode:bind({}, 'padclear', 'Mouse Off', function()
+ mouse_mode:exit()
+end)
+
mouse_mode:bind({}, 'pad1', mouse.bottom_left(100), nil, mouse.bottom_left(100))
mouse_mode:bind({}, 'pad2', mouse.bottom(100), nil, mouse.bottom(100))
mouse_mode:bind({}, 'pad3', mouse.bottom_right(100), nil, mouse.bottom_right(100))