datastar icon indicating copy to clipboard operation
datastar copied to clipboard

key symbols in CamelCase handling quirkyness

Open Superpat opened this issue 1 year ago • 1 comments

The code will turn ArrowLeft into arrowleft. A - will turn the subsequent letter into a capital as noted in the docs, but that means we need to ask for key_-arrow-left instead of key_ArrowLeft or key_arrow-left. It's not super intuitive.

As seen here: data-on-keydown.window.key_-arrow-left="console.log('left arrow')

Superpat avatar Sep 14 '24 23:09 Superpat

Maybe we should make the keypress example print key codes to the screen when any key is pressed ? Kind of like https://www.toptal.com/developers/keycode

Superpat avatar Sep 14 '24 23:09 Superpat

v0.21.0 changed so much, if this is still an issue open up against the new syntax which should be clearer.

delaneyj avatar Dec 06 '24 16:12 delaneyj