ratslap icon indicating copy to clipboard operation
ratslap copied to clipboard

Duplicate modifier when assigning to a button

Open nqv opened this issue 3 years ago • 1 comments

When trying to reset the buttons to default settings (LeftCtrl and LeftAlt), the modifier gets duplicated

./ratslap --modify f3 --g6 'LeftCtrl' --g7 'LeftAlt' -p f3
...
  G6:                  LeftCtrl + LeftCtrl
  G7:                  LeftAlt + LeftAlt

I'd expect:

  G6:                  LeftCtrl +
  G7:                  LeftAlt +

nqv avatar Jan 06 '21 02:01 nqv

Thanks @nqv . This is a semantic thing really I think. The event must always generate a key, with optional modifiers. This means that LeftCtrl + LeftAlt (LeftCtrl modifier, LeftAlt key) is actually different than LeftAlt + LeftCtrl (LeftAlt modifier, LeftCtrl key). So LeftCtrl + LeftCtrl is LeftCtrl key with a LeftCtrl modifier :thinking:

... I guess you're right though, it should probably just be the key event so the output should be:

  G6:                  LeftCtrl
  G7:                  LeftAlt

krayon avatar Mar 25 '21 03:03 krayon