From 2996c309ce42d29b24b66a6c0bffe5ea889fd1d8 Mon Sep 17 00:00:00 2001 From: Philippe Miossec Date: Mon, 22 Jul 2024 11:44:40 +0200 Subject: [PATCH 1/2] Add french Ergo-L layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "A Colemak-style layout for French-speaking users which claims to be better than Bépo for French, better than Dvorak for English and better than Qwerty for programming" See https://github.com/Nuclear-Squid/ErgoL?tab=readme-ov-file#English More information in french from: https://ergol.org/ Compromise made to port Ergo-L to HeliBoard: * the 3 bottom symbol keys have been removed (because for good UX, 3rd line is limited to 7 keys). So kept only letter ones... * dead '*' replaced by a "symbols" key * '[' and ']' coding characters shifted 1 key to the left * decided to show the "coding" characters instead of the accentuated characters (which are easier to find and remember) --- app/src/main/assets/layouts/ergo-l.txt | 30 ++++++++++++++++++++++ app/src/main/res/values/donottranslate.xml | 3 +++ app/src/main/res/values/strings.xml | 11 ++++++++ 3 files changed, 44 insertions(+) create mode 100644 app/src/main/assets/layouts/ergo-l.txt diff --git a/app/src/main/assets/layouts/ergo-l.txt b/app/src/main/assets/layouts/ergo-l.txt new file mode 100644 index 000000000..15601b233 --- /dev/null +++ b/app/src/main/assets/layouts/ergo-l.txt @@ -0,0 +1,30 @@ +q ^ â € 1 +c < ç 2 +o > œ 3 +p $ ô 4 +w % 5 +j @ ^ 6 +m & 7 µ +d * _ 8 § +' | , 9 ; ~ · • " « » “ ” ` ’ ¶ +y ` û 0 + + +a { à +s ( é +e ) è +n } ê +f = ñ ≠ +l \ ( / +r + ) +t - î +i / ï ÷ +u " ù « » “ ” ' ` ’ + +z [ æ +x ] ß +v _ +b # +h ! +g : ; , . … +k ? ¿ \ No newline at end of file diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml index aad83ab52..d0716d272 100644 --- a/app/src/main/res/values/donottranslate.xml +++ b/app/src/main/res/values/donottranslate.xml @@ -45,6 +45,7 @@ colemak_dh workman bepo + ergol pcqwerty @@ -58,6 +59,7 @@ Colemak Mod-DH Workman Bépo + Ergo-L PC diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5fc58d28e..11363bf82 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -460,6 +460,17 @@ are used to. This keyboard does not provide a dictionary, and it is not tied to language among those that use the Latin alphabet. This keyboard is laid out in the Bépo disposition rather than other common dispositions for Latin languages. [CHAR LIMIT=25] --> Alphabet (Bépo) + + Alphabet (Ergo-L) Alphabet (PC) Emoji From 8fddf94121e4eb72b0ae9556fe475ef92e1fb54f Mon Sep 17 00:00:00 2001 From: Helium314 Date: Tue, 8 Apr 2025 16:10:04 +0200 Subject: [PATCH 2/2] fix unable to change one-handed mode scale --- .../java/helium314/keyboard/latin/KeyboardWrapperView.kt | 2 +- .../java/helium314/keyboard/latin/settings/Settings.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/helium314/keyboard/latin/KeyboardWrapperView.kt b/app/src/main/java/helium314/keyboard/latin/KeyboardWrapperView.kt index 5fb5a122d..35a689740 100644 --- a/app/src/main/java/helium314/keyboard/latin/KeyboardWrapperView.kt +++ b/app/src/main/java/helium314/keyboard/latin/KeyboardWrapperView.kt @@ -78,7 +78,7 @@ class KeyboardWrapperView @JvmOverloads constructor( val changePercent = 2 * sign * (x - motionEvent.rawX) / context.resources.displayMetrics.density if (abs(changePercent) < 1) return@setOnTouchListener true x = motionEvent.rawX - val oldScale = Settings.readOneHandedModeScale(context.prefs(), Settings.getValues().mDisplayOrientation == Configuration.ORIENTATION_PORTRAIT) + val oldScale = Settings.readOneHandedModeScale(context.prefs(), Settings.getValues().mDisplayOrientation == Configuration.ORIENTATION_LANDSCAPE) val newScale = (oldScale + changePercent / 100f).coerceAtMost(2.5f).coerceAtLeast(0.5f) if (newScale == oldScale) return@setOnTouchListener true Settings.getInstance().writeOneHandedModeScale(newScale) diff --git a/app/src/main/java/helium314/keyboard/latin/settings/Settings.java b/app/src/main/java/helium314/keyboard/latin/settings/Settings.java index 098b51b0d..0f9c21ed8 100644 --- a/app/src/main/java/helium314/keyboard/latin/settings/Settings.java +++ b/app/src/main/java/helium314/keyboard/latin/settings/Settings.java @@ -361,7 +361,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang public void writeOneHandedModeEnabled(final boolean enabled) { mPrefs.edit().putBoolean(PREF_ONE_HANDED_MODE_PREFIX + - (mSettingsValues.mDisplayOrientation == Configuration.ORIENTATION_PORTRAIT), enabled).apply(); + (mSettingsValues.mDisplayOrientation != Configuration.ORIENTATION_LANDSCAPE), enabled).apply(); } public static float readOneHandedModeScale(final SharedPreferences prefs, final boolean isLandscape) { @@ -370,7 +370,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang public void writeOneHandedModeScale(final Float scale) { mPrefs.edit().putFloat(PREF_ONE_HANDED_SCALE_PREFIX + - (mSettingsValues.mDisplayOrientation == Configuration.ORIENTATION_PORTRAIT), scale).apply(); + (mSettingsValues.mDisplayOrientation != Configuration.ORIENTATION_LANDSCAPE), scale).apply(); } public static int readOneHandedModeGravity(final SharedPreferences prefs, final boolean isLandscape) { @@ -379,7 +379,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang public void writeOneHandedModeGravity(final int gravity) { mPrefs.edit().putInt(PREF_ONE_HANDED_GRAVITY_PREFIX + - (mSettingsValues.mDisplayOrientation == Configuration.ORIENTATION_PORTRAIT), gravity).apply(); + (mSettingsValues.mDisplayOrientation != Configuration.ORIENTATION_LANDSCAPE), gravity).apply(); } public void writeSplitKeyboardEnabled(final boolean enabled, final boolean isLandscape) {