KeyMapper icon indicating copy to clipboard operation
KeyMapper copied to clipboard

Oculus Quest(and perhaps other devices) adb commands to fix KeyMapper in v40+

Open harryeffinpotter opened this issue 3 years ago • 14 comments

Developer TODO (don't remove)

  • [ ] create new branch. put issue number at start of name
  • [ ] update documentation
  • [ ] squash and merge
  • [ ] delete branch

Installing Keymapper on the Oculus Quest v40+

Oculus Quest v40 broke accessibility permissions for a lot of apps, KeyMapper included and I have found this workaround. I used the Debug version of KeyMapper because it is required for additional code in my script that automatically installs custom user settings on the device so one might be able to do the same commands with standard keymapper, I have not tested it.

Enable accessibility and ability to modify system settings: adb shell settings put secure enabled_accessibility_services io.github.sds100.keymapper.debug/io.github.sds100.keymapper.debug.service.MyAccessibilityService adb shell pm grant io.github.sds100.keymapper.debug android.permission.WRITE_SECURE_SETTINGS

Set keymapper as device admin so it cannot be over-ridden: adb shell dpm set-active-admin --user current io.github.sds100.keymapper.debug/io.github.sds100.keymapper.system.DeviceAdmin NOTE: If you ever wish to uninstall KeyMapper from your Quest after running this command you must run the following command first: adb shell pm disable-user io.github.sds100.keymapper.debug

Enable DND access: (This actually works!!! https://discord.com/channels/717499872219103263/717500576954318891/1031977526253334618) adb shell cmd notification allow_listener io.github.sds100.keymapper.debug/io.github.sds100.keymapper.system.notifications.NotificationReceiverio.github.sds100.keymapper.debug/io.github.sds100.keymapper.system.notifications.NotificationReceiver

Disable battery optimization: adb shell dumpsys deviceidle whitelist +io.github.sds100.keymapper.debug

harryeffinpotter avatar May 29 '22 02:05 harryeffinpotter

@sds100 what path do you want this to be under, the user guide? I think linking to this in the quick start guide might be useful as well, just in case some people don't think to check the user guide.

GL513 avatar Jun 14 '22 17:06 GL513

Yeah, put it in user-guide folder. Mention it in an admonition at the top of the QSG as well

sds100 avatar Jun 14 '22 19:06 sds100

hi! I've just tried this workaround to make keymapper working again on my updated Quest 2, but without success. It was working some time ago (not sure which Quest software version I had) but now it's not working anymore, probably after some software updates as mentioned, it seems Keymapper cannot catch the buttons I'm pressing, I had a combination configured before (long press volume up) and it doesn't trigger anything. I've also tried recording the trigger again but once I press "record" no matter what button I press, nothing gets recorded.

I've tried updating to the latest version of keymapper (2.4.4) and also executing the new commands mentioned here, I've tried with both the regular and debug version, but the issue is the same: I can't record triggers.

Keymapper shows all green ticks and I've tried uninstalling, reinstalling and restarting my device

Any pointer on what I should look to understand why it's not working?

thanks!

neothematrix avatar Jul 30 '22 16:07 neothematrix

@neothematrix hi! We just had someone else in the discord server mention this issue. It seems like oculus are intentionally trying to break this. There isn't anything we can do :/ Key Mapper only works if the Android skin on the device follows the spec and actually tells it when stuff like button presses are happening.

sds100 avatar Jul 30 '22 18:07 sds100

Sorry I haven't been around, I'll try to get this done on the docs when I have time!

GL513 avatar Aug 08 '22 23:08 GL513

Sorry I haven't been around, I'll try to get this done on the docs when I have time!

Well, now people are reporting in the server that they can't record triggers and their key maps don't work with the latest Quest update!

sds100 avatar Aug 09 '22 19:08 sds100

@sds100 do you know how to enable the sister app Keymapper Keyboard GUI via ADB?

PeterTucker avatar Sep 06 '22 19:09 PeterTucker

@sds100 do you know how to enable the sister app Keymapper Keyboard GUI via ADB?

@harryeffinpotter, if you know too, I'd love to hear it. Trying to remap/swap ctrl & alt. Is this possible?

PeterTucker avatar Sep 06 '22 19:09 PeterTucker

This is what I've tried so far:

adb shell settings put secure default_input_method io.github.sds100.keymapper.inputmethod.latin
adb shell ime enable io.github.sds100.keymapper.inputmethod.latin

Doesn't seem to work though. Likely, I'm missing something.

PeterTucker avatar Sep 06 '22 20:09 PeterTucker

@harryeffinpotter how's this? https://docs.keymapper.club/user-guide/oculus/ Does it still work for you?

GL513 avatar Feb 04 '23 20:02 GL513

It hasn't worked in months

On Sat, Feb 4, 2023, 3:46 PM Gavin L @.***> wrote:

@harryeffinpotter https://github.com/harryeffinpotter how's this? https://docs.keymapper.club/user-guide/oculus/ Does it still work for you?

— Reply to this email directly, view it on GitHub https://github.com/keymapperorg/KeyMapper/issues/1020#issuecomment-1416846534, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARQCVOELGLU6S5KEKC5C45DWV252NANCNFSM5XHOXPEA . You are receiving this because you were mentioned.Message ID: @.***>

harryeffinpotter avatar Feb 05 '23 15:02 harryeffinpotter

K, if you do get it working please let me know.

GL513 avatar Feb 05 '23 17:02 GL513

I guess I'm late to the game. Did this ever get fixed? Am I wasting my time even trying this?

ClaireCJS avatar Aug 26 '23 16:08 ClaireCJS

@harryeffinpotter how's this? https://docs.keymapper.club/user-guide/oculus/ Does it still work for you?

Can confirm not working.

mhmatthewhugley avatar Sep 23 '23 22:09 mhmatthewhugley