Skip to content

Commit c7623f2

Browse files
committed
#2187 App constraints do not work with floating buttons
Closes #2187
1 parent ae9bba1 commit c7623f2

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## [4.3.0](https://github.com/sds100/KeyMapper/releases/tag/v4.3.0)
22

3-
#### TO BE RELEASED
3+
#### 13 July 2026
44

55
## Added
66

@@ -9,6 +9,9 @@
99
- #2163 Add ringer mode constraints (Ring, Vibrate, Silent).
1010
- #2174 Add "Do not remap by default" preference to the default options settings page.
1111

12+
## Fixed
13+
- #2187 App constraints do not work with floating buttons
14+
1215
## [4.2.1](https://github.com/sds100/KeyMapper/releases/tag/v4.2.1)
1316

1417
#### 09 June 2026

base/src/main/java/io/github/sds100/keymapper/base/system/accessibility/BaseAccessibilityServiceController.kt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,6 @@ abstract class BaseAccessibilityServiceController(
275275
}
276276
}
277277

278-
// The accessibility event is only used on older than SDK 33. On newer versions the
279-
// accessibility input method API is used.
280-
val imeInputStartedEvents = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
281-
AccessibilityEvent.TYPE_WINDOWS_CHANGED
282-
} else {
283-
0
284-
}
285-
286278
val recordNodeEvents =
287279
AccessibilityEvent.TYPE_VIEW_FOCUSED or AccessibilityEvent.TYPE_VIEW_CLICKED
288280

@@ -298,13 +290,8 @@ abstract class BaseAccessibilityServiceController(
298290
if (!changeImeOnInputFocus &&
299291
recordState == RecordAccessibilityNodeState.Idle
300292
) {
301-
newEventTypes =
302-
newEventTypes and (imeInputStartedEvents or recordNodeEvents).inv()
293+
newEventTypes = newEventTypes and (recordNodeEvents).inv()
303294
} else {
304-
if (changeImeOnInputFocus) {
305-
newEventTypes = newEventTypes or imeInputStartedEvents
306-
}
307-
308295
if (recordState is RecordAccessibilityNodeState.CountingDown) {
309296
newEventTypes = newEventTypes or recordNodeEvents
310297
}

0 commit comments

Comments
 (0)