Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Helium314 authored Mar 11, 2024
2 parents 989c084 + 1ffa476 commit 4895cff
Show file tree
Hide file tree
Showing 177 changed files with 2,619 additions and 1,135 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ labels: enhancement

<!--
Please search open and closed issues to avoid duplicates. Maybe what you want has already been discussed or is mentioned in the readme.
If you have more than one feature request, open mulitple issues (one for each) unleass the requests are closely related.
Note that given the number of feature requests and available developer time, it may take a long time until the feasture request gets attention.
If you have more than one feature request, open multiple issues (one for each) unless the requests are closely related.
Note that given the number of feature requests and available developer time, it may take a long time until the feature request gets attention.
When a "PR" or "contributor needed" label is added, the feature request is accepted, and interested contributors are welcome to work on this (please comment when you're working on an issue).
-->

Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
* Please bescribe briefly what your pull request proposes to fix or improve.
* Please describe briefly what your pull request proposes to fix or improve.
* If it's not completely obvious, describe what the PR does to achieve the desired result.
* If you use someone else's code, please mention or better link to the source.
* See the contributing section in the readme for more detailed guidelines
* See the contributing section in the readme for more detailed guideline: https://github.com/Helium314/HeliBoard?tab=readme-ov-file#guidelines
-->
19 changes: 12 additions & 7 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Build
name: Build debug

on:
push:
branches: [ new ]
# don't run on main. I noticed I often don't push commits to avoid unnecessary workflow runs
branches-ignore: [ main ]
paths:
- 'app/**'
pull_request:
branches: [ new ]
paths:
- 'app/**'

jobs:
build:
Expand All @@ -15,11 +19,12 @@ jobs:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- uses: gradle/actions/setup-gradle@v3

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand All @@ -28,13 +33,13 @@ jobs:
run: ./gradlew assembleDebug

- name: Upload APK
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: HeliBoard-debug
path: app/build/outputs/apk/debug/*-debug*.apk

- name: Archive reports for failed job
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reports
path: '*/build/reports'
Expand Down
50 changes: 40 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# HeliBoard
HeliBoard is a privacy-conscious and customizable open-source keyboard, based on AOSP / OpenBoard.
Does not use internet permission, and thus is 100% offline.

## Table of Contents

Expand All @@ -11,36 +12,45 @@ HeliBoard is a privacy-conscious and customizable open-source keyboard, based on
* [Translation](#translation)
* [Dictionary Creation](#dictionary-creation)
* [Code Contribution](#code-contribution)
- [To-do](#to-do)
- [License](#license)
- [Credits](#credits)

# Features
* Add dictionaries for suggestions and spell check
* build your own, or get them [here](https://codeberg.org/Helium314/aosp-dictionaries#dictionaries), or in the [experimental](https://codeberg.org/Helium314/aosp-dictionaries#experimental-dictionaries) section (quality may vary)
* add them in language settings (click on the language, then on `+` next to _dictionary_), or open the file in a file explorer
* additional dictionaries for emojis or scientific symbols can be used to provide suggestions ("emoji search")
* note that for Korean layouts, suggestions only work using [this dictionary](https://github.com/openboard-team/openboard/commit/83fca9533c03b9fecc009fc632577226bbd6301f), the tools in the dictionary repository are not able to create working dictionaries
* Customize keyboard themes (style, colors and background image)
* can follow the system's day/night setting on Android 10+ (and on some versions of Android 9)
* can follow dynamic colors for Android 12+
* Customize keyboard [layouts](layouts.md)
* Customize keyboard [layouts](layouts.md) (only available when disabling _use system languages_)
* Multilingual typing
* Glide typing (_only with closed source library_)
* Glide typing (_only with closed source library_ ☹️)
* library not included in the app, as there is no compatible open source library available
* can be extracted from GApps packages ("_swypelibs_"), or downloaded [here](https://github.com/erkserkserks/openboard/tree/master/app/src/main/jniLibs)
* if you are concerned about security implications of loading user-provides libraries, please use the _nouserlib_ build variant, which removes this option. If HeliBoard is installed as system app, and _swypelibs_ are available for the system, they will be used.
* If the app is installed as a system app and _swypelibs_ are available, glide typing will be available independent of the version.
* Clipboard history
* One-handed mode
* Split keyboard (if the screen is large enough)
* Split keyboard (only available if the screen is large enough)
* Number pad
* Backup and restore your learned word / history data

## FAQ / Common Issues
* __Emoji search__: You can get addon dictionaries for emoji suggestions in the [dictionaries repo](https://codeberg.org/Helium314/aosp-dictionaries). An actual search funtion does not exist.
* __Add a dictionary__: First download the dictionary file, e.g. from [here](https://codeberg.org/Helium314/aosp-dictionaries#dictionaries). Then go to language settings, click on the language, then on `+` next to _dictionary_ the _add_ and select the file. Alternatively you can open a `.dict` file in a file explorer with HeliBoard and then select the language. Note that the latter method does not work with all file explorers.
* __Emoji search__: You can get addon dictionaries for emoji suggestions in the [dictionaries repo](https://codeberg.org/Helium314/aosp-dictionaries). An actual search function does not exist yet.
* __Cannot switch choose layout__: This is only possible when _use system languages_ is disabled.
* __No suggestions for some language__: Check [dictionaries repo](https://codeberg.org/Helium314/aosp-dictionaries) whether a dictionary is available. If there is one, download it and add it in the language settings for this language.
* __No suggestions in some app / text field__: This app respects the [no suggestions flag](https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_NO_SUGGESTIONS) set by some input fields, i.e. the developer does not want you to see suggestions here. Best do in issue report for that app if you think this behavior is wrong. Alternatively you can enable the _always show suggestions_ setting that overrides the _no suggestions_ flag.
* __How to enable glide typing__: There is no glide typing built into this app, but you can load compatible libraries: Go to advanced settings -> _load gesture typing library_ and point to a file. You can extract the file from GApps packages ("_swypelibs_"), or download one [here](https://github.com/erkserkserks/openboard/tree/master/app/src/main/jniLibs). Make sure to use the correct version (app will tell you in the dialog to load the library).
* (_to be expanded_...) <!-- auto-correct? incognito always on? can't load library? -->
* __Multilingual typing__: Enable in _Languages & Layouts_, select the main language and tap the `+` button next to _multilingual typing_ to add a language. Note that the selection is limited to languages with the same script as the main language, and to languages that have a dictionary (see above for how to add).
* __How to enable glide typing__: There is no glide typing built into this app, but you can load compatible libraries: Go to advanced settings -> _load gesture typing library_ and point to a file (setting not available in _nouserlib_ version). You can extract the file from GApps packages ("_swypelibs_"), or download one [here](https://github.com/erkserkserks/openboard/tree/master/app/src/main/jniLibs). Make sure to use the correct version (app will tell you in the dialog to load the library).
* __Glide typing is not working after loading a library__: Possibly the download was corrupted, or you downloaded the wrong file. If you get a "_unknown file_" confirmation popup, it is likely you are not using the correct file (or you might be using a different version of the library).
* __What is the _nouserlib_ version?__: The normal version (_release_) allows the user to provide a library for glide typing. Running code that isn't supplied with the app is _dynamic code loading_, which is a security risk. Android Studio warns about this:
> Dynamically loading code from locations other than the application's library directory or the Android platform's built-in library directories is dangerous, as there is an increased risk that the code could have been tampered with. Applications should use loadLibrary when possible, which provides increased assurance that libraries are loaded from one of these safer locations. Application developers should use the features of their development environment to place application native libraries into the lib directory of their compiled APKs.
The app checks the SHA256 checksum of the library and warns the user if it doesn't match with known library versions. A mismatch indicates the library was modified, but may also occur if the user intentionally provides a different library than expected (e.g. a self-built variant).
* (_to be expanded_...)

## Hidden Functionality
Features that may go unnoticed, and further potentially useful information
Expand All @@ -63,7 +73,7 @@ Features that may go unnoticed, and further potentially useful information
* Long-press a suggestion in the suggestion strip twice to show the source dictionary.
* When using debug APK, you can find Debug Settings within the Advanced Preferences, though the usefulness is limited except for dumping dictionaries into the log.
* In the event of an application crash, you will be prompted whether you want the crash logs when you open the Settings.
* When using multilingual typing, space bar will show an confidence value used for determining the currenly used language.
* When using multilingual typing, space bar will show an confidence value used for determining the currently used language.
* Suggestions will have some tiny numbers on top showing some internal score and source dictionary (can be disabled)
* For users doing manual backups with root access: Starting at Android 7, some files and the main shared preferences file are not in the default location, because the app is using [device protected storage](https://developer.android.com/reference/android/content/Context#createDeviceProtectedStorageContext()). This is necessary so the settings and layout files can be read before the device is unlocked, e.g. at boot. The files are usually located in `/data/user_de/0/<package_id>/`, though the location may depend on the device and Android version.

Expand All @@ -77,10 +87,11 @@ Before opening a new issue, be sure to check the following:
- **Does the issue already exist?** Make sure a similar issue has not been reported by browsing [existing issues](https://github.com/Helium314/HeliBoard/issues). Please search open and closed issues.
- **Is the issue still relevant?** Make sure your issue is not already fixed in the latest version of HeliBoard.
- **Did you use the issue template?** It is important to make life of our kind contributors easier by avoiding issues that miss key information to their resolution.
Note that issues that that ignore part of the issue template will likely get treated with very low priority, as often they are needlessly hard to read or understand (e.g. huge screenshots, or addressing multiple topics).
Note that issues that that ignore part of the issue template will likely get treated with very low priority, as often they are needlessly hard to read or understand (e.g. huge screenshots, not providing a proper description, or addressing multiple topics).

## Translation
Translations can be added using [Weblate](https://translate.codeberg.org/projects/heliboard/). You will need an account to update translations and add languages. Add the language you want to translate to in Languages -> Manage translated languages in the top menu bar.
Updating translations in a PR will not be accepted, as it may cause conflicts with Weblate translations.

## Dictionary Creation
There will not be any further dictionaries bundled in this app. However, you can add dictionaries to the [dictionaries repository](https://codeberg.org/Helium314/aosp-dictionaries).
Expand Down Expand Up @@ -112,12 +123,31 @@ In addition to previous elements, HeliBoard must stick to [F-Droid inclusion gui

### Adding Layouts

See [layouts.md](layouts.md) for how to add new layouts to the app.
See [layouts.md](layouts.md#adding-new-layouts--languages) for how to add new layouts to the app.

### Update Emojis

See make-emoji-keys tool [README](tools/make-emoji-keys/README.md).

### Update List of Existing Dictionaries

See make-dict-list tool [README](tools/make-dict-list/README.md).

# To-do
Planned features and improvements
* Customizable functional key layout
* Will likely result in having the same functional key layout for alphabet and symbols layouts
* Support for _alt_, _ctrl_, _meta_ and _fn_ (#479)
* Less complicated addition of languages (e.g. #519)
* Additional and customizable key swipe functionality
* Some functionality will not be possible when using glide typing
* Ability to enter all emojis independent of Android version (optional, #297)
* (limited) support for customizing _all_ internally used colors
* Add and enable emoji dictionaries by default (if available for language)
* Clearer / more intuitive arrangement of settings
* Maybe hide some less used settings by default (similar to color customization)
* Bug fixes

# License

HeliBoard (as a fork of OpenBoard) is licensed under GNU General Public License v3.0.
Expand Down
85 changes: 85 additions & 0 deletions app/src/main/assets/dictionaries_in_dict_repo.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
main,ar,
main,hy,
main,as,
main,bn,
main,by,
main,bg,
main,ca,
main,hr,
main,cs,
main,da,
main,nl,
main,en_AU,
main,en_GB,
main,en_US,
emoji,en,
main,eo,
main,fi,
emoji,fr,
main,fr,
main,gl,
main,ka,
main,de,
main,gom,
main,el,
main,gu,
main,he,
main,iw,
main,hi,
main,hi_ZZ,
main,hu,
main,it,
main,kn,
main,ks,
main,lv,
main,lt,
main,lb,
main,mai,
main,ml,
main,mr,
main,nb,
main,or,
main,pl,
main,pt_BR,
main,pt_PT,
main,pa,
main,ro,
emoji,ru,
main,ru,
main,sa,
main,sat,
main,sr_ZZ,
main,sr,
main,sd,
main,sl,
main,es,
main,sv,
main,ta,
main,te,
main,tok,
main,tcy,
main,tr,
main,uk,
main,ur,
main,af,exp
main,ar,exp
main,bn,exp
main,bg,exp
main,cs,exp
main,en_GB,exp
main,en_US,exp
symbols,en,exp
symbols,fr,exp
main,fr,exp
main,de_AT,exp
main,de,exp
main,id,exp
main,it,exp
main,kab,exp
addon,ml_ZZ,exp
main,ru,exp
main,sk,exp
main,es,exp
main,uk,exp
main,vi,exp

10 changes: 1 addition & 9 deletions app/src/main/assets/language_key_texts/tr.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[popup_keys]
a â ä á
e ə é
i ı î ï ì í į ī
ı i î ï ì í į ī
o ö ô œ ò ó õ ø ō
u ü û ù ú ū
s ş ß ś š
Expand All @@ -10,11 +10,3 @@ n ň ñ
c ç ć č
y ý
z ž

[extra_keys]
1: ğ
1: ü
2: ş
2: î
3: ö
3: ç
16 changes: 16 additions & 0 deletions app/src/main/assets/language_key_texts/xdq.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[popup_keys]
у у́ ю
е е́ э ё
ш щ
а а́
п ф
о о́
и и́ ы
ъ ӏ
я я́
ь ӏ
' ’ ‚ ‘
" ” „ “

[labels]
alphabet: АБВ
32 changes: 32 additions & 0 deletions app/src/main/assets/layouts/kaitag.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
й
ц
у
к
е
н
г
ш
ҡ
з
х №

ҳ
ғ
в
а
п
р
о
л
д
ж /
ъ ~

я
ч
с
м
и
т
ь
б < >
34 changes: 34 additions & 0 deletions app/src/main/assets/layouts/turkish.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
q
w
e
r
t
y
u
ı
o
p
ğ
ü

a
s
d
f
g
h
j
k
l
ş
i

z
x
c
v
b
n
m
ö
ç
Loading

0 comments on commit 4895cff

Please sign in to comment.