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

Enhancement: Localized compact 5-row layouts #475

Open
GoogleCodeExporter opened this issue Jan 22, 2016 · 6 comments
Open

Enhancement: Localized compact 5-row layouts #475

GoogleCodeExporter opened this issue Jan 22, 2016 · 6 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

i just love Hacker's Keyboard, for lots of reasons. One of them is compact 
5-row layout, which makes typing in portrait mode much more convenient. It is 
sad, that this great feature only available for EN layout. I really miss it for 
other languages as well. 

Could you please make compact 5-row layouts available for other languages? I'd 
be happy to help, just don't know where to start.

Thanks!

Original issue reported on code.google.com by [email protected] on 6 Jun 2015 at 12:24

@GoogleCodeExporter
Copy link
Author

I would like to support this also, but the current way it's implemented is a 
hack and not well scalable. Overall this goes back to the long-neglected 
https://code.google.com/p/hackerskeyboard/issues/detail?id=13 .

Going forward, I want to decouple languages and layouts. Basically, users can 
create one or more "configs", where a config selects a portrait-mode layout, a 
landscape-mode layout, and an input language (for dictionaries and alt chars). 
The UI would provide separate actions for "next config with the same language" 
(replacing the 4-row/compact/full switch action) and "next config with 
different language" (swipe on space bar or language switch actions).

In this model, there could potentially be any number of layouts for a given 
language. By default, the config selector would only offer layouts matching the 
selected language, but this could be overridden - if someone wants German 
dictionary with a US QWERTY layout, that should be possible.

Original comment by [email protected] on 9 Jun 2015 at 5:47

  • Changed state: Accepted

@AntonGut
Copy link

Hi Klaus,

I see you just recently closed a similar issue #682 without resolution.

Still, over 3 years ago you had some plan to potentially implement the compact 5-row for other languages. Is it abandoned? Is there anything that can be done by someone else than you?

Is there any progress on issue #13?

I would appreciate any feedback!

@klausw
Copy link
Owner

klausw commented Dec 10, 2018

I had closed #682 since the non-internationalization is currently the expected behavior.

I don't have active plans for a major change such as needed for #13. There are two ways to internationalize the compact 5-row keyboard. You could add language-specific altchars via the XML file, this works OK for languages that are OK with a QWERTY layout and just want some additional long-press characters.

For a fully custom keyboard that isn't QWERTY, you'd need to make a copy of https://github.com/klausw/hackerskeyboard/blob/master/app/src/main/res/xml/kbd_compact.xml into the xml-uk/ directory and edit the layout to match your language. This is kind of tedious, and gets ugly for non-QWERTY since you basically need to hardcode altchars, you can't just add an alternates_for_X entry for an X key that isn't part of the default layout. Nobody has done that so far, and I haven't been encouraging it since it would make future refactorings harder. At this point, since those refactorings are unlikely, I'd be open to contributed compact layouts.

@AntonGut
Copy link

AntonGut commented Dec 11, 2018

Thanks a lot for the detailed reply! I might find some time to look into that. I don't expect hardcoding altchars would be too bad for one language.
Just to clarify: The only change needed to the code is a custom "kbd_compact.xml", everything else is already there?
And another thing. I am familiar with coding and can imagine what changes would be needed to the code to make it work even if I don't understand every line (yet). I would like to be able to test my changes though, and I have never done any coding/compiling for android before. Can you point me in the right direction to a suitable build environment? Either on linux or windows. Doesn't need to be a manual, obviously. But a short list of the tools you use would help me a lot.

@klausw
Copy link
Owner

klausw commented Dec 11, 2018

There's also a kbd_compact_fn.xml, but you can keep that unmodified if you're OK with the existing layout for that.

In theory adding the localized kbd_compact.xml should be sufficient to make it work, but this is somewhat uncharted territory since I haven't previously tried localizing this layout.

There's also a layout table in https://github.com/klausw/hackerskeyboard/blob/master/app/src/main/java/org/pocketworkstation/pckeyboard/InputLanguageSelection.java that's autogenerated by a script, but that doesn't currently know about the compact 5-row layout. It should be OK without that, this table is mainly used for showing the available features in the language selection dialog.

Old instructions are in https://github.com/klausw/hackerskeyboard/wiki/AddingNewLayouts , but that isn't entirely up to date. Android Studio and/or Gradle are pretty good about giving warnings if there's an issue with the mapping, for example it detects if you're trying to override a nonexistent string.

@klausw
Copy link
Owner

klausw commented Dec 11, 2018

I've just updated https://github.com/klausw/hackerskeyboard/wiki/BuildingFromSource , the project is now Android Studio / Gradle compatible.

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

No branches or pull requests

3 participants