scottwhudson / Lunette

Zero-Config Spectacle Keybindings for Hammerspoon
MIT License
80 stars 19 forks source link

sample keystroke config not working? #11

Closed psifertex closed 5 years ago

psifertex commented 5 years ago

Invalid syntax? I swear I had this working a second ago, but copying/pasting the sample config doesn't appear to work for me now. Only thing I've done is change the variable name. Any suggestions?

lunetteBindings = {
  leftHalf = {
    {{"Q", "W"}, "E"},
    {{"cmd", "alt"}, "left"},
  }
  rightHalf = {
    {{"A", "S"}, "D"},
  }
  undo = false,
  redo = false
}

You can see the parse failure here: https://rextester.com/WGXDF28058

Specifically, it reports:


Error(s), warning(s):lua5.3: source_file.lua:6: '}' expected (to close '{' at line 1) near 'rightHalf'
--

And likewise I'm getting similar errors in my local console.

scottwhudson commented 5 years ago

@psifertex looks like we forgot a couple of commas in that table. This passes for me:

lunetteBindings = {
  leftHalf = {
    {{"Q", "W"}, "E"},
    {{"cmd", "alt"}, "left"},
  },
  rightHalf = {
    {{"A", "S"}, "D"},
  },
  undo = false,
  redo = false
}

I've updated the README, sorry for the late reply!

psifertex commented 5 years ago

No worries, thanks for getting to it.