Jump to content


Photo
* * * * * 2 votes

testing ICS on U8680 / U8730 Huawei MyTouch / Q


  • Please log in to reply
162 replies to this topic

#41 toquer

toquer

    n00b

  • Members
  • Pip
  • 18 posts

Posted 06 October 2013 - 10:51 AM

Using the app at https://github.com/c...est.apk/qr_code to tell you the key code for each key on the keyboard you can probably remap the keys found in /system/usr/keylayout. A guide: https://github.com/c...est.apk/qr_code.

so i'm trying to figure out how to work on this. and i found a bunch of key layout files in the folder specified. which one to modify is the question? and then the thought, what if we take the key layout files from the gingerbread version? will those work if they're in the same folder? any idea how to determine which one of the files is the keyboard layout used by the rom? 



#42 oneru

oneru

    n00b

  • Members
  • Pip
  • 13 posts
  • LocationOklahoma, USA
  • Current Device(s):Huawei U8730

Posted 06 October 2013 - 04:58 PM

First off, Mega kudoes to the work done so far. Yay for ICS on the mytouch q.

 

so i'm trying to figure out how to work on this. and i found a bunch of key layout files in the folder specified. which one to modify is the question? and then the thought, what if we take the key layout files from the gingerbread version? will those work if they're in the same folder? any idea how to determine which one of the files is the keyboard layout used by the rom? 

 

The file to modify is Generic.kl. I have the dpad working correctly. I'll post that section below. I used Titanium Backup to freeze the Huawei Input Method. This did fix some oddities with the physical keyboard, and made the shift button work. It also removed the only installed soft keyboard, so go install the google keyboard from google play first.

 

I'm still working on the alt button, in order to get numbers and punctuation to work. If I figure it out, I'll post back here.

 

Edit: ok, I have the physical keyboard working. There are two files that make the difference. It would be great to modify the rom zip in the initial post with these fixes.

 

The only keyboard related glitch I have is in the android terminal emulator. I generally remap the volume down and camera keys as control and fn modifiers within that program. When doing so now, they work as modifiers for the soft keyboard, but not the physical keyboard. If anybody has any ideas as to what's going on with that, I'm all ears.

 

/system/usr/keylayout/Generic.kl should be as follows:

# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Generic key layout file for full alphabetic US English PC style external keyboards.
#
# This file is intentionally very generic and is intended to support a broad rang of keyboards.
# Do not edit the generic key layout to support a specific keyboard; instead, create
# a new key layout file with the required keyboard configuration.
#

key 1     ESCAPE
key 2     1
key 3     2
key 4     3
key 5     4
key 6     5
key 7     6
key 8     7
key 9     8
key 10    9
key 11    0
key 12    MINUS
key 13    EQUALS
key 14    DEL
key 15    TAB
key 16    Q
key 17    W
key 18    E
key 19    R
key 20    T
key 21    Y
key 22    U
key 23    I
key 24    O
key 25    P
key 26    LEFT_BRACKET
key 27    RIGHT_BRACKET
key 28    ENTER
key 29    CTRL_LEFT
key 30    A
key 31    S
key 32    D
key 33    F
key 34    G
key 35    H
key 36    J
key 37    K
key 38    L
key 39    SEMICOLON
key 40    APOSTROPHE
key 41    GRAVE
key 42    SHIFT_LEFT
key 43    BACKSLASH
key 44    Z
key 45    X
key 46    C
key 47    V
key 48    B
key 49    N
key 50    M
key 51    COMMA
key 52    PERIOD
key 214   SLASH
key 54    SHIFT_RIGHT
key 55    NUMPAD_MULTIPLY
key 56    ALT_LEFT
key 57    SPACE
key 58    CAPS_LOCK
key 59    F1
key 60    F2
key 61    F3
key 62    F4
key 63    F5
key 64    F6
key 65    F7
key 66    F8
key 67    F9
key 68    F10
key 69    NUM_LOCK
key 70    SCROLL_LOCK
key 71    NUMPAD_7
key 72    NUMPAD_8
key 73    NUMPAD_9
key 74    NUMPAD_SUBTRACT
key 75    NUMPAD_4
key 76    NUMPAD_5
key 77    NUMPAD_6
key 78    NUMPAD_ADD
key 79    NUMPAD_1
key 80    NUMPAD_2
key 81    NUMPAD_3
key 82    NUMPAD_0
key 83    NUMPAD_DOT
# key 84 (undefined)
# key 85 "KEY_ZENKAKUHANKAKU"
key 86    BACKSLASH
key 87    F11
key 88    F12
# key 89 "KEY_RO"
# key 90 "KEY_KATAKANA"
# key 91 "KEY_HIRAGANA"
# key 92 "KEY_HENKAN"
# key 93 "KEY_KATAKANAHIRAGANA"
# key 94 "KEY_MUHENKAN"
key 95    NUMPAD_COMMA
key 96    NUMPAD_ENTER
key 97    CTRL_RIGHT
key 98    NUMPAD_DIVIDE
key 99    SYSRQ
key 100   ALT_RIGHT
# key 101 "KEY_LINEFEED"
#/*< DTS2012011904543 lijianzhao 20120119 begin */
key 102   HOME
#/* DTS2012011904543 lijianzhao 20120119 end >*/
key 106   DPAD_UP
key 104   PAGE_UP
key 103   DPAD_LEFT
key 108   DPAD_RIGHT
key 107   MOVE_END
key 105   DPAD_DOWN
key 109   PAGE_DOWN
key 110   INSERT
key 111   FORWARD_DEL
# key 112 "KEY_MACRO"
key 113   VOLUME_MUTE
key 114   VOLUME_DOWN
key 115   VOLUME_UP
key 116   POWER             WAKE
key 117   NUMPAD_EQUALS
# key 118 "KEY_KPPLUSMINUS"
key 119   BREAK
# key 120 (undefined)
key 121   NUMPAD_COMMA
# key 122 "KEY_HANGEUL"
# key 123 "KEY_HANJA"
# key 124 "KEY_YEN"
key 125   META_LEFT
key 126   META_RIGHT
key 127   MENU              WAKE_DROPPED
key 128   MEDIA_STOP
# key 129 "KEY_AGAIN"
# key 130 "KEY_PROPS"
# key 131 "KEY_UNDO"
# key 132 "KEY_FRONT"
# key 133 "KEY_COPY"
# key 134 "KEY_OPEN"
# key 135 "KEY_PASTE"
# key 136 "KEY_FIND"
# key 137 "KEY_CUT"
# key 138 "KEY_HELP"
key 139   MENU              WAKE_DROPPED
key 140   CALCULATOR
# key 141 "KEY_SETUP"
key 142   POWER             WAKE
key 143   POWER             WAKE
# key 144 "KEY_FILE"
# key 145 "KEY_SENDFILE"
# key 146 "KEY_DELETEFILE"
# key 147 "KEY_XFER"
# key 148 "KEY_PROG1"
# key 149 "KEY_PROG2"
key 150   EXPLORER
# key 151 "KEY_MSDOS"
key 152   POWER             WAKE
# key 153 "KEY_DIRECTION"
# key 154 "KEY_CYCLEWINDOWS"
key 155   ENVELOPE
key 156   BOOKMARK
# key 157 "KEY_COMPUTER"
key 158   BACK              WAKE_DROPPED
key 159   FORWARD
key 160   MEDIA_CLOSE
key 161   MEDIA_EJECT
key 162   MEDIA_EJECT
key 163   MEDIA_NEXT
key 164   MEDIA_PLAY_PAUSE
key 165   MEDIA_PREVIOUS
key 166   MEDIA_STOP
key 167   MEDIA_RECORD
key 168   MEDIA_REWIND
key 169   CALL
# key 170 "KEY_ISO"
key 171   MUSIC
key 172   HOME
# key 173 "KEY_REFRESH"
# key 174 "KEY_EXIT"
# key 175 "KEY_MOVE"
# key 176 "KEY_EDIT"
key 177   PAGE_UP
key 178   PAGE_DOWN
key 179   NUMPAD_LEFT_PAREN
key 180   NUMPAD_RIGHT_PAREN
# key 181 "KEY_NEW"
# key 182 "KEY_REDO"
# key 183   F13
# key 184   F14
# key 185   F15
# key 186   F16
# key 187   F17
# key 188   F18
# key 189   F19
# key 190   F20
# key 191   F21
# key 192   F22
# key 193   F23
# key 194   F24
# key 195 (undefined)
# key 196 (undefined)
# key 197 (undefined)
# key 198 (undefined)
# key 199 (undefined)
key 200   MEDIA_PLAY
key 201   MEDIA_PAUSE
# key 202 "KEY_PROG3"
# key 203 "KEY_PROG4"
# key 204 (undefined)
# key 205 "KEY_SUSPEND"
# key 206 "KEY_CLOSE"
key 207   MEDIA_PLAY
key 208   MEDIA_FAST_FORWARD
# key 209 "KEY_BASSBOOST"
# key 210 "KEY_PRINT"
# key 211 "KEY_HP"
key 212   CAMERA
key 213   MUSIC
#key 214   KEY_QUESTION
key 215   AT
# key 216 "KEY_CHAT"
key 217   SEARCH
# key 218 "KEY_CONNECT"
# key 219 "KEY_FINANCE"
# key 220 "KEY_SPORT"
# key 221 "KEY_SHOP"
# key 222 "KEY_ALTERASE"
# key 223 "KEY_CANCEL"
# key 224 "KEY_BRIGHTNESSDOWN"
# key 225 "KEY_BRIGHTNESSUP"
key 226   HEADSETHOOK

key 256   BUTTON_1
key 257   BUTTON_2
key 258   BUTTON_3
key 259   BUTTON_4
key 260   BUTTON_5
key 261   BUTTON_6
key 262   BUTTON_7
key 263   BUTTON_8
key 264   BUTTON_9
key 265   BUTTON_10
key 266   BUTTON_11
key 267   BUTTON_12
key 268   BUTTON_13
key 269   BUTTON_14
key 270   BUTTON_15
key 271   BUTTON_16

key 288   BUTTON_1
key 289   BUTTON_2
key 290   BUTTON_3
key 291   BUTTON_4
key 292   BUTTON_5
key 293   BUTTON_6
key 294   BUTTON_7
key 295   BUTTON_8
key 296   BUTTON_9
key 297   BUTTON_10
key 298   BUTTON_11
key 299   BUTTON_12
key 300   BUTTON_13
key 301   BUTTON_14
key 302   BUTTON_15
key 303   BUTTON_16


key 304   BUTTON_A
key 305   BUTTON_B
key 306   BUTTON_C
key 307   BUTTON_X
key 308   BUTTON_Y
key 309   BUTTON_Z
key 310   BUTTON_L1
key 311   BUTTON_R1
key 312   BUTTON_L2
key 313   BUTTON_R2
key 314   BUTTON_SELECT
key 315   BUTTON_START
key 316   BUTTON_MODE
key 317   BUTTON_THUMBL
key 318   BUTTON_THUMBR


# key 352 "KEY_OK"
# key 353 "KEY_SELECT"
# key 354 "KEY_GOTO"
# key 355 "KEY_CLEAR"
# key 356 "KEY_POWER2"
# key 357 "KEY_OPTION"
# key 358 "KEY_INFO"
# key 359 "KEY_TIME"
# key 360 "KEY_VENDOR"
# key 361 "KEY_ARCHIVE"
key 362   GUIDE
# key 363 "KEY_CHANNEL"
# key 364 "KEY_FAVORITES"
# key 365 "KEY_EPG"
key 366   DVR
# key 367 "KEY_MHP"
# key 368 "KEY_LANGUAGE"
# key 369 "KEY_TITLE"
# key 370 "KEY_SUBTITLE"
# key 371 "KEY_ANGLE"
# key 372 "KEY_ZOOM"
# key 373 "KEY_MODE"
# key 374 "KEY_KEYBOARD"
# key 375 "KEY_SCREEN"
# key 376 "KEY_PC"
key 377   TV
# key 378 "KEY_TV2"
# key 379 "KEY_VCR"
# key 380 "KEY_VCR2"
# key 381 "KEY_SAT"
# key 382 "KEY_SAT2"
# key 383 "KEY_CD"
# key 384 "KEY_TAPE"
# key 385 "KEY_RADIO"
# key 386 "KEY_TUNER"
# key 387 "KEY_PLAYER"
# key 388 "KEY_TEXT"
# key 389 "KEY_DVD"
# key 390 "KEY_AUX"
# key 391 "KEY_MP3"
# key 392 "KEY_AUDIO"
# key 393 "KEY_VIDEO"
# key 394 "KEY_DIRECTORY"
# key 395 "KEY_LIST"
# key 396 "KEY_MEMO"
key 397   CALENDAR
# key 398 "KEY_RED"
# key 399 "KEY_GREEN"
# key 400 "KEY_YELLOW"
# key 401 "KEY_BLUE"
key 402   CHANNEL_UP
key 403   CHANNEL_DOWN
# key 404 "KEY_FIRST"
# key 405 "KEY_LAST"
# key 406 "KEY_AB"
# key 407 "KEY_NEXT"
# key 408 "KEY_RESTART"
# key 409 "KEY_SLOW"
# key 410 "KEY_SHUFFLE"
# key 411 "KEY_BREAK"
# key 412 "KEY_PREVIOUS"
# key 413 "KEY_DIGITS"
# key 414 "KEY_TEEN"
# key 415 "KEY_TWEN"

key 429   CONTACTS

# key 448 "KEY_DEL_EOL"
# key 449 "KEY_DEL_EOS"
# key 450 "KEY_INS_LINE"
# key 451 "KEY_DEL_LINE"


key 464   FUNCTION
key 465   ESCAPE            FUNCTION
key 466   F1                FUNCTION
key 467   F2                FUNCTION
key 468   F3                FUNCTION
key 469   F4                FUNCTION
key 470   F5                FUNCTION
key 471   F6                FUNCTION
key 472   F7                FUNCTION
key 473   F8                FUNCTION
key 474   F9                FUNCTION
key 475   F10               FUNCTION
key 476   F11               FUNCTION
key 477   F12               FUNCTION
key 478   1                 FUNCTION
key 479   2                 FUNCTION
key 480   D                 FUNCTION
key 481   E                 FUNCTION
key 482   F                 FUNCTION
key 483   S                 FUNCTION
key 484   B                 FUNCTION


# key 497 KEY_BRL_DOT1
# key 498 KEY_BRL_DOT2
# key 499 KEY_BRL_DOT3
# key 500 KEY_BRL_DOT4
# key 501 KEY_BRL_DOT5
# key 502 KEY_BRL_DOT6
# key 503 KEY_BRL_DOT7
# key 504 KEY_BRL_DOT8


# Joystick and game controller axes.
# Axes that are not mapped will be assigned generic axis numbers by the input subsystem.
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x03 RX
axis 0x04 RY
axis 0x05 RZ
axis 0x06 THROTTLE
axis 0x07 RUDDER
axis 0x08 WHEEL
axis 0x09 GAS
axis 0x0a BRAKE
axis 0x10 HAT_X
axis 0x11 HAT_Y

and then /system/usr/keychars/Generic.kcm should be:

# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Key character map for a built-in generic virtual keyboard primarily used
# for instrumentation and testing purposes.
#

type FULL

### Basic QWERTY keys ###

key A {
    label:                              'A'
    base:                               'a'
    shift, capslock:                    'A'
    alt:                                '!'
    ctrl, meta:                    none
}

key B {
    label:                              'B'
    base:                               'b'
    shift, capslock:                    'B'
    alt:                                '/'
    ctrl, meta:                         none
}

key C {
    label:                              'C'
    base:                               'c'
    shift, capslock:                    'C'
    alt:                                '+'
    shift+alt:                          '\u00c7'
    ctrl, meta:                         none
}

key D {
    label:                              'D'
    base:                               'd'
    shift, capslock:                    'D'
    alt:                                '#'
    ctrl, meta:                    none
}

key E {
    label:                              'E'
    base:                               'e'
    shift, capslock:                    'E'
    alt:                                '3'
    ctrl, meta:                         none
}

key F {
    label:                              'F'
    base:                               'f'
    shift, capslock:                    'F'
    alt:                                '$'
    ctrl, meta:                    none
}

key G {
    label:                              'G'
    base:                               'g'
    shift, capslock:                    'G'
    alt:                                '%'
    ctrl, meta:                    none
}

key H {
    label:                              'H'
    base:                               'h'
    shift, capslock:                    'H'
    alt:                                '&'
    ctrl, meta:                    none
}

key I {
    label:                              'I'
    base:                               'i'
    shift, capslock:                    'I'
    alt:                                '8'
    ctrl, meta:                         none
}

key J {
    label:                              'J'
    base:                               'j'
    shift, capslock:                    'J'
    alt:                                '*'
    ctrl, meta:                    none
}

key K {
    label:                              'K'
    base:                               'k'
    shift, capslock:                    'K'
    alt:                                '('
    ctrl, meta:                    none
}

key L {
    label:                              'L'
    base:                               'l'
    shift, capslock:                    'L'
    alt:                                ')'
    ctrl, meta:                    none
}

key M {
    label:                              'M'
    base:                               'm'
    shift, capslock:                    'M'
    ctrl, alt, meta:                    none
}

key N {
    label:                              'N'
    base:                               'n'
    shift, capslock:                    'N'
    alt:                                '\\'
    ctrl, meta:                         none
}

key O {
    label:                              'O'
    base:                               'o'
    shift, capslock:                    'O'
    alt:                                '9'
    ctrl, meta:                    none
}

key P {
    label:                              'P'
    base:                               'p'
    shift, capslock:                    'P'
    alt:                                '0'
    ctrl, meta:                    none
}

key Q {
    label:                              'Q'
    base:                               'q'
    alt:                                '1'
    shift, capslock:                    'Q'
    ctrl, meta:                    none
}

key R {
    label:                              'R'
    base:                               'r'
    shift, capslock:                    'R'
    alt:                                '4'
    ctrl, meta:                    none
}

key S {
    label:                              'S'
    base:                               's'
    shift, capslock:                    'S'
    alt:                                '~'
    ctrl, meta:                         none
}

key T {
    label:                              'T'
    base:                               't'
    shift, capslock:                    'T'
    alt:                                '5'
    ctrl, meta:                    none
}

key U {
    label:                              'U'
    base:                               'u'
    shift, capslock:                    'U'
    alt:                                '7'
    ctrl, meta:                         none
}

key V {
    label:                              'V'
    base:                               'v'
    shift, capslock:                    'V'
    alt:                                '='
    ctrl, meta:                    none
}

key W {
    label:                              'W'
    base:                               'w'
    alt:                                '2'
    shift, capslock:                    'W'
    ctrl, meta:                    none
}

key X {
    label:                              'X'
    base:                               'x'
    shift, capslock:                    'X'
    alt:                                '-'
    ctrl, meta:                    none
}

key Y {
    label:                              'Y'
    base:                               'y'
    shift, capslock:                    'Y'
    alt:                                '6'
    ctrl, meta:                    none
}

key Z {
    label:                              'Z'
    base:                               'z'
    shift, capslock:                    'Z'
    alt:                                '_'
    ctrl, meta:                    none
}

key 0 {
    label, number:                      '0'
    base:                               '0'
    shift:                              ')'
    ctrl, alt, meta:                    none
}

key 1 {
    label, number:                      '1'
    base:                               '1'
    shift:                              '!'
    ctrl, alt, meta:                    none
}

key 2 {
    label, number:                      '2'
    base:                               '2'
    shift:                              '@'
    ctrl, alt, meta:                    none
}

key 3 {
    label, number:                      '3'
    base:                               '3'
    shift:                              '#'
    ctrl, alt, meta:                    none
}

key 4 {
    label, number:                      '4'
    base:                               '4'
    shift:                              '$'
    ctrl, alt, meta:                    none
}

key 5 {
    label, number:                      '5'
    base:                               '5'
    shift:                              '%'
    ctrl, alt, meta:                    none
}

key 6 {
    label, number:                      '6'
    base:                               '6'
    shift:                              '^'
    ctrl, alt, meta:                    none
    alt+shift:                          '\u0302'
}

key 7 {
    label, number:                      '7'
    base:                               '7'
    shift:                              '&'
    ctrl, alt, meta:                    none
}

key 8 {
    label, number:                      '8'
    base:                               '8'
    shift:                              '*'
    ctrl, alt, meta:                    none
}

key 9 {
    label, number:                      '9'
    base:                               '9'
    shift:                              '('
    ctrl, alt, meta:                    none
}

key SPACE {
    label:                              ' '
    base:                               ' '
    ctrl, alt:                          none
    meta:                               fallback SEARCH
}

key ENTER {
    label:                              '\n'
    base:                               '\n'
    ctrl, alt, meta:                    none
}

key TAB {
    label:                              '\t'
    base:                               '\t'
    ctrl, alt:                          none
    meta:                               fallback APP_SWITCH
}

key COMMA {
    label, number:                      ','
    base:                               ','
    shift:                              '<'
    alt:                                ';'
    ctrl, meta:                    none
}

key PERIOD {
    label, number:                      '.'
    base:                               '.'
    shift:                              '>'
    alt:                                ':'
    ctrl, meta:                    none
}

#key SLASH {
#    label, number:                      '/'
#    base:                               '/'
#    shift:                              '?'
#    ctrl, alt, meta:                    none
#}

key GRAVE {
    label, number:                      '`'
    base:                               '`'
    shift:                              '~'
    alt:                                '\u0300'
    alt+shift:                          '\u0303'
    ctrl, meta:                         none
}

key MINUS {
    label, number:                      '-'
    base:                               '-'
    shift:                              '_'
    ctrl, alt, meta:                    none
}

key EQUALS {
    label, number:                      '='
    base:                               '='
    shift:                              '+'
    ctrl, alt, meta:                    none
}

key SLASH {
    label, number:                      '?'
    base:                               '?'
    shift:                              '?'
    alt:                                '\"'
    ctrl, meta:                         none
}

key LEFT_BRACKET {
    label, number:                      '['
    base:                               '['
    shift:                              '{'
    ctrl, alt, meta:                    none
}

key RIGHT_BRACKET {
    label, number:                      ']'
    base:                               ']'
    shift:                              '}'
    ctrl, alt, meta:                    none
}

key BACKSLASH {
    label, number:                      '\\'
    base:                               '\\'
    shift:                              '|'
    ctrl, alt, meta:                    none
}

key SEMICOLON {
    label, number:                      ';'
    base:                               ';'
    shift:                              ':'
    ctrl, alt, meta:                    none
}

key APOSTROPHE {
    label, number:                      '\''
    base:                               '\''
    shift:                              '"'
    ctrl, alt, meta:                    none
}

### Numeric keypad ###

key NUMPAD_0 {
    label, number:                      '0'
    base:                               fallback INSERT
    numlock:                            '0'
    ctrl, alt, meta:                    none
}

key NUMPAD_1 {
    label, number:                      '1'
    base:                               fallback MOVE_END
    numlock:                            '1'
    ctrl, alt, meta:                    none
}

key NUMPAD_2 {
    label, number:                      '2'
    base:                               fallback DPAD_DOWN
    numlock:                            '2'
    ctrl, alt, meta:                    none
}

key NUMPAD_3 {
    label, number:                      '3'
    base:                               fallback PAGE_DOWN
    numlock:                            '3'
    ctrl, alt, meta:                    none
}

key NUMPAD_4 {
    label, number:                      '4'
    base:                               fallback DPAD_LEFT
    numlock:                            '4'
    ctrl, alt, meta:                    none
}

key NUMPAD_5 {
    label, number:                      '5'
    base:                               fallback DPAD_CENTER
    numlock:                            '5'
    ctrl, alt, meta:                    none
}

key NUMPAD_6 {
    label, number:                      '6'
    base:                               fallback DPAD_RIGHT
    numlock:                            '6'
    ctrl, alt, meta:                    none
}

key NUMPAD_7 {
    label, number:                      '7'
    base:                               fallback MOVE_HOME
    numlock:                            '7'
    ctrl, alt, meta:                    none
}

key NUMPAD_8 {
    label, number:                      '8'
    base:                               fallback DPAD_UP
    numlock:                            '8'
    ctrl, alt, meta:                    none
}

key NUMPAD_9 {
    label, number:                      '9'
    base:                               fallback PAGE_UP
    numlock:                            '9'
    ctrl, alt, meta:                    none
}

key NUMPAD_LEFT_PAREN {
    label, number:                      '('
    base:                               '('
    ctrl, alt, meta:                    none
}

key NUMPAD_RIGHT_PAREN {
    label, number:                      ')'
    base:                               ')'
    ctrl, alt, meta:                    none
}

key NUMPAD_DIVIDE {
    label, number:                      '/'
    base:                               '/'
    ctrl, alt, meta:                    none
}

key NUMPAD_MULTIPLY {
    label, number:                      '*'
    base:                               '*'
    ctrl, alt, meta:                    none
}

key NUMPAD_SUBTRACT {
    label, number:                      '-'
    base:                               '-'
    ctrl, alt, meta:                    none
}

key NUMPAD_ADD {
    label, number:                      '+'
    base:                               '+'
    ctrl, alt, meta:                    none
}

key NUMPAD_DOT {
    label, number:                      '.'
    base:                               fallback FORWARD_DEL
    numlock:                            '.'
    ctrl, alt, meta:                    none
}

key NUMPAD_COMMA {
    label, number:                      ','
    base:                               ','
    ctrl, alt, meta:                    none
}

key NUMPAD_EQUALS {
    label, number:                      '='
    base:                               '='
    ctrl, alt, meta:                    none
}

key NUMPAD_ENTER {
    label:                              '\n'
    base:                               '\n' fallback ENTER
    ctrl, alt, meta:                    none fallback ENTER
}

### Special keys on phones ###

key AT {
    label, number:                      '@'
    base:                               '@'
    alt:                                '\''
}

key STAR {
    label, number:                      '*'
    base:                               '*'
}

key POUND {
    label, number:                      '#'
    base:                               '#'
}

key PLUS {
    label, number:                      '+'
    base:                               '+'
}

### Non-printing keys ###

key ESCAPE {
    base:                               fallback BACK
    meta:                               fallback HOME
    alt:                                fallback MENU
}



#43 Viper_Prime

Viper_Prime

    n00b

  • Members
  • Pip
  • 7 posts
  • Current Device(s):Huawei U8730

Posted 07 October 2013 - 07:59 AM

I'm keeping a close watch on this progress.  Very exciting.  I also have a question....does the Google Chrome app work on this phone now with this rom?



#44 oneru

oneru

    n00b

  • Members
  • Pip
  • 13 posts
  • LocationOklahoma, USA
  • Current Device(s):Huawei U8730

Posted 07 October 2013 - 08:06 AM

I'm keeping a close watch on this progress.  Very exciting.  I also have a question....does the Google Chrome app work on this phone now with this rom?

*looks it up*

...

*installs*

...

 

*thumbs up*

 

Seems to work fairly well.



#45 toquer

toquer

    n00b

  • Members
  • Pip
  • 18 posts

Posted 08 October 2013 - 11:31 AM

how do i overwrite the original files? im pretty stupid when it comes to making this work. its not dos anymore.

#46 toquer

toquer

    n00b

  • Members
  • Pip
  • 18 posts

Posted 08 October 2013 - 12:02 PM

im figuring its through adb, but i cant even get to the files that way. and thinking about using terminal emulator is a joke and a half.

#47 surfer43

surfer43

    n00b

  • Members
  • Pip
  • 22 posts
  • LocationSouth Carolina
  • Current Device(s):Huawei U8680

Posted 08 October 2013 - 12:12 PM

im figuring its through adb, but i cant even get to the files that way. and thinking about using terminal emulator is a joke and a half.

Install root browser from play store. Open app. Navigate to /system/usr/keylayout. Click on the files to overwrite. Click "Open as...". Click Text file. Click "RB text editor". Delete everything and paste in new code. Click save button in the top right to the left of "Size". Grant superuser permissions.



#48 oneru

oneru

    n00b

  • Members
  • Pip
  • 13 posts
  • LocationOklahoma, USA
  • Current Device(s):Huawei U8730

Posted 08 October 2013 - 08:16 PM

This took me way longer to figure out than it should have, but I've put my fixes into a flashable zip. As always, put keyfix.zip on your sd card, boot into cwm, and then flash it from there.

Attached Files


  • SamuraiCX likes this

#49 toquer

toquer

    n00b

  • Members
  • Pip
  • 18 posts

Posted 09 October 2013 - 05:44 AM

thanks so much!! does alt work for you? what about the ? on my physicalkeyboards these dont work.

#50 oneru

oneru

    n00b

  • Members
  • Pip
  • 13 posts
  • LocationOklahoma, USA
  • Current Device(s):Huawei U8730

Posted 09 October 2013 - 08:04 AM

I do have those functions working. I'll take another look at the zip, and probably release a revision.

#51 oneru

oneru

    n00b

  • Members
  • Pip
  • 13 posts
  • LocationOklahoma, USA
  • Current Device(s):Huawei U8730

Posted 09 October 2013 - 09:37 AM

Thinking more about this, Have you switched away from Huawei Input method as your on screen keyboard yet? Go grab either the google keyboard, or the hacker's keyboard. Switch to one of those, and see if the question mark and alt button on the physical keyboard starts working.it seems that the Huawei input method is grabbing input and has no clue what to do with the alt button.

#52 toquer

toquer

    n00b

  • Members
  • Pip
  • 18 posts

Posted 09 October 2013 - 02:10 PM

to start i put googles keyboard on and set it to default. then i used root uninstaller to disable the huawei input device and that didn't fix it. then i cut and pasted the edits above to the two files and lost the physical keyboard entirely. also lost the soft keys on the screen. so i'm working on seeing if i can get my data backed up and then i'll reinstall the rom. what i think happened, was that in an attempt to get the keyboard working i put cust.img back on. however, i've modified this file a few times to continue to slim it down to just what was necessary on gingerbread. in any case, let's hope for the best with a clean rom install.



#53 RockinLoud

RockinLoud

    n00b

  • Members
  • Pip
  • 10 posts
  • LocationSomewhere
  • Current Device(s):Galaxy S3 (Spint) Galaxy S2 (sprint) Huawei MyTouch Q (U8730 T-Mobile)

Posted 09 October 2013 - 02:44 PM

Any way to fix it to be like the 8730 rom and have the back light on the keyboard light up like normal and the on screen keyboard disapper in landscape when u type? I mean if yall wont do it i will but i been working on my sII project. Cant wait for kit kat :p. But this is a project phone for my gf to give to her. she wants a newer andriod than gingerbread. Having issues with this i could fix if i put time into it but i was curious if oneru had already started working on these other issues. the screen rotation is #1 concern for me. Currently using an app to lock it in portait.


One of the smartest guys your'll meet. Not even being cocky. Love technology so much.

Built: 6 computers (5 intel, 1 Amd)  1 personal os (Unix/Java Based. Custom file system) 3 current Android Projects from scratch.... and so much more.

 


#54 RockinLoud

RockinLoud

    n00b

  • Members
  • Pip
  • 10 posts
  • LocationSomewhere
  • Current Device(s):Galaxy S3 (Spint) Galaxy S2 (sprint) Huawei MyTouch Q (U8730 T-Mobile)

Posted 09 October 2013 - 03:01 PM

This took me way longer to figure out than it should have, but I've put my fixes into a flashable zip. As always, put keyfix.zip on your sd card, boot into cwm, and then flash it from there.

Alt key assignment incorrect for phone. Or at least the ones included in the zip. Guess i could help yall out on this. Been working on this stuff for years. Usally go with the higher end phones but this ones for my gf and she has a horrible history with destorying phones so she doesnt get my sii ;p. 


One of the smartest guys your'll meet. Not even being cocky. Love technology so much.

Built: 6 computers (5 intel, 1 Amd)  1 personal os (Unix/Java Based. Custom file system) 3 current Android Projects from scratch.... and so much more.

 


#55 RockinLoud

RockinLoud

    n00b

  • Members
  • Pip
  • 10 posts
  • LocationSomewhere
  • Current Device(s):Galaxy S3 (Spint) Galaxy S2 (sprint) Huawei MyTouch Q (U8730 T-Mobile)

Posted 09 October 2013 - 03:45 PM

seems to be some code missing either from the cust.img or from the original stock rom. downloading the gingerbread version to see the connection. Since obvious this rom is from another phone without a slider the keyboard hardware keys are being maped only cause of leftover code found in every version of android (kinda a catch all [hell even my SIII has it XD]). This is the problems you get when starting with the wrong base. Would have been better to start from scratch using the source code from google. In the effort to save work you've actually created much more headache of back tracking. So first off we need to find the slider control module from the gingerbread rom and see if that is compatible with the ics infrastructure. if not, it wouldn't be to hard to build a custom one. We need to tell the phone it has a qwer physical keyboard. Cause at this point it has no idea, hense why back light and screen orientation is not working correctly. 


One of the smartest guys your'll meet. Not even being cocky. Love technology so much.

Built: 6 computers (5 intel, 1 Amd)  1 personal os (Unix/Java Based. Custom file system) 3 current Android Projects from scratch.... and so much more.

 


#56 RockinLoud

RockinLoud

    n00b

  • Members
  • Pip
  • 10 posts
  • LocationSomewhere
  • Current Device(s):Galaxy S3 (Spint) Galaxy S2 (sprint) Huawei MyTouch Q (U8730 T-Mobile)

Posted 09 October 2013 - 03:52 PM

Grabbing a complete blueprint of both phones and gunna tear though this code. If any of you make progress let me know ok. Like i said this is a side project for me. Kinda wanted a down and go type of deal but seem like the community hates this phone... :/ Which is sad cause its not that bad.


One of the smartest guys your'll meet. Not even being cocky. Love technology so much.

Built: 6 computers (5 intel, 1 Amd)  1 personal os (Unix/Java Based. Custom file system) 3 current Android Projects from scratch.... and so much more.

 


#57 toquer

toquer

    n00b

  • Members
  • Pip
  • 18 posts

Posted 09 October 2013 - 03:57 PM

in my keylayout directory there are 14 different layouts. shouldn't there be only 2 initially? a generic and one for the physical keyboard? is there a way to determine which one the system is using? I found a guide that suggests this...

Step Two  

Connect your keyboard (be that USB or bluetooth) and open Terminal Emulator app

Enter the following:

cat /proc/bus/input/devices

Find in the list displayed whichever one looks like your keyboard (usually you can tell by the brand name) and make a note of the Vendor and Product id’s e.g. 05ac and 258d

  Step Three  

Using Root Explorer (or similar) navigate to /system/usr/keylayout and copy the file ‘Generic.kl’.  Copy and Paste this file, then rename the copy to “Vendor__Product_.kl”’

<vendorID> and <ProductID> being the two numbers you made a note of at the end of Step Two

 

http://droid-den.com...dware-keyboard/

 

 

I've been wanting to get to do this, but I'm a bit confused on exactly what to do and short of messing up...well that's why I'm here.

 

 

i'll give it a shot and see what comes since I got some time right now.



#58 RockinLoud

RockinLoud

    n00b

  • Members
  • Pip
  • 10 posts
  • LocationSomewhere
  • Current Device(s):Galaxy S3 (Spint) Galaxy S2 (sprint) Huawei MyTouch Q (U8730 T-Mobile)

Posted 09 October 2013 - 04:07 PM

in my keylayout directory there are 14 different layouts. shouldn't there be only 2 initially? a generic and one for the physical keyboard? is there a way to determine which one the system is using? I found a guide that suggests this...

Step Two  

Connect your keyboard (be that USB or bluetooth) and open Terminal Emulator app

Enter the following:

cat /proc/bus/input/devices

Find in the list displayed whichever one looks like your keyboard (usually you can tell by the brand name) and make a note of the Vendor and Product id’s e.g. 05ac and 258d

  Step Three  

Using Root Explorer (or similar) navigate to /system/usr/keylayout and copy the file ‘Generic.kl’.  Copy and Paste this file, then rename the copy to “Vendor__Product_.kl”’

<vendorID> and <ProductID> being the two numbers you made a note of at the end of Step Two

 

http://droid-den.com...dware-keyboard/

 

 

I've been wanting to get to do this, but I'm a bit confused on exactly what to do and short of messing up...well that's why I'm here.

 

 

i'll give it a shot and see what comes since I got some time right now.

alright. Imma still look into the original code. Definitly more than just keymapping is the problem. Like i said the phone isnt accounting for the slide function. That event handler is absent since this rom is from a slideless phone. So im trying to snag the original if itll work with the ics infrastructure. 


One of the smartest guys your'll meet. Not even being cocky. Love technology so much.

Built: 6 computers (5 intel, 1 Amd)  1 personal os (Unix/Java Based. Custom file system) 3 current Android Projects from scratch.... and so much more.

 


#59 toquer

toquer

    n00b

  • Members
  • Pip
  • 18 posts

Posted 09 October 2013 - 05:04 PM

so in terminal I have...

fluid-keypad

synaptics

sensors

hw_slide_detect

sensors_aps

7k_handset

ts_test_input

 

in keylayout folder I have

7k_handset (appears to be the buttons on the depth face of the phone)

avrcp (Bluetooth AVRCP support)

fluid-keypad (appears to be the buttons on the depth face of the phone in addition to the soft buttons and handsfree button support)

generic

msm_tma300_ts (appears to be the soft buttons)

qwerty (emulator keyboard)

surf_keypad (a physical keyboard that isn't this phones)

vendor_045e_product_028e (xbox 360 usb controller)

vendor_046d_product_c216 (Logitech dual action controller)

vendor_046d_product_c294 (Logitech g25 racing wheel (in compatibility mode))

vendor_046d_product_c299 (Logitech g25 racing wheel (in native mode))

vendor_046d_product_c532 (Logitech revue wireless keyboard)

vendor_054c_product_0268 (sony playstation 3 controller)

vendor_05ac_product_0239 (apple wireless keyboard)

vendor_22b8_product_093d (Motorola Bluetooth wireless keyboard)

 

this is what I've been able to gather



#60 oneru

oneru

    n00b

  • Members
  • Pip
  • 13 posts
  • LocationOklahoma, USA
  • Current Device(s):Huawei U8730

Posted 09 October 2013 - 05:44 PM

 

Any way to fix it to be like the 8730 rom and have the back light on the keyboard light up like normal and the on screen keyboard disapper in landscape when u type? I mean if yall wont do it i will but i been working on my sII project. Cant wait for kit kat  :p. But this is a project phone for my gf to give to her. she wants a newer andriod than gingerbread. Having issues with this i could fix if i put time into it but i was curious if oneru had already started working on these other issues. the screen rotation is #1 concern for me. Currently using an app to lock it in portait.

 

 

Hey, welcome to the discussion.

I've basically done the same as you have, just a bit of hacking to make the rom more usable. I've been trying to share any hacks I thought others might find useful, hence the key mapping. I'm also using an app for the screen rotate issue. I'm not really a phone dev, but I am a Linux guy, hence I tend to try to fix it in userspace. 

 

 

Alt key assignment incorrect for phone. ... seems to be some code missing either from the cust.img or from the original stock rom. downloading the gingerbread version to see the connection. Since obvious this rom is from another phone without a slider the keyboard hardware keys are being maped only cause of leftover code found in every version of android (kinda a catch all [hell even my SIII has it XD]). This is the problems you get when starting with the wrong base. Would have been better to start from scratch using the source code from google. In the effort to save work you've actually created much more headache of back tracking. So first off we need to find the slider control module from the gingerbread rom and see if that is compatible with the ics infrastructure. if not, it wouldn't be to hard to build a custom one. We need to tell the phone it has a qwer physical keyboard. Cause at this point it has no idea, hense why back light and screen orientation is not working correctly. 

 

 

I believe there is a kernel driver in the stock rom that handles the keyboard. The code that's currently handling it is really intended for plugging in an external keyboard. The Generic.* files are the catch all that get called if no other keymap files are explicitly referenced by the driver. As we have no specific driver, we fix the codes there. The alt key assignment does work, but the  huawei soft keyboard app catches those button presses, which is why it has to be frozen or uninstalled first. It could be that a better keymap would make more of that work. I should really restore my Gingerbread backup and look at how it works there.

 

There are Gingerbread kernel sources, linked in another thread around here. I've only spent a few minutes poking at them, and didn't find anything that looked like the keyboard driver. Not sure that Huawei actually included much of their own code there, but again, I haven't taken much time to look.

 

 

Kinda wanted a down and go type of deal but seem like the community hates this phone... :/ Which is sad cause its not that bad.

 

The hardware is actually quite nice. It just ended up being T-Mobile's red headed step child.

 

 

alright. Imma still look into the original code. Definitly more than just keymapping is the problem.

 

Oh certainly. Like I said, the keymapping is a hack to make it more usable. I'll keep working at it, and report any further progress. Best of luck to you.






3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users