KeyMapper icon indicating copy to clipboard operation
KeyMapper copied to clipboard

Mapping is self-disabling

Open brianmichaelwendt opened this issue 4 years ago • 6 comments
trafficstars

Developer TODO (don't remove)

  • [x] create new branch. put issue number at start of name if not a very quick fix.
  • [ ] write tests. put issue number in comment
  • [ ] update documentation
  • [ ] squash and merge
  • [ ] delete branch

Discord message link/email recipient

Describe the bug When creating a mapping as described below, it works once but then disables itself.

To Reproduce

  1. Create a new mapping
  2. Record a trigger
  3. Create actions to: a) switch to key mapper [debug] basic input method. b) Input Ctrl + KEYCODE_A c) Switch to Samsung Keyboard
  4. Save the mapping
  5. The app will warn you that the 2nd part of the action won't work
  6. Tap on the action to fix
  7. App says "you must be using one of the keymapper keyboards..."
  8. Click "FIX"
  9. The action is no longer shown in red but you receive an alert from Android System to "Configure physical keyboard"
  10. Ignore the alert
  11. Tap on any text input box, I use the one in the google widget
  12. Type something random
  13. Press the key you recorded in the mapping
  14. All text in the input box gets selected - the mapping worked as desired!
  15. Immediately repeat steps 11-13
  16. Nothing happens, in fact you get the unmapped key from the mapping
  17. Go to your list of mappings in the app
  18. The action is once again showed in red

Backup of my keymaps: mappings_20211008-203611.zip

Expected behavior Since the mapping is specifically switching the keyboard to the keymapper basic input method, the app should not warn me that sending a keycode won't work, and it shouldn't disable the mapping

Screenshots Attached is a screen shot of the mapping: Screenshot_20211008-202952_Key Mapper Debug

Smartphone (please complete the following information):

  • Device: Tablet, Samsung Galaxy Tab S7+ SM-T970N
  • Android version: Android 11

key_mapper_report_20211008-202748.zip

brianmichaelwendt avatar Oct 09 '21 00:10 brianmichaelwendt

Very good bug report! Thank you 😊

sds100 avatar Oct 09 '21 17:10 sds100

^ I will investigate

sds100 avatar Oct 09 '21 17:10 sds100

np thank you for creating and supporting this app!


From: Seth Schroeder @.> Sent: Saturday, October 9, 2021 1:27 PM To: sds100/KeyMapper @.> Cc: brianmichaelwendt @.>; Author @.> Subject: Re: [sds100/KeyMapper] Mapping is self-disabling (#797)

Very good bug report! Thank you 😊

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sds100/KeyMapper/issues/797#issuecomment-939331730, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV3T73NFBG6WDV3CUAIJKS3UGB3RBANCNFSM5FUVDPLA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

brianmichaelwendt avatar Oct 09 '21 20:10 brianmichaelwendt

@brianmichaelwendt I've fixed this now but there could still be an issue depending on what you are using the key map for. Switching the input method takes a few 100ms (mostly because it is effectively opening and closing an app every time) so you will have to change the "delay before next action" option so your sequence of actions work as intended.

sds100 avatar Feb 12 '22 11:02 sds100

Have you thought about using Shizuku to do what you want?

sds100 avatar Feb 12 '22 11:02 sds100