Skip to content

Commit 72ded4a

Browse files
authored
Merge pull request #1874 from keymapperorg/develop
Version 4.0.0 Beta 1 - PRO mode!
2 parents c361118 + ac2eb6f commit 72ded4a

File tree

645 files changed

+57387
-13440
lines changed

Some content is hidden

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

645 files changed

+57387
-13440
lines changed

.cursor/rules/create-action.mdc

Lines changed: 0 additions & 27 deletions
This file was deleted.

.cursor/rules/jetpack-compose.mdc

Lines changed: 0 additions & 71 deletions
This file was deleted.

.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
ktlint_standard_function-expression-body = disabled
33
ktlint_function_naming_ignore_when_annotated_with = Composable
44
ktlint_ignore_back_ticked_identifier = true
5-
ktlint_code_style = intellij_idea # Use IntelliJ style because it has trailing commas
5+
ktlint_code_style = android_studio
6+
ij_kotlin_indent_before_arrow_on_new_line = true
7+
ij_kotlin_allow_trailing_comma = true
8+
ij_kotlin_allow_trailing_comma_on_call_site = true
69

710
[base/src/main/java/io/github/sds100/keymapper/base/utils/ui/compose/icons/*.{kt,kts}]
811
ktlint_standard_property-naming = disabled

.github/workflows/crowdin-actions.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/testing.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,33 @@ jobs:
135135
if: github.event.repository.fork == false && failure()
136136
with:
137137
title: "Build apk"
138-
webhook: ${{ secrets.DISCORD_BUILD_STATUS_WEBHOOK }}
138+
webhook: ${{ secrets.DISCORD_BUILD_STATUS_WEBHOOK }}
139+
140+
synchronize-with-crowdin:
141+
runs-on: ubuntu-latest
142+
143+
steps:
144+
- name: Checkout
145+
uses: actions/checkout@v4
146+
147+
- name: crowdin action
148+
uses: crowdin/github-action@v2
149+
if: github.event.repository.fork == false
150+
with:
151+
upload_sources: true
152+
upload_translations: false
153+
download_translations: true
154+
localization_branch_name: l10n/develop
155+
create_pull_request: true
156+
pull_request_title: 'New Crowdin Translations'
157+
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
158+
pull_request_base_branch_name: 'develop'
159+
env:
160+
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
161+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162+
163+
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
164+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
165+
166+
# Visit https://crowdin.com/settings#api-key to create this token
167+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

CHANGELOG.md

Lines changed: 74 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
## [4.0.0 Beta 1](https://github.com/sds100/KeyMapper/releases/tag/v4.0.0-beta.01)
2+
3+
#### TO BE RELEASED
4+
5+
## Added
6+
7+
- #761 Detect keys with scancodes. Key Mapper will do this automatically if the key code is unknown
8+
or you record different physical keys from the same device with the same key code.
9+
- Redesign the Settings screen.
10+
- Shortcuts on the trigger screen that guide you how to set up different types of buttons.
11+
- #1788 dismiss lockscreen when launching app action from lockscreen
12+
- Show tips for parallel and sequence triggers, and constraints in the trigger screen
13+
- #397 enable/disable all key maps in a group
14+
- #1773 Option to show floating buttons on top of keyboard or notification panel.
15+
- #1335 Intent API to enable/disable/toggle a key map.
16+
- #114 action to force stop app, and an action to clear an app from recents
17+
- #727 Actions to send SMS messages: "Send SMS" and "Compose SMS"
18+
- #1819 Explain how to enable the accessibility service restricted setting
19+
- #661 Action to execute shell commands.
20+
- #991 Consolidated volume and stream actions.
21+
- #1066 Action to mute/unmute microphone.
22+
- #985 Constraints for foldable hinge being open/closed.
23+
24+
## Removed
25+
26+
- The key event relay service is now also used on all Android versions below Android 14. The
27+
broadcast receiver method is no longer used.
28+
- Minimum supported Android version is now 8.0. Less than 1% of users are on older versions than
29+
this and dropping support simplifies the codebase and maintenance.
30+
- Dropped support for showing a keyboard picker notification and automatically showing it when a
31+
device connects. This is only supported on Android 8.1 and is extra work to maintain it.
32+
- Dropped support for rerouting key events on Android 11. This was a workaround for a specific bug
33+
in Android 11 which fewer than 10% of users are using and less are probably using that feature.
34+
35+
## Fixed
36+
37+
- Restoring subgroups works and does not freeze Key Mapper.
38+
- Do not show duplicate constraint shortcuts.
39+
- Make WiFi connected constraints more reliable
40+
- #1818 auto switching of the Key Mapper keyboard when typing is more reliable and quicker on
41+
Android 13+
42+
- #1818 auto switching of the Key Mapper keyboard now requires Android 11+. On older versions it was
43+
only possible with WRITE_SECURE_SETTINGS but very few users are on these old Android versions so
44+
it is not worth the extra maintenance effort.
45+
- #1818 the Key Mapper GUI Keyboard is no longer mentioned in the app. It still works but PRO mode
46+
and the auto switching feature are the preferred way to work around the limitations of the Key
47+
Mapper keyboard.
48+
- Allow selecting notification and alarm sound and not just ringtones for Sound action.
49+
- #1064 wait for switch keyboard action to complete before doing next action.
50+
151
## [3.2.1](https://github.com/sds100/KeyMapper/releases/tag/v3.2.1)
252

353
#### 03 Sept 2025
@@ -1332,26 +1382,26 @@ This summarises the changes since 2.0.2.
13321382
- Dark mode! 🕶
13331383
- A keymap can have multiple actions.
13341384
- Triggers
1335-
- 2 modes. The keys can all be pressed at the same time or one after another in a sequence.
1336-
- Keys can be limited to a specific external device, any device or the device the app is
1337-
installed on.
1338-
- Double press support.
1385+
- 2 modes. The keys can all be pressed at the same time or one after another in a sequence.
1386+
- Keys can be limited to a specific external device, any device or the device the app is
1387+
installed on.
1388+
- Double press support.
13391389
- Constraints. Keymaps can be restricted to only work in certain situations. Constraints can be
13401390
mixed in OR mode or AND mode.
1341-
- App in foreground
1342-
- App not in foreground
1343-
- Bluetooth device connected
1344-
- Bluetooth device not connected
1345-
- Screen on/off (ROOT only).
1391+
- App in foreground
1392+
- App not in foreground
1393+
- Bluetooth device connected
1394+
- Bluetooth device not connected
1395+
- Screen on/off (ROOT only).
13461396

13471397
- Actions
1348-
- Toggle/enable/disable a Do Not Disturb mode (Android 6.0+).
1349-
- Toggle/enable/disable airplane mode (ROOT only).
1350-
- Switch between vibrate and ring.
1351-
- Launch the device assistant rather than the voice assistant.
1352-
- Take screenshots on rooted devices older than Pie.
1353-
- Can now have unique repeat options and any action is allowed to be repeated now.
1354-
- Show the keycode number when picking a Keycode action.
1398+
- Toggle/enable/disable a Do Not Disturb mode (Android 6.0+).
1399+
- Toggle/enable/disable airplane mode (ROOT only).
1400+
- Switch between vibrate and ring.
1401+
- Launch the device assistant rather than the voice assistant.
1402+
- Take screenshots on rooted devices older than Pie.
1403+
- Can now have unique repeat options and any action is allowed to be repeated now.
1404+
- Show the keycode number when picking a Keycode action.
13551405

13561406
- Renamed "Repeat Delay" to "Repeat Rate".
13571407
- Renamed "Hold Down Delay" to "Repeat Delay"
@@ -1482,16 +1532,16 @@ Significantly improved the input latency.
14821532

14831533
- A keymap can have multiple actions.
14841534
- Triggers
1485-
- 2 modes. The keys can all be pressed at the same time or one after another in a sequence.
1486-
- Keys can be limited to a specific external device, any device or the device the app is
1487-
installed on.
1488-
- Double press support.
1535+
- 2 modes. The keys can all be pressed at the same time or one after another in a sequence.
1536+
- Keys can be limited to a specific external device, any device or the device the app is
1537+
installed on.
1538+
- Double press support.
14891539
- Constraints. Keymaps can be restricted to only work in certain situations. Constraints can be
14901540
mixed in OR mode or AND mode.
1491-
- App in foreground
1492-
- App not in foreground
1493-
- Bluetooth device connected
1494-
- Bluetooth device not connected
1541+
- App in foreground
1542+
- App not in foreground
1543+
- Bluetooth device connected
1544+
- Bluetooth device not connected
14951545
- The option to show the "performing action" toast has been moved to a toggle in each keymap.
14961546
- The long press delay, double press timeout, sequence trigger timeout, action repeat delay,
14971547
hold-down delay until actions are repeated and vibrate delay can be changed per keymap.

CREDITS.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,33 @@
22

33
Many thanks to...
44

5-
- @[dslul](https://github.com/dslul) for their [OpenBoard](https://github.com/dslul/openboard) fork of the AOSP keyboard! This made adding a GUI keyboard for Key Mapper _much_ easier. 🎉
6-
- @[salomonbrys] for his [Kotson] library so I can easily use Gson in Kotlin.
7-
- The [Material Design Icons] community for various icons that are not provided by Google.
8-
- [App Mockup] for their screenshot utility.
9-
- Airbnb for their [Epoxy](https://github.com/airbnb/epoxy) RecyclerView. They made having multiple itemview types and dragging and dropping super easy!
10-
- @[Jake Wharton](https://github.com/JakeWharton) for his [Timber](https://github.com/JakeWharton/timber) logging library.
11-
- @[srikanth-lingala](https://github.com/srikanth-lingala) for their Java zip file [library](https://github.com/srikanth-lingala/zip4j).
12-
- @[anggrayudi](https://github.com/anggrayudi) for their [Simple Storage](https://github.com/anggrayudi/SimpleStorage) library that makes working with Scoped Storage and the Storage Access Framework on Android much easier.
13-
- @[MFlisar](https://github.com/MFlisar) for their [drag and select](https://github.com/MFlisar/DragSelectRecyclerView) library.
14-
- @[RikkaApps](https://github.com/RikkaApps) for Shizuku! It is amazing.
15-
- @[canopas](https://github.com/canopas) for their Jetpack Compose Tap Target library https://github.com/canopas/compose-intro-showcase.
5+
- @[dslul](https://github.com/dslul) for their [OpenBoard](https://github.com/dslul/openboard) fork
6+
of the AOSP keyboard! This made adding a GUI keyboard for Key Mapper _much_ easier. 🎉
7+
- @[salomonbrys] for his [Kotson] library so I can easily use Gson in Kotlin.
8+
- The [Material Design Icons] community for various icons that are not provided by Google.
9+
- [App Mockup] for their screenshot utility.
10+
- Airbnb for their [Epoxy](https://github.com/airbnb/epoxy) RecyclerView. They made having multiple
11+
itemview types and dragging and dropping super easy!
12+
- @[Jake Wharton](https://github.com/JakeWharton) for
13+
his [Timber](https://github.com/JakeWharton/timber) logging library.
14+
- @[srikanth-lingala](https://github.com/srikanth-lingala) for their Java zip
15+
file [library](https://github.com/srikanth-lingala/zip4j).
16+
- @[anggrayudi](https://github.com/anggrayudi) for
17+
their [Simple Storage](https://github.com/anggrayudi/SimpleStorage) library that makes working
18+
with Scoped Storage and the Storage Access Framework on Android much easier.
19+
- @[MFlisar](https://github.com/MFlisar) for
20+
their [drag and select](https://github.com/MFlisar/DragSelectRecyclerView) library.
21+
- @[RikkaApps](https://github.com/RikkaApps) for Shizuku! It is amazing and was used as the base for
22+
PRO mode (system bridge).
23+
- @[canopas](https://github.com/canopas) for their Jetpack Compose Tap Target
24+
library https://github.com/canopas/compose-intro-showcase.
25+
- @[topjohnwu](https://github.com/topjohnwu) for Magisk
26+
and [libsu](https://github.com/topjohnwu/libsu).
1627

1728
[salomonbrys]: https://github.com/salomonbrys
29+
1830
[Kotson]: https://github.com/salomonbrys/Kotson
31+
1932
[Material Design Icons]: https://materialdesignicons.com/
33+
2034
[App Mockup]: https://app-mockup.com/

api/src/main/AndroidManifest.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@
3636
</intent-filter>
3737
</receiver>
3838

39+
<receiver
40+
android:name=".EnableKeyMapsBroadcastReceiver"
41+
android:exported="true">
42+
<intent-filter>
43+
<action android:name="io.github.sds100.keymapper.ACTION_ENABLE_KEY_MAP" />
44+
<action android:name="io.github.sds100.keymapper.ACTION_DISABLE_KEY_MAP" />
45+
<action android:name="io.github.sds100.keymapper.ACTION_TOGGLE_KEY_MAP" />
46+
</intent-filter>
47+
</receiver>
48+
3949
<!-- Don't require a permission because we want other apps to bind
4050
to this service. The permission wouldn't be signature-level so
4151
if a nefarious app wants to talk to Key Mapper they could add the permission anyway. -->

api/src/main/java/io/github/sds100/keymapper/api/Api.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ object Api {
44
// Do not use the package name for debug/ci builds
55
const val ACTION_TRIGGER_KEYMAP_BY_UID =
66
"io.github.sds100.keymapper.ACTION_TRIGGER_KEYMAP_BY_UID"
7-
const val EXTRA_KEYMAP_UID = "io.github.sds100.keymapper.EXTRA_KEYMAP_UID"
7+
const val EXTRA_KEYMAP_ID = "io.github.sds100.keymapper.EXTRA_KEYMAP_UID"
88

99
const val ACTION_PAUSE_MAPPINGS = "io.github.sds100.keymapper.ACTION_PAUSE_MAPPINGS"
1010
const val ACTION_RESUME_MAPPINGS = "io.github.sds100.keymapper.ACTION_RESUME_MAPPINGS"
1111
const val ACTION_TOGGLE_MAPPINGS = "io.github.sds100.keymapper.ACTION_TOGGLE_MAPPINGS"
12+
13+
const val ACTION_ENABLE_KEY_MAP = "io.github.sds100.keymapper.ACTION_ENABLE_KEY_MAP"
14+
const val ACTION_DISABLE_KEY_MAP = "io.github.sds100.keymapper.ACTION_DISABLE_KEY_MAP"
15+
const val ACTION_TOGGLE_KEY_MAP = "io.github.sds100.keymapper.ACTION_TOGGLE_KEY_MAP"
1216
}

0 commit comments

Comments
 (0)