kantord / LibreLingo

🐢 🌎 📚 a community-owned language-learning platform
https://librelingo.app
GNU Affero General Public License v3.0
1.94k stars 213 forks source link

Add On-screen keyboard #1129

Open adnan360 opened 3 years ago

adnan360 commented 3 years ago

Is your feature request related to a problem? Please describe. I'm speaking on behalf of my language. Please feel free to discuss about yours.

Well, recently had a discussion on how the users can input various characters on Bangla/Bengali alphabet on desktop computers. Setting up input methods can be complicated and somewhat beyond what someone would want to do for a website.

There is a "Special characters" feature already (the buttons that appear under input). But there are 50 letters in Bangla alphabet, plus there are 9 "kar"s, 6 "fola"s, some punctuation marks and ~80 connected letters. (Image at the end) Accomodating all this on the current UI would be:

Maybe we can get away with omitting some connected letters but still.

Describe the solution you'd like Some websites have an on-screen keyboard that appears at the click of a button. e.g. this site has a "Click n type" button. Clicking it pops up a window which lets the user click and type virtually in Bangla.

01

I think:

This way it will customizable, neat and comfortable to use for all languages.

Describe alternatives you've considered Another solution that I've seen is a phonetic keyboard. Meaning the user types in English pronunciation and it's converted into Bangla characters. This is the default behavior on input on the mentioned site. Google also has a phonetic keyboard on Bangla version. I don't like Google's implementation because it's unpredictable.

02

But I can get behind the implementation on the english-bangla.com. Many people like it, but it can be tricky to get some letters sometimes. Feel free to discuss if you have something similar for your language and how it performs.

Other thing I thought is to add all the letters/characters on the current "Special characters" section and hope for the best. I haven't tried it yet. I thought I hear from you guys first. Plus, even if I can get away with my language doesn't mean other languages won't need it. Feel free to discuss.

Additional context This is for context, a page from Bangla Academy dictionary showing alphabets and other things in Bangla:

03-bangla-academy

kantord commented 3 years ago

Thanks for the idea @adnan360!

Implementing a system for virtual keyboards is definitely outside of the scope of LibreLingo.

I think adding virtual keyboards might not be the best way to deal with this issue, but I agree that it's a good option that we could/should add, especially until we come up with something better.

If we are adding virtual keyboards I think what makes the most sense is to use something that's laid out similarly to real keyboards that people might later use for the same language.

The best way of adding such virtual keyboards would be simply using an already existing implementation. After a quick google search, simple-keyboard might just be the solution. Here's their Hindi keyboard for example: https://hodgef.com/simple-keyboard/demos/?d=hindi

Bangla doesn't seem to be supported yet, however it should be much easier to add Bangla support to simple-keyboard than creating a new keyboard system from scratch

kantord commented 3 years ago

@allcontributors please add @adnan360 for ideas

allcontributors[bot] commented 3 years ago

@kantord

I've put up a pull request to add @adnan360! :tada:

adnan360 commented 3 years ago

@kantord I've submitted a PR for a keyboard layout for Bangla. If this is accepted, we should have a demo site for it prepared by that project.

I've already tried to type some words in the static image filenames translated in Bangla with a local copy of the layout and I was able to type them effortlessly. I designed the layout in a way so that most used letters are in non-shift/normal state. In my estimate I can get around 80% of the typing without going to shift mode. So I guess if the community decides that it should be implemented, users will have a good time, at least with Bangla. :)

UPDATE: The layout is now added and live since simple-keyboard-layouts v3.0.0. So it can be tested with the demo link above.

kantord commented 3 years ago

That's amazing!!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.