genesy / karabiner-complex-rules-generator

Simple web app to help generate Karabiner Elements Complex Rules
GNU General Public License v3.0
515 stars 26 forks source link

Singular modifier specified as a string causes crash #40

Open j-f1 opened 2 years ago

j-f1 commented 2 years ago

Example: https://ke-complex-modifications.pqrs.org/#command_q

This modification contains this JSON:

{
  // ...
  "to": [
    {
      "key_code": "q",
      "modifiers": "left_command"
    }
  ]
  // ...
}

…and the parseKeys function in MainForm.tsx expects an array:

https://github.com/genesy/karabiner-complex-rules-generator/blob/90cbbd1ae1db80bdf06910a2e1da587aada9aab7/src/components/MainForm.tsx#L85-L87