How to change hardware button behavior

HellandB Post time 2017-3-7 22:50:02 | Show all posts  Close [Copy link]
9 5665
View: 5665|Reply: 9

How to change hardware button behavior

 Close [Copy link]

1

threads

9

posts

47

credits

New Member

Rank: 1

credits
47
Post time 2017-2-17 18:57:17 | Show all posts |Read mode
I would like to change the bahvior of the buttons next to the finger print sensor. I know you position will be swapped if you change the navigation bar settings: Settings > Navigation Bar > Choose Navigation Type.

But I would like the "menu" button to be "Recent running tasks", like the software menu is.

I tried using the app Button Remapper (No root), but wasn't able to find out how to change this button. I could only get it to work for the volume buttons etc.


3

threads

7

posts

48

credits

New Member

Rank: 1

credits
48
Post time 2017-2-19 07:30:07 | Show all posts
Remapper is good, works fine for me, even with SW buttons. I mean just play with settings it is what u looking for ;)
Post time 2017-2-20 04:53:38 | Show all posts

1

threads

9

posts

47

credits

New Member

Rank: 1

credits
47
 Author| Post time 2017-2-21 01:41:54 | Show all posts
Thank you for the replies, i tried following the post, but I am not able to change the menu button to be recent running taks. If you where able to do this with Remapper or Switch Access, please provide a step by step. As mentioned earlier I am able to change it for volume button, also able to change Home button behavoior with Nova launcher..,

1

threads

9

posts

88

credits

Senior Member

Rank: 2

credits
88
Post time 2017-2-21 03:26:36 | Show all posts
Hello,

what are the keycodes for the two hardware button. One has 139 - that is Function Key "F9". What is the code for the second one ?

Kind regards

1

threads

9

posts

47

credits

New Member

Rank: 1

credits
47
 Author| Post time 2017-2-21 16:58:26 | Show all posts
@Klarseher
The Menu button has keykode"Keycode_menu", the shortcut button on the side has keycode "277", I am not able to assign the back button thus not sure what the code is.

I did some more testing found out that Switch Access is working for the menu button if  Navigation bar layout setting (settings >  Smart Assistance (heading) > Navigation Bar) is set to the second top option (Recent running tasks, home, back). But if changed to the top button (back, home, recent running tasks) the Switch Access settings stop work for the menu button.

1

threads

9

posts

88

credits

Senior Member

Rank: 2

credits
88
Post time 2017-2-21 21:27:31 | Show all posts
Edited by klarseher at 2017-2-23 14:00 \n\n@HellandB:

I commented out code 158 and code 139 in three files in keylayout folder.

As a result, both hardware keys beside home button are disabled !!! A first step ..


  1. master@HAL-9000 c:\Users\master\AppData\Local\Android\sdk\platform-tools
  2. > adb shell
  3. shell@UMI Plus E:/ $ su -
  4. root@UMI Plus E:/ # cd /system/usr/keylayout
  5. root@UMI Plus E:/system/usr/keylayout # mount -o remount,rw /system
  6. root@UMI Plus E:/system/usr/keylayout # vi Generic.kl
  7. root@UMI Plus E:/system/usr/keylayout # vi mtk-kpd.kl
  8. root@UMI Plus E:/system/usr/keylayout # vi qwerty.kl
  9. root@UMI Plus E:/system/usr/keylayout # egrep '#.*(139|158)' *
  10. Generic.kl:# key 139   MENU
  11. Generic.kl:# key 158   BACK
  12. mtk-kpd.kl:# key 158   BACK
  13. mtk-kpd.kl:# key 139   MENU
  14. qwerty.kl:# key 158   BACK
  15. qwerty.kl:# key 139   MENU
  16. root@UMI Plus E:/system/usr/keylayout #
Copy the Code

1

threads

9

posts

88

credits

Senior Member

Rank: 2

credits
88
Post time 2017-3-5 15:51:08 | Show all posts
It also goes without root.

It must be one of the two red-rimmed navigation bar settings selected in my screenshot.

The other two cause a key remap which apparently can not be mapped another time.

Screenshot_2017-03-05-08-35-31.png
Screenshot_20170223-180336.png

0

threads

7

posts

23

credits

New Member

Rank: 1

credits
23
Post time 2017-3-7 05:41:30 | Show all posts
I have a UMI PLus & also want to reconfigure the hardware buttons back to the stock android, Left = back, right = recent apps. I have tried both methods, using apps (remapper etc) & also via Accessibility but they remain as shipped.

Why has Umi done this, seems like a bizarre move to change the recent app button to Menu settings???

0

threads

5

posts

19

credits

New Member

Rank: 1

credits
19
Post time 2017-3-7 22:50:02 | Show all posts
tomassville replied at 2017-3-7 05:41
I have a UMI PLus & also want to reconfigure the hardware buttons back to the stock android, Left =  ...

Thx works on my plus E I just fallowed your instructions and use buttons remapper
You have to log in before you can reply Login | WELCOME TO UMIDIGI COMMUNITY

Points Rules

Quick Reply Top Back to list