keymapperorg / KeyMapper

An Android app that change what the buttons do on your devices!
http://docs.keymapper.club
GNU General Public License v3.0
1.13k stars 156 forks source link

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

Open harryeffinpotter opened 2 years ago

harryeffinpotter commented 2 years ago

Developer TODO (don't remove)

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

GL513 commented 2 years ago

@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.

sds100 commented 2 years ago

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

neothematrix commented 2 years ago

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!

sds100 commented 2 years ago

@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.

GL513 commented 2 years ago

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

sds100 commented 2 years ago

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!

PeterTucker commented 2 years ago

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

PeterTucker commented 2 years ago

@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 commented 2 years ago

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.

GL513 commented 1 year ago

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

harryeffinpotter commented 1 year ago

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: @.***>

GL513 commented 1 year ago

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

ClaireCJS commented 1 year ago

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

mhmatthewhugley commented 1 year ago

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

Can confirm not working.