Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not support capital letter input (and other shift key characters) #44

Open
stchang opened this issue Sep 10, 2015 · 2 comments
Open

Comments

@stchang
Copy link
Collaborator

stchang commented Sep 10, 2015

See vishesh/whalebin#16

@stchang stchang changed the title does not support capital letter input (and shift key characeters) does not support capital letter input (and other shift key characters) Sep 10, 2015
@schanzer
Copy link
Collaborator

Welcome to keypress/keydown hell!

We should really collaborate on this, given that the same code is used in WeScheme. The issue is that keydown events are the ONLY way to find out if control keys (shift, control, f2, etc) have been pressed, but keypress events are the ONLY way to find out what actual ASCII character should be generated. You need to listen for both to get the "full" info, but this gets really messy, as I've discovered by implementing it in WeScheme.

However, even this approach has limitations when it comes to foreign characters.

I think we need to be a lot more clever here, most likely by sending keypress events to an offscreen <TEXTAREA>, capturing the generated character, and sending that to the key-event handler. What do you think?

@schanzer
Copy link
Collaborator

schanzer commented Oct 5, 2015

Update: Fix has been implemented on WeScheme.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants