Skip to content

Commit e88925d

Browse files
authored
Merge pull request #1951 from keymapperorg/develop
4.0.0 Beta 4
2 parents 4eb4095 + 586f640 commit e88925d

File tree

476 files changed

+29981
-17778
lines changed

Some content is hidden

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

476 files changed

+29981
-17778
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ body:
6060
validations:
6161
required: true
6262

63+
- type: input
64+
id: android_version
65+
attributes:
66+
label: Android version
67+
description: Go to your Settings app and find your _Android_ version. NOT the HyperOS, MIUI, OxygenOS, OneUI version.
68+
placeholder: Android 15
69+
validations:
70+
required: true
71+
6372
- type: input
6473
id: device
6574
attributes:

.github/workflows/pull-request.yml

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ jobs:
1717
java-version: 17
1818
cache: 'gradle'
1919

20-
- name: Setup Android SDK
21-
uses: android-actions/setup-android@v2
22-
2320
- name: Unit tests
2421
run: bash ./gradlew testDebugUnitTest
2522

@@ -46,12 +43,48 @@ jobs:
4643
java-version: 17
4744
cache: 'gradle'
4845

49-
- name: Setup Android SDK
50-
uses: android-actions/setup-android@v2
51-
5246
- name: Ktlint check
5347
run: ./gradlew ktlintCheck
5448

49+
rust:
50+
name: Rust code style and tests
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
56+
- name: Setup Rust
57+
uses: dtolnay/rust-toolchain@stable
58+
with:
59+
components: rustfmt, clippy
60+
61+
- name: Install Android Rust targets
62+
run: |
63+
rustup target add armv7-linux-androideabi
64+
rustup target add aarch64-linux-android
65+
rustup target add i686-linux-android
66+
rustup target add x86_64-linux-android
67+
68+
- uses: actions/cache@v3
69+
with:
70+
path: |
71+
~/.cargo/bin/
72+
~/.cargo/registry/index/
73+
~/.cargo/registry/cache/
74+
~/.cargo/git/db/
75+
evdev/src/main/rust/evdev_manager/target/
76+
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
77+
restore-keys: |
78+
${{ runner.os }}-rust-
79+
80+
- name: Check Rust formatting
81+
working-directory: evdev/src/main/rust/evdev_manager
82+
run: cargo fmt --check
83+
84+
- name: Run Rust tests
85+
working-directory: evdev/src/main/rust/evdev_manager
86+
run: cargo test --package evdev_manager_core
87+
5588
apk:
5689
name: Build APK
5790
runs-on: ubuntu-latest
@@ -77,6 +110,18 @@ jobs:
77110

78111
- name: Setup Android SDK
79112
uses: android-actions/setup-android@v2
113+
with:
114+
ndk-version: "27.2.12479018"
115+
116+
- name: Setup Rust
117+
uses: dtolnay/rust-toolchain@stable
118+
119+
- name: Install Android Rust targets
120+
run: |
121+
rustup target add armv7-linux-androideabi
122+
rustup target add aarch64-linux-android
123+
rustup target add i686-linux-android
124+
rustup target add x86_64-linux-android
80125
81126
- name: set up Ruby for fastlane
82127
uses: ruby/setup-ruby@v1

.github/workflows/testing.yml

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ jobs:
2323
java-version: 17
2424
cache: 'gradle'
2525

26-
- name: Setup Android SDK
27-
uses: android-actions/setup-android@v2
28-
2926
- name: Unit tests
3027
run: bash ./gradlew testDebugUnitTest
3128

@@ -52,14 +49,50 @@ jobs:
5249
java-version: 17
5350
cache: 'gradle'
5451

55-
- name: Setup Android SDK
56-
uses: android-actions/setup-android@v2
57-
5852
- name: Ktlint check
5953
run: ./gradlew ktlintCheck
6054

55+
rust:
56+
name: Rust code style and tests
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
62+
- name: Setup Rust
63+
uses: dtolnay/rust-toolchain@stable
64+
with:
65+
components: rustfmt, clippy
66+
67+
- name: Install Android Rust targets
68+
run: |
69+
rustup target add armv7-linux-androideabi
70+
rustup target add aarch64-linux-android
71+
rustup target add i686-linux-android
72+
rustup target add x86_64-linux-android
73+
74+
- uses: actions/cache@v3
75+
with:
76+
path: |
77+
~/.cargo/bin/
78+
~/.cargo/registry/index/
79+
~/.cargo/registry/cache/
80+
~/.cargo/git/db/
81+
evdev/src/main/rust/evdev_manager/target/
82+
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
83+
restore-keys: |
84+
${{ runner.os }}-rust-
85+
86+
- name: Check Rust formatting
87+
working-directory: evdev/src/main/rust/evdev_manager
88+
run: cargo fmt --check
89+
90+
- name: Run Rust tests
91+
working-directory: evdev/src/main/rust/evdev_manager
92+
run: cargo test --package evdev_manager_core
93+
6194
apk:
62-
name: Generate and upload APK to Discord
95+
name: Build APK
6396
runs-on: ubuntu-latest
6497
steps:
6598
- name: Checkout repository
@@ -89,6 +122,18 @@ jobs:
89122

90123
- name: Setup Android SDK
91124
uses: android-actions/setup-android@v2
125+
with:
126+
ndk-version: "27.2.12479018"
127+
128+
- name: Setup Rust
129+
uses: dtolnay/rust-toolchain@stable
130+
131+
- name: Install Android Rust targets
132+
run: |
133+
rustup target add armv7-linux-androideabi
134+
rustup target add aarch64-linux-android
135+
rustup target add i686-linux-android
136+
rustup target add x86_64-linux-android
92137
93138
- name: set up Ruby for fastlane
94139
uses: ruby/setup-ruby@v1
@@ -122,21 +167,6 @@ jobs:
122167
name: ${{ env.APK_NAME }}
123168
path: app/build/outputs/apk/ci/${{ env.APK_NAME }}.apk
124169

125-
- name: Upload to Discord
126-
uses: sinshutu/upload-to-discord@v2.0.0
127-
if: github.event.repository.fork == false
128-
env:
129-
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
130-
with:
131-
args: app/build/outputs/apk/ci/${{ env.APK_NAME }}.apk
132-
133-
- name: Report build status to Discord
134-
uses: sarisia/actions-status-discord@v1
135-
if: github.event.repository.fork == false && failure()
136-
with:
137-
title: "Build apk"
138-
webhook: ${{ secrets.DISCORD_BUILD_STATUS_WEBHOOK }}
139-
140170
synchronize-with-crowdin:
141171
runs-on: ubuntu-latest
142172

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,7 @@ app/.env
9494
/.idea/AndroidProjectSystem.xml
9595
/.idea/runConfigurations.xml
9696
/.idea/studiobot.xml
97+
98+
evdev/build
99+
evdev/.cxx
100+
evdev/src/main/rust/*/target

CHANGELOG.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,65 @@
1+
## [4.0.0 Beta 4](https://github.com/sds100/KeyMapper/releases/tag/v4.0.0-beta.04)
2+
3+
#### 25 December 2025
4+
5+
Merry Christmas from the Key Mapper team! 🎄
6+
7+
Renamed PRO mode to Expert mode because it sounded like a paid premium feature even though it is free.
8+
9+
## Added
10+
11+
- #1915 ask user to remove "adb shell" from Shell command.
12+
- #1904 inform the user how to enable the accessibility service with PRO mode or ADB.
13+
- #1911 constraint for physical device orientation that ignores auto rotate setting.
14+
- #1918 improve how key event actions are performed with system bridge.
15+
- #1905 system bridge log is now visible in Key Mapper log.
16+
- #1941 show loading indicator when starting system bridge.
17+
18+
## Bug fixes
19+
20+
- #1913 actually save the option to detect with scan code
21+
- #1931 fix Close and Remove From Recents action on some Android 13 revisions
22+
- #1926 PRO mode triggers for external devices work when the device reconnects.
23+
- #1918 PRO mode key maps can input key codes that aren't originally supported by the trigger
24+
device.
25+
- #1934 hold down option for Tap Screen action is added back.
26+
- Log less verbose.
27+
128
## [4.0.0 Beta 3](https://github.com/sds100/KeyMapper/releases/tag/v4.0.0-beta.03)
229

330
#### 25 November 2025
431

532
## Added
33+
634
- #1871 action to modify any system settings.
735
- #1221 action to show a custom notification.
836
- #1491 action to toggle/enable/disable hotspot.
937
- #1414 constraint for when the keyboard is showing.
1038
- #1900 log to logcat if extra logging is enabled.
1139
- #1902 add toggle next to record trigger button to use PRO mode.
40+
- #1909 categorise constraints similar to actions.
1241

1342
## Bug fixes
1443

1544
- #1901 prompt user to set default USB configuration to 'No data transfer' after starting pro mode.
16-
- #1898 do not launch directly into the Wireless Debugging activity on Xiaomi devices due to a bug they introduced.
45+
- #1898 do not launch directly into the Wireless Debugging activity on Xiaomi devices due to a bug
46+
they introduced.
1747

1848
## [4.0.0 Beta 2](https://github.com/sds100/KeyMapper/releases/tag/v4.0.0-beta.02)
1949

2050
#### 08 November 2025
2151

2252
## Added
2353

24-
- #1890 add button to save log to file and share it. The clipboard button now cuts off older entries and keeps newest ones.
54+
- #1890 add button to save log to file and share it. The clipboard button now cuts off older entries
55+
and keeps newest ones.
2556

2657
## Fixed
2758

28-
- Only autostart PRO mode with Shizuku if Shizuku permission is granted. Otherwise fallback to method with Wireless Debugging and WRITE_SECURE_SETTINGS permission.
29-
- Starting system bridge for the first time would be janky because granting READ_LOGS kills the app process. Only grant for READ_LOGS when sharing logcat from settings.
59+
- Only autostart PRO mode with Shizuku if Shizuku permission is granted. Otherwise fallback to
60+
method with Wireless Debugging and WRITE_SECURE_SETTINGS permission.
61+
- Starting system bridge for the first time would be janky because granting READ_LOGS kills the app
62+
process. Only grant for READ_LOGS when sharing logcat from settings.
3063
- #1886 mobile data actions work in PRO mode.
3164

3265
## [4.0.0 Beta 1](https://github.com/sds100/KeyMapper/releases/tag/v4.0.0-beta.01)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<a href='https://play.google.com/store/apps/details?id=io.github.sds100.keymapper&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' height='75px'/></a>
1313
<a href="https://f-droid.org/packages/io.github.sds100.keymapper/" rel="nofollow"><img alt="Get it on F-Droid" height="75" src="https://user-images.githubusercontent.com/53379023/142497343-0e635fc5-056b-46ff-8d8e-d607ed95527e.png" data-canonical-src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" style="max-width: 100%;"></a>
1414
</br>
15-
<a href='https://ko-fi.com/M4M41032E' target='_blank'><img height='30' style='border:0px;height:30x;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
15+
<a href='https://ko-fi.com/M4M41032E' target='_blank'><img height='30' style='border:0px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
1616
<noscript><a href="https://liberapay.com/sds100/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
1717
<noscript><a href="https://buy.stripe.com/00g16L9YEabldDWdQQ"><img alt="Donate using Stripe" src="https://img.shields.io/badge/Donate-Stripe-blueviolet?style=for-the-badge&logo=stripe"></a></noscript>
1818
</p>

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ dependencies {
152152
implementation(project(":data"))
153153
implementation(project(":sysbridge"))
154154
implementation(project(":system"))
155+
implementation(project(":evdev"))
155156
compileOnly(project(":systemstubs"))
156157

157158
coreLibraryDesugaring(libs.desugar.jdk.libs)

app/proguard-rules.pro

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117
# Keep all AIDL interface classes and their methods
118118
-keep class io.github.sds100.keymapper.sysbridge.ISystemBridge** { *; }
119-
-keep class io.github.sds100.keymapper.sysbridge.IEvdevCallback** { *; }
119+
-keep class io.github.sds100.keymapper.evdev.IEvdevCallback** { *; }
120120
-keep class io.github.sds100.keymapper.sysbridge.IShizukuStarterService** { *; }
121121

122122
-keepclassmembers class io.github.sds100.keymapper.sysbridge.shizuku.ShizukuStarterService {
@@ -138,7 +138,10 @@
138138
-keep class io.github.sds100.keymapper.sysbridge.** extends android.content.ContentProvider { *; }
139139

140140
# Keep parcelable classes used in AIDL
141-
-keep class io.github.sds100.keymapper.common.models.EvdevDeviceHandle { *; }
141+
-keep class io.github.sds100.keymapper.common.models.GrabbedDeviceHandle { *; }
142+
-keep class io.github.sds100.keymapper.common.models.EvdevDeviceInfo { *; }
143+
-keep class io.github.sds100.keymapper.common.models.GrabTargetKeyCode { *; }
144+
-keep class io.github.sds100.keymapper.common.models.ShellResult { *; }
142145

143146
# Keep all rikka.hidden classes and interfaces as they contain AIDL files
144147
-keep class rikka.hidden.** { *; }
@@ -241,4 +244,4 @@
241244
-dontwarn android.view.DisplayInfo
242245
-dontwarn android.view.IWindowManager**
243246
-dontwarn com.android.internal.app.**
244-
-dontwarn com.android.internal.policy.**
247+
-dontwarn com.android.internal.policy.**

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<!-- This is required because sysbridge has a min sdk of 29 since it depends
1414
on the binder-ndk library. Building will fail without this because the min sdk
1515
of the app is 26.-->
16-
<uses-sdk tools:overrideLibrary="io.github.sds100.keymapper.sysbridge" />
16+
<uses-sdk tools:overrideLibrary="io.github.sds100.keymapper.sysbridge, io.github.sds100.keymapper.evdev" />
1717

1818
<application
1919
android:name="io.github.sds100.keymapper.KeyMapperApp"

app/src/main/java/io/github/sds100/keymapper/system/accessibility/AccessibilityServiceController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import dagger.assisted.AssistedInject
66
import io.github.sds100.keymapper.base.actions.PerformActionsUseCaseImpl
77
import io.github.sds100.keymapper.base.constraints.DetectConstraintsUseCaseImpl
88
import io.github.sds100.keymapper.base.detection.DetectKeyMapsUseCaseImpl
9+
import io.github.sds100.keymapper.base.expertmode.SystemBridgeSetupAssistantController
910
import io.github.sds100.keymapper.base.input.InputEventHub
1011
import io.github.sds100.keymapper.base.keymaps.FingerprintGesturesSupportedUseCase
1112
import io.github.sds100.keymapper.base.keymaps.PauseKeyMapsUseCase
12-
import io.github.sds100.keymapper.base.promode.SystemBridgeSetupAssistantController
1313
import io.github.sds100.keymapper.base.system.accessibility.AccessibilityNodeRecorder
1414
import io.github.sds100.keymapper.base.system.accessibility.BaseAccessibilityServiceController
1515
import io.github.sds100.keymapper.base.system.inputmethod.AutoSwitchImeController

0 commit comments

Comments
 (0)