Skip to content

Commit 57bb3f8

Browse files
committed
Release v3.7.1: Custom AI Keys & Visibility Fixes
1 parent a00070b commit 57bb3f8

File tree

102 files changed

+1773
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1773
-482
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ about: Create a report to help us improve
44
labels: bug
55
---
66

7-
Please see the appropriate readme section for issue reporting guidelines: https://github.com/Helium314/HeliBoard?tab=readme-ov-file#reporting-issues
7+
Please see the appropriate readme section for issue reporting guidelines: https://github.com/LeanBitLab/HeliboardL?tab=readme-ov-file#reporting-issues
88
tl;dr:
99
* search for duplicates, also in closed issues
1010
* a single issue per topic

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ contact_links:
44
url: https://codeberg.org/Helium314/aosp-dictionaries
55
about: Requests for dictionaries (used for suggestions / autocompletion) will be handled in the linked dictionary repository. You can check whether a dictionary for the language you want already exists there.
66
- name: Discussion
7-
url: https://github.com/Helium314/HeliBoard/discussions
7+
url: https://github.com/LeanBitLab/HeliboardL/discussions
88
about: For discussions and feedback about this app, asking questions or talking about ideas which are not yet actionable (i.e. not suitable for an issue).
99
- name: Question
10-
url: https://github.com/Helium314/HeliBoard/discussions/new?category=q-a
10+
url: https://github.com/LeanBitLab/HeliboardL/discussions/new?category=q-a
1111
about: For questions please use the discussions section. You may also want to search your question in the FAQ (see readme).

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ signing.properties
2424

2525
# Offline model files
2626
tokenizer.json
27+
node_modules

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Getting Started
22

3-
HeliBoard project is based on Gradle and Android Gradle Plugin. To get started, you can install [Android Studio](https://developer.android.com/studio), and import project 'from Version Control / Git / Github' by providing this git repository [URL](https://github.com/Helium314/HeliBoard) (or git SSH [URL](git@github.com:Helium314/heliboard.git)).
3+
HeliBoard project is based on Gradle and Android Gradle Plugin. To get started, you can install [Android Studio](https://developer.android.com/studio), and import project 'from Version Control / Git / Github' by providing this git repository [URL](https://github.com/LeanBitLab/HeliboardL) (or git SSH [URL](git@github.com:LeanBitLab/HeliboardL.git)).
44
Of course you can also use any other compatible IDE, or work with text editor and command line.
55
Once everything is up correctly, you're ready to go!
66

@@ -27,7 +27,7 @@ Some hints for finding what you're looking for:
2727
## Recommended
2828

2929
If you want to contribute, it's a good idea to make sure your idea is actually wanted in HeliBoard.
30-
Best check related issues before you start working on a PR. If the issue has the [labels](https://github.com/Helium314/HeliBoard/labels) [_PR_](https://github.com/Helium314/HeliBoard/labels/PR) or [_contributor needed_](https://github.com/Helium314/HeliBoard/issues?q=label%3A%22contributor%20needed%22) (even closed ones), contributions are wanted. If you don't find a related issue, it's recommended to open one, but ultimately it's your choice.
30+
Best check related issues before you start working on a PR. If the issue has the [labels](https://github.com/LeanBitLab/HeliboardL/labels) [_PR_](https://github.com/LeanBitLab/HeliboardL/labels/PR) or [_contributor needed_](https://github.com/LeanBitLab/HeliboardL/issues?q=label%3A%22contributor%20needed%22) (even closed ones), contributions are wanted. If you don't find a related issue, it's recommended to open one, but ultimately it's your choice.
3131
Asking before starting a PR may help you for getting pointers to potentially relevant code, and deciding how to implement your desired changes.
3232

3333
HeliBoard is a complex application and used by users with a large variety of opinions on how things should be.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ This fork adds **optional AI-powered features** using Gemini, Groq, and OpenAI-c
1717
- **🤖 Multi-Provider AI** - Proofread using **Gemini**, **Groq** (Llama 3, Mixtral), or **OpenAI-compatible** providers.
1818
- **🛡️ Offline AI** - Private, on-device proofreading and translation using ONNX models (Offline build only).
1919
- **🌐 AI Translation** - Translate selected text directly using your chosen AI provider.
20+
- **🧠 Custom AI Keys** - Assign custom prompts and personas (#editor, #proofread) to 10 customizable toolbar keys.
2021
- **⌨️ Dual Toolbar / Split Suggestions** - Option to split suggestions and toolbar for easier access.
2122
- **🖱️ Touchpad Mode** - Swipe spacebar up to toggle touchpad; custom sensitivity controls.
2223
- **🎨 Modern UI** - "Squircle" key backgrounds, refined icons, and polished aesthetics.
2324
- **🔄 Google Dictionary Import** - Easily import your personal dictionary words.
2425
- **⚙️ Enhanced Customization** - Force auto-capitalization toggle, reorganized settings, and more.
2526
- **🕵️ Clear Incognito Mode** - Distinct "Hat & Glasses" icon for clear visibility.
26-
- **🔒 Privacy Choices** - Choose **Standard** (Offline-first with opt-in AI) or **Offline** (Hard-disabled network) versions.
27+
- **🔍 Clipboard Search** - Search through your clipboard history directly from the toolbar.
28+
- **🔒 Privacy Choices** - Choose **Standard** (Opt-in AI), **Offline** (Hard-disabled network, offline model load), or **Offline Lite** (Minimalist, no AI) versions.
2729

2830
## Screenshots
2931

app/build.gradle.kts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ android {
2222
applicationId = "helium314.keyboardl"
2323
minSdk = 21
2424
targetSdk = 35
25-
versionCode = 3700
26-
versionName = "3.7.0"
25+
versionCode = 3701
26+
versionName = "3.7.1"
2727

2828
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
2929
}
@@ -90,7 +90,22 @@ android {
9090
signingConfig = signingConfigs.getByName("debug")
9191
applicationIdSuffix = ".debug"
9292
}
93-
base.archivesBaseName = "HeliboardL_" + defaultConfig.versionName
93+
// base.archivesBaseName = "HeliboardL_" + defaultConfig.versionName // replaced by dynamic naming below
94+
applicationVariants.all {
95+
val flavor = productFlavors.firstOrNull()?.name ?: ""
96+
val number = when(flavor) {
97+
"standard" -> "1"
98+
"offline" -> "2"
99+
"offlinelite" -> "3"
100+
else -> ""
101+
}
102+
if (number.isNotEmpty()) {
103+
outputs.all {
104+
val output = this as? com.android.build.gradle.api.ApkVariantOutput
105+
output?.outputFileName = "$number-HeliboardL_${defaultConfig.versionName}-${flavor}-${buildType.name}.apk"
106+
}
107+
}
108+
}
94109
// got a little too big for GitHub after some dependency upgrades, so we remove the largest dictionary
95110
androidComponents.onVariants { variant: ApplicationVariant ->
96111
if (variant.buildType == "debug") {
@@ -123,6 +138,8 @@ android {
123138
}
124139
}
125140

141+
142+
126143
testOptions {
127144
unitTests {
128145
isIncludeAndroidResources = true

app/src/debug/res/values/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
SPDX-License-Identifier: GPL-3.0-only
44
-->
55
<resources>
6-
<string name="english_ime_name" translatable="false">HeliBoard debug</string>
7-
<string name="spell_checker_service_name" translatable="false">HeliBoard debug Spell Checker</string>
8-
<string name="ime_settings" translatable="false">HeliBoard debug Settings</string>
6+
<string name="english_ime_name" translatable="false">HeliboardL debug</string>
7+
<string name="spell_checker_service_name" translatable="false">HeliboardL debug Spell Checker</string>
8+
<string name="ime_settings" translatable="false">HeliboardL debug Settings</string>
99

1010
</resources>
1.52 MB
Binary file not shown.

app/src/main/java/helium314/keyboard/keyboard/KeyboardTheme.kt

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ private constructor(val themeId: Int, @JvmField val mStyleId: Int) {
5050

5151
// new themes that are just colors
5252
const val THEME_LIGHT = "light"
53+
const val THEME_LEANBITLAB_LIGHT = "leanbitlab_light"
54+
const val THEME_LEANBITLAB_DARK = "leanbitlab_dark"
5355
const val THEME_HOLO_WHITE = "holo_white"
5456
const val THEME_DARK = "dark"
5557
const val THEME_DARKER = "darker"
@@ -66,7 +68,10 @@ private constructor(val themeId: Int, @JvmField val mStyleId: Int) {
6668
const val THEME_SAND = "sand"
6769
const val THEME_VIOLETTE = "violette"
6870
fun getAvailableDefaultColors(prefs: SharedPreferences, isNight: Boolean) = listOfNotNull(
69-
if (!isNight) THEME_LIGHT else null, THEME_DARK,
71+
if (!isNight) THEME_LIGHT else null,
72+
if (!isNight) THEME_LEANBITLAB_LIGHT else null,
73+
THEME_LEANBITLAB_DARK,
74+
THEME_DARK,
7075
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) THEME_DYNAMIC else null,
7176
if (prefs.getString(Settings.PREF_THEME_STYLE, Defaults.PREF_THEME_STYLE) == STYLE_HOLO) THEME_HOLO_WHITE else null,
7277
THEME_DARKER,
@@ -152,6 +157,30 @@ private constructor(val themeId: Int, @JvmField val mStyleId: Int) {
152157
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) DynamicColors(context, themeStyle, hasBorders, backgroundImage)
153158
else getThemeColors(THEME_LIGHT, themeStyle, context, prefs, isNight)
154159
}
160+
THEME_LEANBITLAB_LIGHT -> DefaultColors(
161+
themeStyle,
162+
hasBorders,
163+
"#9AA0A6".toColorInt(), // Accent (Google Grey 500) - Darker than functional (#DADCE0)
164+
"#F1F3F4".toColorInt(), // Background (Google Light Grey)
165+
"#FFFFFF".toColorInt(), // Key Bg
166+
"#DADCE0".toColorInt(), // Functional Key (Google Grey)
167+
"#FFFFFF".toColorInt(), // Spacebar
168+
"#000000".toColorInt(), // Text
169+
"#B3000000".toColorInt(), // Hint
170+
keyboardBackground = backgroundImage
171+
)
172+
THEME_LEANBITLAB_DARK -> DefaultColors(
173+
themeStyle,
174+
hasBorders,
175+
"#5F6368".toColorInt(), // Accent (Google Grey 700) - Lighter than functional (#3C4043)
176+
"#202124".toColorInt(), // Background (Google Dark)
177+
"#303134".toColorInt(), // Key Bg (Google Dark Key)
178+
"#3C4043".toColorInt(), // Functional Key (Google Dark Lighter)
179+
"#303134".toColorInt(), // Spacebar
180+
"#FFFFFF".toColorInt(), // Text
181+
"#B3FFFFFF".toColorInt(), // Hint
182+
keyboardBackground = backgroundImage
183+
)
155184
THEME_LIGHT -> DefaultColors(
156185
themeStyle,
157186
hasBorders,

app/src/main/java/helium314/keyboard/keyboard/MainKeyboardView.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,10 +881,15 @@ private void drawLanguageOnSpacebar(final Key key, final Canvas canvas, final Pa
881881
private void drawIncognitoOnSpacebar(final Key key, final Canvas canvas) {
882882
final int width = key.getWidth();
883883
final int height = key.getHeight();
884-
// Draw incognito icon centered on spacebar with low opacity
885884
final int iconSize = (int) (height * 0.8f);
886-
final int iconX = (width - iconSize) / 2;
887885
final int iconY = (height - iconSize) / 2;
886+
887+
int iconX = (width - iconSize) / 2;
888+
// If language text is visible, move the icon to the right to avoid overlap
889+
if (mLanguageOnSpacebarFormatType != LanguageOnSpacebarUtils.FORMAT_TYPE_NONE) {
890+
iconX = width - iconSize - (int) (width * 0.05f); // 5% padding from right edge
891+
}
892+
888893
mIncognitoIcon.setAlpha(38); // ~15% opacity for very subtle watermark effect
889894
mIncognitoIcon.setBounds(iconX, iconY, iconX + iconSize, iconY + iconSize);
890895
mIncognitoIcon.draw(canvas);

0 commit comments

Comments
 (0)