Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

How to remap our inputs devices in our tv sticks.

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to remap our inputs devices in our tv sticks.

    Sometimes we want modificate keys assignation in our keyboards to make them do something new, for example:
    We have a key F1 that is useless in our tv stick, and we want assign it to HOME button. How can we do that. It is not so difficult but we need to make some tweaks in our system. Lets try to learn how to make that.

    There is a file in /system/usr/keylayout called Generic.kl ; in this file all keys in all keyboard gets a function assigned. So if we mod that file we can assign new functions to our keyboard useless keys. But if we mod this file all keyboards attached to our tv stick will get their keys preassigned. Some times that will be a bad idea so there is a more elegant way to do that.
    We can create a new file what assign the new remap only to our usb device.

    We need to be root (sorry no way to make that if you don't have root access), we need a file manager to copy, edit and modify files. I recommend you ES explorer. A terminal emulator is needed too. And a program who take our keys codes from our keyboard(keytest:https://github.com/chrisboyle/keytes...st.apk/qr_code).

    Well, time to do it:

    First we take note of what keys we want to remap, we open keytest and we take the codes of the keys that we want to remap:
    For example:
    In my keyboard i want HOME asiggned to F1; BACK asiggned to F2
    So I push F1 and the app givews me the keycode 131 and when i push F2 y get the keycode 132
    We must take note of that keys and their keycodes.

    Open terminal emulator and write:
    cat /proc/bus/input/devices

    We get a list of all input devices attached our tv stick. We must search for the keyboard we want to remap. Something like:
    I: Bus=0011 Vendor=0001 Product=0021 Version=ab41
    N: Name="AT Translated Set 2 keyboard"
    P: Phys=isa0060/serio0/input0
    S: Sysfs=/devices/platform/i8042/serio0/input/input3
    U: Uniq=
    H: Handlers=sysrq kbd event3
    B: PROP=0
    B: EV=120013
    B: KEY=10000 c020000000000 0 0 700f02000003 3803078f830f401 febfffdfffefffff fffffffffffffffe
    B: MSC=10
    B: LED=7

    We must take note VENDOR and PRODUCT,
    vendor:0001
    product:0021


    Now we copy Generic.kl > /sdcard/Vendor__Product_.kl (in my situation:Vendor_0001_Product_0021.kl)
    Type carefully (case sensitive):

    su
    cp /system/usr/keylayout/Generic.kl /sdcard/Vendor_0001_Product_0021.kl

    Now we open ES Filemanager and configure it (click in the 3 points in the botton bar) and click settings.
    In Root settings we must select:
    Root Explorer
    Up to root
    Mount system as R/W
    When we finish this tweak maybe we want to take this to his initial position so deselect those options
    And now we will edit our specific .kl file so we go to /sdacard and edit our vendor__product_.kl file

    We search in the file for key 131(F11 in my keyboard) and assign HOME (or whatever function you want to remap), and we search too for key 132 and assign it BACK.
    When we finish we save changes and exit.
    Now we need to copy our keyboard specific file to /system/usr/keylayouy with ES filemanager.
    Almost finished we need to change permissions to the file,so we make a long click on it and click in properties, we changue them to rw- r-- r-- and thats all. When we restart or minipc we get our keys remapped.

    Remember to change root access in ES filemanager to default.

    I hope I explain it clear, but if you have any dudes fell free to ask me. I did all the steps while i wrote that so I hope you can do the same. Corrections or better explications are welcome.
    Last edited by Finless; 04-13-2013, 15:20.
    REMEMBER, YOUR FEEDBACK IS VERY IMPORTANT TO US.
    My devices:
    Minix Neo X7; Minix Neo X8-H , Minix Neo Z64W & Z64 (Sponsored by Minix)
    MK902 & MK902II(Sponsored by RKM)
    Beelink M8B & Beelink R89 (Sponsored by Beelink)
    Tronsmart VEGA S89H (Sponsored by
    Gearbest.com)
    MELE-PCG03 (Sponsored by Gearbest.com) Discount Coupon:MPCG03
    Ainol Intel Z3735 MiniPC(Sponsored by Gearbest.com)
    Thanks to them I can try to support your devices http://freaktab.com/core/images/smilies/wink.png

    #2
    Bullz Eye...

    Looking for this guide, mainly to know how to identify external attachment vendor...
    Great guide.
    But just for people who doesn't want to take even this much pain, you can use External Keyboard Helper Pro.


    Bye the way,
    You might be able to resolve my following quest also..
    I am using Measy RC12 keyboard mouse combo.
    So, it is having Touchpad right.

    While googling, I found that input device types are characterized by specific idc files. If no specific definition there in idc file, it will assign it to pointer by default.
    When checking it system/usr/idc directory, I couldn't find specific idc file for my device. So, it is using generic I guess and must be assigning it as pointer.
    Is there any way to make my RC12 device touchpad being assigned as touchpad. If possible then will it have any advantage than using it as (mouse) pointer device?
    I am afraid of doing this experiment directly on my stick as if I loose input device / cursor, there wont be any way to correct it or again modify idc file.
    I hope you could understand my requirement.

    Comment


      #3
      Re: How to remap our inputs devices in our tv sticks.

      I dont know, when I have some time, I will take a look on that
      REMEMBER, YOUR FEEDBACK IS VERY IMPORTANT TO US.
      My devices:
      Minix Neo X7; Minix Neo X8-H , Minix Neo Z64W & Z64 (Sponsored by Minix)
      MK902 & MK902II(Sponsored by RKM)
      Beelink M8B & Beelink R89 (Sponsored by Beelink)
      Tronsmart VEGA S89H (Sponsored by
      Gearbest.com)
      MELE-PCG03 (Sponsored by Gearbest.com) Discount Coupon:MPCG03
      Ainol Intel Z3735 MiniPC(Sponsored by Gearbest.com)
      Thanks to them I can try to support your devices http://freaktab.com/core/images/smilies/wink.png

      Comment


        #4
        2nd language?

        Thank you for this post.

        Want to know how to ennable a 2nd language through these external keyboars? I have RC11.

        Thank you.

        Comment


          #5
          Re: How to remap our inputs devices in our tv sticks.

          Originally posted by musarezeq View Post
          Thank you for this post.

          Want to know how to ennable a 2nd language through these external keyboars? I have RC11.

          Thank you.
          Then I think you must use an external app to make that, external keyboard helper like RmatriX comments would help, but I didnt try it, I only use US keyboard with mí ipazzport and I use some "dead keys" remaped to get Spanish characters who are missed in it.
          REMEMBER, YOUR FEEDBACK IS VERY IMPORTANT TO US.
          My devices:
          Minix Neo X7; Minix Neo X8-H , Minix Neo Z64W & Z64 (Sponsored by Minix)
          MK902 & MK902II(Sponsored by RKM)
          Beelink M8B & Beelink R89 (Sponsored by Beelink)
          Tronsmart VEGA S89H (Sponsored by
          Gearbest.com)
          MELE-PCG03 (Sponsored by Gearbest.com) Discount Coupon:MPCG03
          Ainol Intel Z3735 MiniPC(Sponsored by Gearbest.com)
          Thanks to them I can try to support your devices http://freaktab.com/core/images/smilies/wink.png

          Comment


            #6
            Shortcut keys on Logitech keyboard

            So accidentally i came across this:
            My Logitech M210 keyboard has these shortcut keys: Vol up, Down, Home etc.
            They work without any remapping!
            Except for the mute key, all other keys do exactly what is expected. Details:
            Play/Pause - OK
            Mute - NOT working
            Vol Down - OK
            Vol UP - OK
            Home - OK (Brings the desktop/home screen)
            Email - OK (Asks which email prog to open. Gmail, etc etc)
            PC on/off - OK almost (Screen ON/OFF toggle basically. But music running also stops)
            Calculator - OK (lol.. sweet.)
            Image...

            Comment


              #7
              Re: How to remap our inputs devices in our tv sticks.

              So you need to take the keys that isn't working, take their keycodes and assign them the function you want they do

              Enviado desde mi tabet por señales de humo
              REMEMBER, YOUR FEEDBACK IS VERY IMPORTANT TO US.
              My devices:
              Minix Neo X7; Minix Neo X8-H , Minix Neo Z64W & Z64 (Sponsored by Minix)
              MK902 & MK902II(Sponsored by RKM)
              Beelink M8B & Beelink R89 (Sponsored by Beelink)
              Tronsmart VEGA S89H (Sponsored by
              Gearbest.com)
              MELE-PCG03 (Sponsored by Gearbest.com) Discount Coupon:MPCG03
              Ainol Intel Z3735 MiniPC(Sponsored by Gearbest.com)
              Thanks to them I can try to support your devices http://freaktab.com/core/images/smilies/wink.png

              Comment


                #8
                Awesome write up .
                Just to add something when I tried this to remap my wired gamestop xbox360 controller I had to include the version in the name (Vendor_XXXX_Product_XXXX_Version_XXXX.kl) or else it would not assign the keylayout file.
                NextBook 7 Premium -S/N 0911 Running one of Many Finless Bob's Roms found here!

                Yuandao/Window N101T (Model 1:2nd Batch) Running Finless Bob's 1.6 Rom kernel# 26
                Found Here

                ZTE Score (X500) running a rooted stock rom.

                Comment


                  #9
                  hi!

                  there is another way to remap inputs.

                  using Tincore Keymapper you can reasign inputs

                  check this thread:


                  greetings!

                  Comment


                    #10
                    Thanks for the info, this is making my MK808 much more functional!!

                    Is there anyway to make a hotkey for the task switcher. I know alt+tab will do this, but it is really awkward on my keyboard so a one button solution would be great
                    Last edited by crithon; 10-06-2013, 21:49.

                    Comment


                      #11
                      press and keep [HOME] key will show you the active tasks list.

                      Comment


                        #12
                        Pressing and holding the home the home key takes me to my launcher no matter how long I hold. I know that method works on phones with hard keys, but for some reason it doesn't work on my mini PC.

                        Comment


                          #13
                          go to tincore google groups and comment to Tincore to add this function as a function key (show list of apps)

                          Comment


                            #14
                            Re: How to remap our inputs devices in our tv sticks.

                            Originally posted by leolas View Post
                            Sometimes we want modificate keys assignation in our keyboards to make them do something new, for example:
                            We have a key F1 that is useless in our tv stick, and we want assign it to HOME button. How can we do that. It is not so difficult but we need to make some tweaks in our system. Lets try to learn how to make that.

                            There is a file in /system/usr/keylayout called Generic.kl ; in this file all keys in all keyboard gets a function assigned. So if we mod that file we can assign new functions to our keyboard useless keys. But if we mod this file all keyboards attached to our tv stick will get their keys preassigned. Some times that will be a bad idea so there is a more elegant way to do that.
                            We can create a new file what assign the new remap only to our usb device.

                            We need to be root (sorry no way to make that if you don't have root access), we need a file manager to copy, edit and modify files. I recommend you ES explorer. A terminal emulator is needed too. And a program who take our keys codes from our keyboard(keytest:https://github.com/chrisboyle/keytes...st.apk/qr_code).

                            Well, time to do it:

                            First we take note of what keys we want to remap, we open keytest and we take the codes of the keys that we want to remap:
                            For example:
                            In my keyboard i want HOME asiggned to F1; BACK asiggned to F2
                            So I push F1 and the app givews me the keycode 131 and when i push F2 y get the keycode 132
                            We must take note of that keys and their keycodes.

                            Open terminal emulator and write:
                            cat /proc/bus/input/devices

                            We get a list of all input devices attached our tv stick. We must search for the keyboard we want to remap. Something like:
                            I: Bus=0011 Vendor=0001 Product=0021 Version=ab41
                            N: Name="AT Translated Set 2 keyboard"
                            P: Phys=isa0060/serio0/input0
                            S: Sysfs=/devices/platform/i8042/serio0/input/input3
                            U: Uniq=
                            H: Handlers=sysrq kbd event3
                            B: PROP=0
                            B: EV=120013
                            B: KEY=10000 c020000000000 0 0 700f02000003 3803078f830f401 febfffdfffefffff fffffffffffffffe
                            B: MSC=10
                            B: LED=7

                            We must take note VENDOR and PRODUCT,
                            vendor:0001
                            product:0021


                            Now we copy Generic.kl > /sdcard/Vendor__Product_.kl (in my situation:Vendor_0001_Product_0021.kl)
                            Type carefully (case sensitive):

                            su
                            cp /system/usr/keylayout/Generic.kl /sdcard/Vendor_0001_Product_0021.kl

                            Now we open ES Filemanager and configure it (click in the 3 points in the botton bar) and click settings.
                            In Root settings we must select:
                            Root Explorer
                            Up to root
                            Mount system as R/W
                            When we finish this tweak maybe we want to take this to his initial position so deselect those options
                            And now we will edit our specific .kl file so we go to /sdacard and edit our vendor__product_.kl file

                            We search in the file for key 131(F11 in my keyboard) and assign HOME (or whatever function you want to remap), and we search too for key 132 and assign it BACK.
                            When we finish we save changes and exit.
                            Now we need to copy our keyboard specific file to /system/usr/keylayouy with ES filemanager.
                            Almost finished we need to change permissions to the file,so we make a long click on it and click in properties, we changue them to rw- r-- r-- and thats all. When we restart or minipc we get our keys remapped.

                            Remember to change root access in ES filemanager to default.

                            I hope I explain it clear, but if you have any dudes fell free to ask me. I did all the steps while i wrote that so I hope you can do the same. Corrections or better explications are welcome.
                            leolas im trying to map the sticks of my joystick because when i play shadow gun the second stick is a mess. when i try to move it up it moves left, when i try to move it down, it goes right and the same with the left and right. do you have any idea which axes i should swap to the generic.kl to make the stick work correctly. its a generic joystick. thx

                            Sent from my GT-I9300 using Tapatalk
                            FIRMWARE & HARDWARE COMPATIBILITY LIST FOR ANDROID TV STICKS
                            https://docs.google.com/spreadsheet/pub?key=0ApGXribKk_8gdEc3YnlmOHlfRlRQVUxFbkJ3Zzg3U EE&output=html
                            My Plexi MK802IV mod
                            http://www.freaktab.com/showthread.p...xi-MK802IV-mod

                            Comment


                              #15
                              Re: How to remap our inputs devices in our tv sticks.

                              Originally posted by neoal View Post
                              leolas im trying to map the sticks of my joystick because when i play shadow gun the second stick is a mess. when i try to move it up it moves left, when i try to move it down, it goes right and the same with the left and right. do you have any idea which axes i should swap to the generic.kl to make the stick work correctly. its a generic joystick. thx

                              Sent from my GT-I9300 using Tapatalk
                              Uff, remap joystick using this way can be difficult, I think that some apk make it in an easy way.
                              Is an analogic joystick? Or a pad controller?

                              leolas.
                              REMEMBER, YOUR FEEDBACK IS VERY IMPORTANT TO US.
                              My devices:
                              Minix Neo X7; Minix Neo X8-H , Minix Neo Z64W & Z64 (Sponsored by Minix)
                              MK902 & MK902II(Sponsored by RKM)
                              Beelink M8B & Beelink R89 (Sponsored by Beelink)
                              Tronsmart VEGA S89H (Sponsored by
                              Gearbest.com)
                              MELE-PCG03 (Sponsored by Gearbest.com) Discount Coupon:MPCG03
                              Ainol Intel Z3735 MiniPC(Sponsored by Gearbest.com)
                              Thanks to them I can try to support your devices http://freaktab.com/core/images/smilies/wink.png

                              Comment

                              Working...
                              X