about summary refs log tree commit diff stats
path: root/keychord.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-04 14:14:26 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-04 14:54:40 -0700
commit1326914d7bda65a5791c2121dae6d3987a907994 (patch)
treeb8f47fd975f18540c62097e39cfb89fa3c5f4ddd /keychord.lua
parent98f50f0b404b48bc38d95126939aefa6c3bea139 (diff)
downloadlines.love-1326914d7bda65a5791c2121dae6d3987a907994.tar.gz
select text with shift + mouseclick
It's still a bit simple-minded. Most software will keep the first bound
fixed and move the second. Lines currently has the bounds in a queue of
sorts. But I have a test to indicate the behavior that is definitely
desired. We'll see if we need it to get more complex.
Diffstat (limited to 'keychord.lua')
-rw-r--r--keychord.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/keychord.lua b/keychord.lua
index 4cdee2b..31db16d 100644
--- a/keychord.lua
+++ b/keychord.lua
@@ -28,24 +28,24 @@ function App.combine_modifiers(key)
   return result
 end
 
-function App.modifier_down()
+function App.any_modifier_down()
   return App.ctrl_down() or App.alt_down() or App.shift_down() or App.cmd_down()
 end
 
 function App.ctrl_down()
-  return love.keyboard.isDown('lctrl') or love.keyboard.isDown('rctrl')
+  return App.modifier_down('lctrl') or App.modifier_down('rctrl')
 end
 
 function App.alt_down()
-  return love.keyboard.isDown('lalt') or love.keyboard.isDown('ralt')
+  return App.modifier_down('lalt') or App.modifier_down('ralt')
 end
 
 function App.shift_down()
-  return love.keyboard.isDown('lshift') or love.keyboard.isDown('rshift')
+  return App.modifier_down('lshift') or App.modifier_down('rshift')
 end
 
 function App.cmd_down()
-  return love.keyboard.isDown('lgui') or love.keyboard.isDown('rgui')
+  return App.modifier_down('lgui') or App.modifier_down('rgui')
 end
 
 array = {}