1

I am designing custom keyboard.i want to change the key boards when user pressed "?123" and "ABC". i am able to trigger all key events other than these two.this is the code for key rows

<Row>

    <Key
        android:codes="NEED KEY CODE FOR THIS"
        android:keyEdgeFlags="left"
        android:isRepeatable="true"
        android:keyLabel="ABC"
        android:keyWidth="25%p" />
    <Key
        android:codes="55002"
        android:isRepeatable="true"
        android:keyIcon="@drawable/sym_keyboard_left"
        android:keyWidth="25%p" />
    <Key
        android:codes="55003"
        android:isRepeatable="true"
        android:keyIcon="@drawable/sym_keyboard_right"
        android:keyWidth="25%p" />
    <Key
        android:codes="55001"
        android:keyIcon="@drawable/sym_keyboard_allleft"
        android:keyWidth="25%p" />
    <Key
        android:codes="55004"
        android:keyEdgeFlags="right"
        android:keyIcon="@drawable/sym_keyboard_allright"
        android:keyWidth="25%p" />
</Row>

and

<Row>

    <Key
        android:codes="NEED KEY CODE FOR THIS"
        android:keyEdgeFlags="left"
        android:isRepeatable="true"
        android:keyLabel="\?123"
        android:keyWidth="25%p"/>
    <Key
        android:codes="55002"
        android:isRepeatable="true"
        android:keyIcon="@drawable/sym_keyboard_left"
        android:keyWidth="25%p"/>
    <Key
        android:codes="55003"
        android:isRepeatable="true"
        android:keyIcon="@drawable/sym_keyboard_right"
        android:keyWidth="25%p"/>
    <Key
        android:codes="55001"
        android:keyIcon="@drawable/sym_keyboard_allleft"
        android:keyWidth="25%p"/>
    <Key
        android:codes="55004"
        android:keyEdgeFlags="right"
        android:keyIcon="@drawable/sym_keyboard_allright"
        android:keyWidth="25%p"/>
</Row>

and another problem is pressing on these "?123" and "ABC" inserting some special characters automatically. help me with these two issues.

  • 1
    Actually there is no code for this key. Take a look at these questions: https://stackoverflow.com/questions/35868384/android-what-is-the-keyevent-keycode-for-123-key-on-soft-keyboard https://stackoverflow.com/questions/25219855/how-to-show-android-keyboard-with-symbols-mode-by-default – Umair Dec 15 '17 at 12:56
  • @Umair how do i trigger for of these event ? –  Dec 15 '17 at 13:01
  • 1
    you can't, only other way is to "create a input method from the beginning, with your own keyboard class and own keyboardView. This way you can do whatever you want in the keyboard." – Umair Dec 15 '17 at 13:04

0 Answers0