membrane

zimablue 2023-10-28T21:02:13.819039Z

hey, why is there a -key-event and -key-press both? I can't see key-event used anywhere.

phronmophobic 2023-10-28T21:25:51.227199Z

For whatever reason, most event systems distinguish between the two. Key events are more or less "raw" input from the keyboard while key-press will give you characters that have been interpreted by the OS which is usually what you want.

phronmophobic 2023-10-28T21:27:22.023619Z

As an example, if you hold "Shift" and press "B", you'll get a "B" key-press and several key-events for both the push and release of every keyboard key used.

zimablue 2023-10-28T22:54:53.931249Z

thanks, I think I also get a "shift" keypress

zimablue 2023-10-28T23:17:15.361439Z

seems like a common case that you'd want the key-event-handler to suppress the key-press, since alt+w != w you don't want to react to both

zimablue 2023-10-28T23:21:51.430799Z

weird I kindo of am getting that behavior but don't see why yet, ignore me

zimablue 2023-10-28T23:23:19.286029Z

ah no I'm not, getting the w through on my keydown, interesting

phronmophobic 2023-10-28T23:34:39.964989Z

it's just passing through the events that it gets. If you want to pass through events differently, you can do that with something like ui/wrap-on.