Skip to content

Commit 2d197d0

Browse files
authored
Merge pull request #1690 from keymapperorg/develop
Version 3.1.0
2 parents c8e6229 + 301f108 commit 2d197d0

File tree

112 files changed

+6890
-480
lines changed

Some content is hidden

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

112 files changed

+6890
-480
lines changed

.cursor/rules/create-action.mdc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: false
5+
---
6+
[ActionEntity.kt](mdc:app/src/main/java/io/github/sds100/keymapper/data/entities/ActionEntity.kt) [ActionDataEntityMapper.kt](mdc:app/src/main/java/io/github/sds100/keymapper/actions/ActionDataEntityMapper.kt) [ActionData.kt](mdc:app/src/main/java/io/github/sds100/keymapper/actions/ActionData.kt) [ActionId.kt](mdc:app/src/main/java/io/github/sds100/keymapper/actions/ActionId.kt) [PerformActionsUseCase.kt](mdc:app/src/main/java/io/github/sds100/keymapper/actions/PerformActionsUseCase.kt) [ActionUtils.kt](mdc:app/src/main/java/io/github/sds100/keymapper/actions/ActionUtils.kt) [strings.xml](mdc:app/src/main/res/values/strings.xml) [ActionUiHelper.kt](mdc:app/src/main/java/io/github/sds100/keymapper/actions/ActionUiHelper.kt) [CreateActionDelegate.kt](mdc:app/src/main/java/io/github/sds100/keymapper/actions/CreateActionDelegate.kt)
7+
8+
9+
When you create an action you must follow these steps:
10+
11+
0. Ask me whether the action is editable.
12+
1. Create a new id in ActionId
13+
2. Create a new ActionData
14+
3. Map the data to and from an entity in ActionDataEntityMapper
15+
4. Give the action a category in ActionUtils
16+
5. If the action is editable then add it to the isEditable function in ActionUtils
17+
6. Create a title for the action in strings.xml
18+
7. Give the action a title and icon in ActionUtils. Only create a compose Icon. Ignore the drawable one.
19+
8. Give the action a title in ActionUiHelper
20+
9. Stub out the action in PerformActionsUseCase
21+
10. Handle creating the action in CreateActionDelegate
22+
23+
Important things to remember:
24+
25+
- Do not delete any existing code for other actions.
26+
- Follow the naming of existing code and strings and do not change them.
27+
- Add code near existing code for similar actions.

.cursor/rules/jetpack-compose.mdc

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: false
5+
---
6+
7+
# Android Native (Jetpack Compose)
8+
9+
# Android Jetpack Compose .cursorrules
10+
11+
## Flexibility Notice
12+
**Note:** This is a recommended project structure, but be flexible and adapt to existing project structures. Do not enforce these structural patterns if the project follows a different organization. Focus on maintaining consistency with the existing project architecture while applying Jetpack Compose best practices.
13+
14+
## Project Architecture and Best Practices
15+
```kotlin
16+
val androidJetpackComposeBestPractices = listOf(
17+
"Adapt to existing project architecture while maintaining clean code principles",
18+
"Follow Material Design 3 guidelines and components",
19+
"Implement clean architecture with domain, data, and presentation layers",
20+
"Use Kotlin coroutines and Flow for asynchronous operations",
21+
"Implement dependency injection using Hilt",
22+
"Follow unidirectional data flow with ViewModel and UI State",
23+
"Use Compose navigation for screen management",
24+
"Implement proper state hoisting and composition"
25+
)
26+
```
27+
28+
## Folder Structure
29+
**Note:** This is a reference structure. Adapt to the project's existing organization.
30+
```plaintext
31+
app/
32+
src/
33+
main/
34+
java/io/github/sds100/keymapper
35+
actions/
36+
constraints/
37+
groups/
38+
home/
39+
mappings/
40+
keymaps/
41+
utils/
42+
res/
43+
values/
44+
drawable/
45+
mipmap/
46+
test/
47+
androidTest/
48+
```
49+
50+
## Compose UI Guidelines
51+
1. Use `remember` and `derivedStateOf` appropriately
52+
2. Implement proper recomposition optimization
53+
3. Use proper Compose modifiers ordering
54+
4. Follow composable function naming conventions
55+
5. Implement proper preview annotations
56+
6. Use proper state management with `MutableState`
57+
7. Implement proper error handling and loading states
58+
8. Use proper theming with `MaterialTheme`
59+
9. Follow accessibility guidelines
60+
10. Implement proper animation patterns
61+
62+
## Performance Guidelines
63+
1. Minimize recomposition using proper keys
64+
2. Use proper lazy loading with `LazyColumn` and `LazyRow`
65+
3. Implement efficient image loading
66+
4. Use proper state management to prevent unnecessary updates
67+
5. Follow proper lifecycle awareness
68+
6. Implement proper memory management
69+
7. Use proper background processing
70+
71+

.idea/codeStyles/Project.xml

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## [3.1.0](https://github.com/sds100/KeyMapper/releases/tag/v3.1.0)
2+
3+
#### 10 May 2025
4+
5+
## Added
6+
7+
- #699 Time constraints ⏰
8+
- #257 Action to interact with user interface elements inside other apps.
9+
- #1663 Actions to stop, step forward, and step backward playing media.
10+
- #1682 Show "Purchased!" text next to the use button for advanced triggers.
11+
12+
## Changed
13+
14+
- Rename tap screen actions inside key maps.
15+
16+
## Bug fixes
17+
18+
- #1683 key event actions work in Minecraft and other apps again.
19+
- Export log files as .txt instead of .zip files.
20+
- #1684 Removed the redundant and broken refresh devices button when configuring a key event action because they are automatically refreshed anyway.
21+
- #1687 restoring key map groups would sometimes fail.
22+
123
## [3.0.1](https://github.com/sds100/KeyMapper/releases/tag/v3.0.1)
224

325
#### 28 April 2025

app/build.gradle

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ android {
119119
}
120120

121121
compileOptions {
122+
// Required for desugaring new Java time API on lower than API 26
123+
coreLibraryDesugaringEnabled = true
124+
122125
sourceCompatibility JavaVersion.VERSION_17
123126
targetCompatibility JavaVersion.VERSION_17
124127
}
@@ -162,7 +165,7 @@ dependencies {
162165

163166
compileOnly project(":systemstubs")
164167

165-
def room_version = "2.6.1"
168+
def room_version = "2.7.1"
166169
def coroutinesVersion = "1.9.0"
167170
def nav_version = '2.8.9'
168171
def epoxy_version = "4.6.2"
@@ -176,7 +179,7 @@ dependencies {
176179
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0"
177180

178181
// random stuff
179-
implementation "com.google.android.material:material:1.13.0-alpha12"
182+
implementation "com.google.android.material:material:1.13.0-alpha13"
180183
implementation "com.github.salomonbrys.kotson:kotson:2.5.0"
181184
implementation "com.airbnb.android:epoxy:$epoxy_version"
182185
implementation "com.airbnb.android:epoxy-databinding:$epoxy_version"
@@ -189,9 +192,10 @@ dependencies {
189192
implementation "dev.rikka.shizuku:api:$shizuku_version"
190193
implementation "dev.rikka.shizuku:provider:$shizuku_version"
191194
implementation "org.lsposed.hiddenapibypass:hiddenapibypass:4.3"
192-
proImplementation 'com.revenuecat.purchases:purchases:8.15.0'
195+
proImplementation 'com.revenuecat.purchases:purchases:8.17.0'
193196
proImplementation "com.airbnb.android:lottie-compose:6.6.3"
194197
implementation("com.squareup.okhttp3:okhttp:4.12.0")
198+
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
195199

196200
// splitties
197201
implementation "com.louiscad.splitties:splitties-bitflags:$splitties_version"
@@ -203,7 +207,7 @@ dependencies {
203207

204208
// androidx
205209
implementation "androidx.legacy:legacy-support-core-ui:1.0.0"
206-
implementation "androidx.core:core-ktx:1.15.0"
210+
implementation "androidx.core:core-ktx:1.16.0"
207211

208212
implementation "androidx.activity:activity-ktx:1.10.1"
209213
implementation "androidx.fragment:fragment-ktx:1.8.6"
@@ -221,15 +225,15 @@ dependencies {
221225
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
222226
implementation "androidx.room:room-runtime:$room_version"
223227
implementation "androidx.viewpager2:viewpager2:1.1.0"
224-
implementation "androidx.datastore:datastore-preferences:1.2.0-alpha01"
228+
implementation "androidx.datastore:datastore-preferences:1.2.0-alpha02"
225229
implementation "androidx.core:core-splashscreen:1.0.1"
226230
implementation "androidx.activity:activity-compose:1.10.1"
227231
implementation "androidx.navigation:navigation-compose:2.8.9"
228232
implementation "androidx.navigation:navigation-fragment-compose:2.8.9"
229233
ksp "androidx.room:room-compiler:$room_version"
230234

231235
// Compose
232-
Dependency composeBom = platform('androidx.compose:compose-bom-beta:2025.03.01')
236+
Dependency composeBom = platform('androidx.compose:compose-bom-beta:2025.04.01')
233237
implementation composeBom
234238
implementation 'androidx.compose.foundation:foundation'
235239
implementation "androidx.compose.ui:ui-android"

0 commit comments

Comments
 (0)