Using the modifiers is greate (.ctrl, .alt, .meta, .shift).
But there is no modifier indicating that ONLY that key was pressed (without ctrl, alt, shift or meta simultaneously.
@keydown.space.none="myEventWhenEnterIsPressedAlone()"
@keydown.space="myEventWhenEnterIsPressedWithOrWithoutAnyModifier()"
Hmm, that sounds like a good idea but the none naming is not really intuitive, what do you think about .plain?
Tried a POC, works, opened a PR but I think we need to discuss naming anyway.
I like plain more as well. I think it's a useful feature 🙂
Also agree simple but very valid use cases
Ah, I was just about to request the exact same thing for almost the exact same reason! I would like to add that this be extended for mouse clicks, too!
click.left.none
click.none
@truefusion, what is expected behaviour for mouse clicks?
@nickmessing That any click event with the ".plain" event modifier will trigger if and only if no key modifier is held down. This would leave the default click event available for complex cases and would not conflict with ".left", ".middle" and ".right" when combined.
@truefusion, actually the way it's implemented in #5977 already solves that.
Most helpful comment
@truefusion, actually the way it's implemented in #5977 already solves that.