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

New Hindi layout #313

Merged
merged 8 commits into from
Mar 11, 2023
Merged

New Hindi layout #313

merged 8 commits into from
Mar 11, 2023

Conversation

lrvideckis
Copy link
Contributor

@lrvideckis lrvideckis commented Mar 9, 2023

Hi! First thank you for creating/maintaining a great keyboard!

Next my credentials: I'm an American (native English speaker) learning Hindi. I have a few friends from Goa, India who are fluent in Hindi, and have given me advice on this layout.

Some misc things:

  • I suggest we change it from "Hindi" to "Devanagari". Devanagari is the name of the alphabet/set of characters which Hindi is written in. But Devanagari is more general as some other languages (Nepali, Marathi, Konkani, ...) are written in Devanagari.
  • This layout contains all characters from the Devanagari unicode block https://en.wikipedia.org/wiki/Devanagari_(Unicode_block) as well as borrowed punctuation https://blogs.transparent.com/hindi/punctuation-in-hindi/. I compared it to GBoard's Hindi layout, and this layout should be able to type all characters from there.
  • I looked at frequency counts https://www.sttmedia.com/characterfrequency-hindi and attempted to place high-frequency characters as a tap (instead of swipe). Although this is not an improvement over the previous layout, as the previous layout also has frequent characters as a tap
  • I've been typing on this layout for about a month now, and this is what I've converged on as my "endgame"
  • I removed shift as it isn't used in Devanagari script (and also caps lock)

Some possible downsides of this layout:

  • I removed some of the ASCII characters in the previous layout (like [, ], (, ..., #, &). One of my hindi-fluent friends said these characters are never used in the language, besides borrowed characters https://blogs.transparent.com/hindi/punctuation-in-hindi/ which I did include. Despite this I see your point about these characters being useful for passwords. I did create a version where I crammed in many ASCII symbols, but then the layout looked cluttered overall. I guess it is a preference, and my preference is the cleaner look (without these symbols). I did leave some empty spaces in some keys if you want to re-add these ASCII characters
  • My layout doesn't contain any conjunct consonants https://en.wikipedia.org/wiki/Devanagari_conjuncts (except for like 4 of the most frequent ones). To be clear, this layout is still able to type these, just with more keystrokes (example: न + ् + य = न्य).
  • I didn't include any loc characters.

<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
<key shift="0.35" width="0.9" key0="क" key1="ख" key2="घ" key3="ङ" key4="ग"/>
Copy link
Contributor Author

@lrvideckis lrvideckis Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The biggest difference between my layout and the current Hindi layout is the following:

The devanagari characters are organized by mouth/tongue movements https://omniglot.com/writing/devanagari.htm . So for example ग=g, क=k (these are similar tongue movements). I've grouped all similar-tongue-movement characters into the same key

The previous layout has some of these characters grouped together in the same key, but not always

Copy link
Contributor Author

@lrvideckis lrvideckis Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talked to one of my hindi-speaking friends, and he said that this grouping (by tongue movements) is the best way to organize the alphabet (and thus also a keyboard layout)

<key width="0.9" key0="च" key1="छ" key2="झ" key3="ञ" key4="ज"/>
<key width="0.9" key0="ट" key1="ठ" key2="ढ" key3="ण" key4="ड"/>
<key width="0.9" key0="त" key1="थ" key2="ध" key3="न" key4="द"/>
<key width="0.9" key0="प" key1="फ" key2="भ" key3="म" key4="ब"/>
Copy link
Contributor Author

@lrvideckis lrvideckis Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another example: म=m, फ=f, ब=b, प=p (these are all lip-movements)

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<keyboard>
<row>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This row contains only the the consonants https://omniglot.com/language/articles/devanagari.htm

<key width="0.9" key0="र" key1="ज्ञ" key2="ल" key3="य" key4="व"/>
<key width="0.9" key0="ह" key1="श" key2="ळ" key3="स" key4="ष"/>
</row>
<row>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this row contains only the devanagari vowels https://omniglot.com/language/articles/devanagari.htm

<key width="0.9" key0="ह" key1="श" key2="ळ" key3="स" key4="ष"/>
</row>
<row>
<key shift="0.35" width="0.9" key0="ा" key1="अ" key2="आ"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shifted to make it easier to swipe up&left, down&left on the first key (and similarly for the last key)

@@ -61,7 +61,7 @@
<item>Bone</item>
<item>ЙЦУКЕН (Українська)</item>
<item>বাংলা</item>
<item>हिन्दी</item>
<item>देवनागरी (हिंदी)</item>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the spelling of Hindi https://forum.unilang.org/viewtopic.php?t=10200

@@ -281,7 +281,62 @@ private static String apply_fn_char(char c)
case 'ס': return "segol";
case 'ב': return "hataf_segol"; // reduced segol
case 'צ': return "tsere";
// other
// Devanagari symbols
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm using the fn key to allow a second "layer". Before, I tried to squeeze all the symbols into a single layer (kinda like the previous hindi layout), but I didn't like how congested/squeezed it turned out.

So for my layout, the original, non-fn layer contains the most-used characters, and the fn layer contains seldom used characters

<key key0="ं" key1="ॐ" key2="ऽ" key3="ः" key4="&quot;"/>
<key key0="।" key1="," key2=";" key3="!" key4="\?"/>
<key key0="़" key1="॰" key2="०" key3="-" key4="॒"/>
<key key0="५" key1="१" key2="३" key3="७" key4="९" key5="४" key6="६" key7="२" key8="८"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't really sure how to add the numbers, so I just threw them in a number pad

@lrvideckis
Copy link
Contributor Author

Screenshot_20230308-203114
Screenshot_20230308-203158

Copy link
Owner

@Julow Julow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your great work! The layout looks nice and well researched.

@Raj9039852537 Do you still use this app ?

In case someone wants the previous "hindi" layout back, how should we call it ?

You need to change the default_layout of the hindi subtype (hi_IN) in res/xml/method.xml. If that makes sense, you can also add support for the languages you mentionned (Nepali, Marathi, Konkani).

I removed some of the ASCII characters in the previous layout (like [, ], (, ..., #, &).

That's not a problem. The "secondary layout" option can be used to bring a layout suitable for passwords.

@lrvideckis
Copy link
Contributor Author

lrvideckis commented Mar 9, 2023

In case someone wants the previous "hindi" layout back, how should we call it ?

Good point - give users the choice of which layout. There are probably users who are used to the current Hindi layout. I followed the naming pattern of your Hebrew layouts.

@lrvideckis lrvideckis marked this pull request as draft March 9, 2023 21:09
@lrvideckis lrvideckis requested a review from Julow March 9, 2023 21:43
@lrvideckis lrvideckis marked this pull request as ready for review March 9, 2023 21:44
@Raj9039852537
Copy link
Contributor

Raj9039852537 commented Mar 10, 2023

@Raj9039852537 Do you still use this app ?

Yes, I am using it.

As for naming the layout I suggested is inscript layout used vastly in PC.

hi_IN subtype

Providing old layout is usefuI for peoples who are more comfertable with that layout.

Also if it is possible, a choice to edit layout at runtime (just like Multiling O Keyboard ) will be an awesome addition.

Copy link
Owner

@Julow Julow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Julow Julow merged commit 6aaa497 into Julow:master Mar 11, 2023
@lrvideckis lrvideckis deleted the hindi_layout_symbols branch March 11, 2023 21:36
@Julow Julow mentioned this pull request May 1, 2023
@lrvideckis
Copy link
Contributor Author

I just wanted to post an update about this: I still use this layout daily mainly to text my Indian friends.

I did make one tweak:
Screenshot_20231014-095817~2
I changed ; to * so that I can correct my previous text. And I noticed I never use ; (or ,) symbols anyways.

Finally I did write a blog about this https://www.lrvideckis.com/blog/2023/08/21/devanagari_keyboard.html

@Julow
Copy link
Owner

Julow commented Oct 17, 2023

Thanks for the update. Could you open a new PR to update the layout for everyone ?

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

Successfully merging this pull request may close these issues.

3 participants