Skip to content

Commit 9a961bc

Browse files
authored
Merge pull request #1991 from keymapperorg/develop
Version 4.0.0 Beta 7
2 parents 8ce8bec + 38cc2c7 commit 9a961bc

File tree

77 files changed

+2563
-1106
lines changed

Some content is hidden

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

77 files changed

+2563
-1106
lines changed

CHANGELOG.md

Lines changed: 353 additions & 324 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Key Mapper supports a huge variety of buttons and keys:
2626
- ALL your phone buttons (volume AND side key)
2727
- Game controllers (D-pad, ABXY, and most others)
2828
- Keyboards
29+
- Mouse buttons
2930
- Headsets and headphones
3031
- Fingerprint sensor
3132

3233
Most devices are already supported, with new devices being added over time. Let us know if it's not working for you and we can prioritize your device.
3334

3435
Not currently supported:
35-
- Mouse buttons
3636
- Joysticks and triggers (LT,RT) on gamepads
3737

3838
Not enough keys? Design your own on-screen button layouts and remap those just like real keys!

app/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ android {
9191
}
9292
}
9393

94+
androidResources {
95+
generateLocaleConfig = true
96+
}
97+
9498
buildFeatures {
9599
dataBinding = true
96100
aidl = true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unqualifiedResLocale=en-US

app/version.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
VERSION_NAME=4.0.0-beta.06
2-
VERSION_CODE=226
1+
VERSION_NAME=4.0.0-beta.07
2+
VERSION_CODE=237

base/src/main/AndroidManifest.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
77
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
8-
<uses-permission android:name="android.permission.READ_LOGS"/>
8+
<uses-permission android:name="android.permission.READ_LOGS" />
99

1010
<uses-permission
1111
android:name="android.permission.QUERY_ALL_PACKAGES"
@@ -117,5 +117,14 @@
117117
android:name="android.support.FILE_PROVIDER_PATHS"
118118
android:resource="@xml/provider_paths" />
119119
</provider>
120+
121+
<service
122+
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
123+
android:enabled="false"
124+
android:exported="false">
125+
<meta-data
126+
android:name="autoStoreLocales"
127+
android:value="true" />
128+
</service>
120129
</application>
121130
</manifest>

base/src/main/assets/whats-new.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ You can now remap ALL buttons when the screen is off (including the power button
1717
• Select notification and alarm sounds for Sound action
1818
• Constraints for keyboard is showing
1919
• Switch next to record trigger button to use PRO mode
20+
• Make floating buttons movable and completely invisible
21+
• Action to toggle night shift
2022

2123
⚙️ Enhanced Controls
2224
• Enable or disable all key maps in a group at once
@@ -26,6 +28,6 @@ You can now remap ALL buttons when the screen is off (including the power button
2628
🔧 Improvements
2729
• Auto-switching keyboard more reliable and quicker on Android 13+
2830
• Wi-Fi connected constraints more reliable
29-
Various bug fixes and performance optimizations
31+
A lot of bug fixes
3032

31-
📖 View the complete changelog at: http://changelog.keymapper.club
33+
📖 View the complete changelog at: http://keymapper.app/changelog

base/src/main/java/io/github/sds100/keymapper/base/BaseMainActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import io.github.sds100.keymapper.base.input.InputEventDetectionSource
2929
import io.github.sds100.keymapper.base.input.InputEventHubImpl
3030
import io.github.sds100.keymapper.base.keymaps.ConfigKeyMapStateImpl
3131
import io.github.sds100.keymapper.base.onboarding.OnboardingUseCase
32+
import io.github.sds100.keymapper.base.settings.AppLocaleAdapterImpl
3233
import io.github.sds100.keymapper.base.system.accessibility.AccessibilityServiceAdapterImpl
3334
import io.github.sds100.keymapper.base.system.permissions.RequestPermissionDelegate
3435
import io.github.sds100.keymapper.base.utils.navigation.NavigationProvider
@@ -104,6 +105,9 @@ abstract class BaseMainActivity : AppCompatActivity() {
104105
@Inject
105106
lateinit var configKeyMapState: ConfigKeyMapStateImpl
106107

108+
@Inject
109+
lateinit var appLocaleAdapter: AppLocaleAdapterImpl
110+
107111
private lateinit var requestPermissionDelegate: RequestPermissionDelegate
108112

109113
private val currentNightMode: Int
@@ -201,6 +205,7 @@ abstract class BaseMainActivity : AppCompatActivity() {
201205
systemBridgeSetupController.invalidateSettings()
202206
networkAdapter.invalidateState()
203207
onboardingUseCase.handledMigrateScreenOffKeyMapsNotification()
208+
appLocaleAdapter.invalidate()
204209
}
205210

206211
override fun onSaveInstanceState(outState: Bundle) {

base/src/main/java/io/github/sds100/keymapper/base/BaseSingletonHiltModule.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import io.github.sds100.keymapper.base.onboarding.OnboardingUseCase
3030
import io.github.sds100.keymapper.base.onboarding.OnboardingUseCaseImpl
3131
import io.github.sds100.keymapper.base.onboarding.SetupAccessibilityServiceDelegate
3232
import io.github.sds100.keymapper.base.onboarding.SetupAccessibilityServiceDelegateImpl
33+
import io.github.sds100.keymapper.base.settings.AppLocaleAdapter
34+
import io.github.sds100.keymapper.base.settings.AppLocaleAdapterImpl
3335
import io.github.sds100.keymapper.base.system.accessibility.AccessibilityServiceAdapterImpl
3436
import io.github.sds100.keymapper.base.system.accessibility.ControlAccessibilityServiceUseCase
3537
import io.github.sds100.keymapper.base.system.accessibility.ControlAccessibilityServiceUseCaseImpl
@@ -208,4 +210,8 @@ abstract class BaseSingletonHiltModule {
208210
@Binds
209211
@Singleton
210212
abstract fun bindClock(impl: ClockImpl): Clock
213+
214+
@Binds
215+
@Singleton
216+
abstract fun bindAppLocaleAdapter(impl: AppLocaleAdapterImpl): AppLocaleAdapter
211217
}

base/src/main/java/io/github/sds100/keymapper/base/actions/ActionData.kt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,24 @@ sealed class ActionData : Comparable<ActionData> {
714714
}
715715
}
716716

717+
@Serializable
718+
sealed class NightShift : ActionData() {
719+
@Serializable
720+
data object Enable : NightShift() {
721+
override val id = ActionId.ENABLE_NIGHT_SHIFT
722+
}
723+
724+
@Serializable
725+
data object Disable : NightShift() {
726+
override val id = ActionId.DISABLE_NIGHT_SHIFT
727+
}
728+
729+
@Serializable
730+
data object Toggle : NightShift() {
731+
override val id = ActionId.TOGGLE_NIGHT_SHIFT
732+
}
733+
}
734+
717735
@Serializable
718736
sealed class StatusBar : ActionData() {
719737
@Serializable

0 commit comments

Comments
 (0)