diff --git a/java/res/values/keycodes.xml b/java/res/values/keycodes.xml index 9dded508a..c5d5b3cd1 100644 --- a/java/res/values/keycodes.xml +++ b/java/res/values/keycodes.xml @@ -27,5 +27,6 @@ -5 -100 + -102 -103 diff --git a/java/res/xml-da/kbd_qwerty.xml b/java/res/xml-da/kbd_qwerty.xml index a17d604bf..084795463 100644 --- a/java/res/xml-da/kbd_qwerty.xml +++ b/java/res/xml-da/kbd_qwerty.xml @@ -176,8 +176,6 @@ android:keyEdgeFlags="left" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + android:codes="@integer/key_f1" /> + + + + + + + + diff --git a/java/res/xml/popup_mic.xml b/java/res/xml/popup_mic.xml new file mode 100644 index 000000000..f3cc63817 --- /dev/null +++ b/java/res/xml/popup_mic.xml @@ -0,0 +1,40 @@ + + + + + + + + + diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboard.java b/java/src/com/android/inputmethod/latin/LatinKeyboard.java index 14a503bc3..43d0a7beb 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboard.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboard.java @@ -367,11 +367,13 @@ public class LatinKeyboard extends Keyboard { mF1Key.label = null; mF1Key.icon = mMicIcon; mF1Key.iconPreview = mMicPreviewIcon; + mF1Key.popupResId = R.xml.popup_mic; } else { mF1Key.label = ","; mF1Key.codes = new int[] { ',' }; mF1Key.icon = null; mF1Key.iconPreview = null; + mF1Key.popupResId = R.xml.popup_comma; } } diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java index c4afd9a27..22d39f7aa 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java @@ -17,7 +17,6 @@ package com.android.inputmethod.latin; import android.content.Context; -import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.Paint; import android.inputmethodservice.Keyboard; @@ -42,8 +41,6 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { private Keyboard mPhoneKeyboard; - private final boolean mLongPressCommaForSettingsEnabled; - /** Whether we've started dropping move events because we found a big jump */ private boolean mDroppingEvents; /** @@ -62,10 +59,6 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { public LatinKeyboardView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); - - Resources res = context.getResources(); - mLongPressCommaForSettingsEnabled = res.getBoolean( - R.bool.config_long_press_comma_for_settings_enabled); } public void setPhoneKeyboard(Keyboard phoneKeyboard) { @@ -101,9 +94,6 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { } else if (primaryCode == '0' && getKeyboard() == mPhoneKeyboard) { // Long pressing on 0 in phone number keypad gives you a '+'. return invokeOnKey('+'); - } else if (primaryCode == KEYCODE_VOICE - || (primaryCode == ',' && mLongPressCommaForSettingsEnabled)) { - return invokeOnKey(KEYCODE_OPTIONS); } else { return super.onLongPress(key); }