-
Notifications
You must be signed in to change notification settings - Fork 275
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
Keyboard layout is unintuitive :( #2
Comments
Why couldn't it just be a form with a text input? |
A form could work... We just need a css selector for every possible message they might type... input[value="a"] |
A text input box would work. But not in the way you're thinking. First, have a text box with selectors that test for every letter and set the background image. Then, when the server resends the page to update the image URLs, also shift the current text box data into an element and make a new empty input box. So typing the next letter would appear to clear the text box and shift the letter into an element. I don't see why this wouldn't work. |
Perhaps because nobody coded it yet? Go write some PRs! |
Well, what are your requirements? It says "async web chat using no JS whatsoever on the frontend", and you do have a backend. Is the page not allowed to navigate or submit? Is that what you mean by "async"? |
Maybe author mean by async that page doesn't reload when it send or get messages |
Yeah, the idea was definitely "no reloads." If we relax that and allow form submissions, it becomes a lot easier - none of the CSS nonsense is necessary. You just need form submission and chunked content delivery. In fact, check out Harmless, which is exactly that (not sure who built it). :) |
As for |
We may use some workaround based on that too - after the initial value has been typed, the server will 'inject' a new set of style which uses the initial value as its prefix, e.g.:
|
How would you detect that the user inputted |
😅 didn't consider that problem. I tried to find some way to force the browser to recalculate the whole page's css, but as far as I can tell there's no way to do it in pure css. |
Why not use the e.g. If the input value is "h" then Additionally, if the input box gets unfocused every time the content gets updated, you could probably stick the |
@ThomasBower As was already explained twice Been brainstorming whether html form validation could be, so you could in theory have a regex rule which only allows anything but an a and based on the invalid state know an a was typed, but best I know that won't allow recognizing more than one letter. |
@David-Mulder Yep, my bad. I tested it soon after. Another idea would be to use different fonts and assign them to different characters as seen here. |
@ThomasBower yeah, that's definitely a smarter idea than mine xD |
Can we use a table to force the button layout into a more natural layout? e.g. ergonomic left-handed programmer dvorak
The text was updated successfully, but these errors were encountered: