SDL: new API to show built-in SDL keyboard, fixed built-in QWERTY keyboard
This commit is contained in:
@@ -487,9 +487,15 @@ public class MainActivity extends Activity
|
||||
cloudSave.onActivityResult(request, response, data);
|
||||
}
|
||||
|
||||
private int TextInputKeyboardList[] = { 0, R.xml.qwerty, R.xml.c64, R.xml.amiga, R.xml.atari800 };
|
||||
private int TextInputKeyboardList[][] =
|
||||
{
|
||||
{ 0, R.xml.qwerty, R.xml.c64, R.xml.amiga, R.xml.atari800 },
|
||||
{ 0, R.xml.qwerty_shift, R.xml.c64, R.xml.amiga, R.xml.atari800 },
|
||||
{ 0, R.xml.qwerty_alt, R.xml.c64, R.xml.amiga, R.xml.atari800 },
|
||||
{ 0, R.xml.qwerty_alt_shift, R.xml.c64, R.xml.amiga, R.xml.atari800 }
|
||||
};
|
||||
|
||||
public void showScreenKeyboardWithoutTextInputField()
|
||||
public void showScreenKeyboardWithoutTextInputField(final int keyboard)
|
||||
{
|
||||
if( !keyboardWithoutTextInputShown )
|
||||
{
|
||||
@@ -498,7 +504,7 @@ public class MainActivity extends Activity
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
if (Globals.TextInputKeyboard == 0)
|
||||
if (keyboard == 0)
|
||||
{
|
||||
_inputManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
||||
_inputManager.showSoftInput(mGLView, InputMethodManager.SHOW_FORCED);
|
||||
@@ -510,6 +516,8 @@ public class MainActivity extends Activity
|
||||
return;
|
||||
class BuiltInKeyboardView extends KeyboardView
|
||||
{
|
||||
public boolean shift = false;
|
||||
public boolean alt = false;
|
||||
public BuiltInKeyboardView(Context context, android.util.AttributeSet attrs)
|
||||
{
|
||||
super(context, attrs);
|
||||
@@ -526,35 +534,83 @@ public class MainActivity extends Activity
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public boolean onKeyDown(int keyCode, final KeyEvent event)
|
||||
public boolean onKeyDown(int key, final KeyEvent event)
|
||||
{
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public boolean onKeyUp(int keyCode, final KeyEvent event)
|
||||
public boolean onKeyUp(int key, final KeyEvent event)
|
||||
{
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK)
|
||||
{
|
||||
showScreenKeyboardWithoutTextInputField(); // Hide keyboard
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public void ChangeKeyboard()
|
||||
{
|
||||
int idx = (shift ? 1 : 0) + (alt ? 2 : 0);
|
||||
setKeyboard(new Keyboard(MainActivity.this, TextInputKeyboardList[idx][keyboard]));
|
||||
setPreviewEnabled(false);
|
||||
setProximityCorrectionEnabled(false);
|
||||
}
|
||||
}
|
||||
BuiltInKeyboardView builtinKeyboard = new BuiltInKeyboardView(MainActivity.this, null);
|
||||
builtinKeyboard.setKeyboard(new Keyboard(MainActivity.this, TextInputKeyboardList[Globals.TextInputKeyboard]));
|
||||
final BuiltInKeyboardView builtinKeyboard = new BuiltInKeyboardView(MainActivity.this, null);
|
||||
builtinKeyboard.setKeyboard(new Keyboard(MainActivity.this, TextInputKeyboardList[0][keyboard]));
|
||||
builtinKeyboard.setPreviewEnabled(false);
|
||||
builtinKeyboard.setProximityCorrectionEnabled(false);
|
||||
builtinKeyboard.setOnKeyboardActionListener(new KeyboardView.OnKeyboardActionListener()
|
||||
{
|
||||
public void onPress(int key)
|
||||
{
|
||||
if (key == KeyEvent.KEYCODE_BACK)
|
||||
return;
|
||||
if (key < 0)
|
||||
return;
|
||||
if (key > 100000)
|
||||
{
|
||||
key -= 100000;
|
||||
MainActivity.this.onKeyDown(KeyEvent.KEYCODE_SHIFT_LEFT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_SHIFT_LEFT));
|
||||
}
|
||||
MainActivity.this.onKeyDown(key, new KeyEvent(KeyEvent.ACTION_DOWN, key));
|
||||
}
|
||||
public void onRelease(int key)
|
||||
{
|
||||
if (key == KeyEvent.KEYCODE_BACK)
|
||||
{
|
||||
builtinKeyboard.setOnKeyboardActionListener(null);
|
||||
showScreenKeyboardWithoutTextInputField(0); // Hide keyboard
|
||||
return;
|
||||
}
|
||||
if (key == Keyboard.KEYCODE_SHIFT)
|
||||
{
|
||||
builtinKeyboard.shift = ! builtinKeyboard.shift;
|
||||
if (builtinKeyboard.shift && !builtinKeyboard.alt)
|
||||
MainActivity.this.onKeyDown(KeyEvent.KEYCODE_SHIFT_LEFT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_SHIFT_LEFT));
|
||||
else
|
||||
MainActivity.this.onKeyUp(KeyEvent.KEYCODE_SHIFT_LEFT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_SHIFT_LEFT));
|
||||
builtinKeyboard.ChangeKeyboard();
|
||||
return;
|
||||
}
|
||||
if (key == Keyboard.KEYCODE_ALT)
|
||||
{
|
||||
builtinKeyboard.alt = ! builtinKeyboard.alt;
|
||||
if (builtinKeyboard.alt)
|
||||
MainActivity.this.onKeyUp(KeyEvent.KEYCODE_SHIFT_LEFT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_SHIFT_LEFT));
|
||||
else
|
||||
builtinKeyboard.shift = false;
|
||||
builtinKeyboard.ChangeKeyboard();
|
||||
return;
|
||||
}
|
||||
if (key < 0)
|
||||
return;
|
||||
|
||||
boolean shifted = false;
|
||||
if (key > 100000)
|
||||
{
|
||||
key -= 100000;
|
||||
shifted = true;
|
||||
}
|
||||
|
||||
MainActivity.this.onKeyUp(key, new KeyEvent(KeyEvent.ACTION_UP, key));
|
||||
|
||||
if (shifted)
|
||||
MainActivity.this.onKeyUp(KeyEvent.KEYCODE_SHIFT_LEFT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_SHIFT_LEFT));
|
||||
}
|
||||
public void onText(CharSequence p1) {}
|
||||
public void swipeLeft() {}
|
||||
@@ -563,16 +619,6 @@ public class MainActivity extends Activity
|
||||
public void swipeUp() {}
|
||||
public void onKey(int p1, int[] p2) {}
|
||||
});
|
||||
/*
|
||||
builtinKeyboard.addOnLayoutChangeListener(new View.OnLayoutChangeListener()
|
||||
{
|
||||
public void onLayoutChange (View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)
|
||||
{
|
||||
Log.i("SDL", "Built-in keyboard getTop " + top);
|
||||
((KeyboardView)v).setVerticalCorrection(top);
|
||||
}
|
||||
});
|
||||
*/
|
||||
_screenKeyboard = builtinKeyboard;
|
||||
FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM);
|
||||
_videoLayout.addView(_screenKeyboard, layout);
|
||||
@@ -606,7 +652,7 @@ public class MainActivity extends Activity
|
||||
{
|
||||
if(Globals.CompatibilityHacksTextInputEmulatesHwKeyboard)
|
||||
{
|
||||
showScreenKeyboardWithoutTextInputField();
|
||||
showScreenKeyboardWithoutTextInputField(Globals.TextInputKeyboard);
|
||||
return;
|
||||
}
|
||||
if(_screenKeyboard != null)
|
||||
@@ -718,7 +764,7 @@ public class MainActivity extends Activity
|
||||
public void hideScreenKeyboard()
|
||||
{
|
||||
if( keyboardWithoutTextInputShown )
|
||||
showScreenKeyboardWithoutTextInputField();
|
||||
showScreenKeyboardWithoutTextInputField(Globals.TextInputKeyboard);
|
||||
|
||||
if(_screenKeyboard == null || ! (_screenKeyboard instanceof EditText))
|
||||
return;
|
||||
|
||||
@@ -763,7 +763,12 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
|
||||
public void showScreenKeyboardWithoutTextInputField() // Called from native code
|
||||
{
|
||||
context.showScreenKeyboardWithoutTextInputField();
|
||||
context.showScreenKeyboardWithoutTextInputField(Globals.TextInputKeyboard);
|
||||
}
|
||||
|
||||
public void showInternalScreenKeyboard(int keyboard) // Called from native code
|
||||
{
|
||||
context.showScreenKeyboardWithoutTextInputField(keyboard);
|
||||
}
|
||||
|
||||
public void showScreenKeyboard(final String oldText, int unused) // Called from native code
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
--- a/project/AndroidManifest.xml 2014-11-24 19:30:31.003274516 +0200
|
||||
+++ b/project/AndroidManifest.xml 2014-11-24 19:30:33.547274398 +0200
|
||||
@@ -28,7 +28,9 @@
|
||||
@@ -45,6 +45,9 @@
|
||||
|
||||
<!-- <uses-permission android:name="android.permission.VIBRATE"></uses-permission> --> <!-- Vibrator not supported yet by SDL -->
|
||||
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="21"/>
|
||||
<!-- ==INTERNET== --> <uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||
-
|
||||
+ <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
|
||||
+ <uses-permission android:name="android.permission.CAMERA" />
|
||||
+ <uses-feature android:name="android.hardware.camera" android:required="false" />
|
||||
<!-- <uses-permission android:name="android.permission.VIBRATE"></uses-permission> --> <!-- Vibrator not supported yet by SDL -->
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <!-- Allow TV boxes -->
|
||||
<!-- ==SCREEN-SIZE-NORMAL== --> <supports-screens android:smallScreens="false" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" />
|
||||
|
||||
|
||||
Submodule project/jni/application/hid-pc-keyboard/src updated: aebafa7721...773eead644
@@ -117,6 +117,16 @@ extern DECLSPEC int SDLCALL SDL_ANDROID_ToggleScreenKeyboardTextInput(const char
|
||||
/* Show only the bare Android QWERTY keyboard without any text input field, so it won't cover the screen */
|
||||
extern DECLSPEC int SDLCALL SDL_ANDROID_ToggleScreenKeyboardWithoutTextInput(void);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_KEYBOARD_QWERTY = 1,
|
||||
SDL_KEYBOARD_COMMODORE = 2,
|
||||
SDL_KEYBOARD_AMIGA = 3,
|
||||
SDL_KEYBOARD_ATARI800 = 4,
|
||||
} SDL_InternalKeyboard_t;
|
||||
/* Show internal keyboard, built into SDL */
|
||||
extern DECLSPEC int SDLCALL SDL_ANDROID_ToggleInternalScreenKeyboard(SDL_InternalKeyboard_t keyboard);
|
||||
|
||||
/* Show Android QWERTY keyboard, and pass entered text back to application in a buffer,
|
||||
using buffer contents as previous text (UTF-8 encoded), the buffer may be of any size -
|
||||
this call will block until user typed all text. */
|
||||
|
||||
@@ -72,6 +72,7 @@ static jobject JavaRenderer = NULL;
|
||||
static jmethodID JavaSwapBuffers = NULL;
|
||||
static jmethodID JavaShowScreenKeyboard = NULL;
|
||||
static jmethodID JavaToggleScreenKeyboardWithoutTextInput = NULL;
|
||||
static jmethodID JavaToggleInternalScreenKeyboard = NULL;
|
||||
static jmethodID JavaHideScreenKeyboard = NULL;
|
||||
static jmethodID JavaIsScreenKeyboardShown = NULL;
|
||||
static jmethodID JavaSetScreenKeyboardHintMessage = NULL;
|
||||
@@ -238,6 +239,12 @@ int SDL_ANDROID_ToggleScreenKeyboardWithoutTextInput(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SDL_ANDROID_ToggleInternalScreenKeyboard(SDL_InternalKeyboard_t keyboard)
|
||||
{
|
||||
(*JavaEnv)->CallVoidMethod( JavaEnv, JavaRenderer, JavaToggleInternalScreenKeyboard, (jint)keyboard );
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if SDL_VERSION_ATLEAST(1,3,0)
|
||||
#else
|
||||
extern int SDL_Flip(SDL_Surface *screen);
|
||||
@@ -333,6 +340,7 @@ JAVA_EXPORT_NAME(DemoRenderer_nativeInitJavaCallbacks) ( JNIEnv* env, jobject t
|
||||
JavaSwapBuffers = (*JavaEnv)->GetMethodID(JavaEnv, JavaRendererClass, "swapBuffers", "()I");
|
||||
JavaShowScreenKeyboard = (*JavaEnv)->GetMethodID(JavaEnv, JavaRendererClass, "showScreenKeyboard", "(Ljava/lang/String;I)V");
|
||||
JavaToggleScreenKeyboardWithoutTextInput = (*JavaEnv)->GetMethodID(JavaEnv, JavaRendererClass, "showScreenKeyboardWithoutTextInputField", "()V");
|
||||
JavaToggleInternalScreenKeyboard = (*JavaEnv)->GetMethodID(JavaEnv, JavaRendererClass, "showInternalScreenKeyboard", "(I)V");
|
||||
JavaHideScreenKeyboard = (*JavaEnv)->GetMethodID(JavaEnv, JavaRendererClass, "hideScreenKeyboard", "()V");
|
||||
JavaIsScreenKeyboardShown = (*JavaEnv)->GetMethodID(JavaEnv, JavaRendererClass, "isScreenKeyboardShown", "()I");
|
||||
JavaSetScreenKeyboardHintMessage = (*JavaEnv)->GetMethodID(JavaEnv, JavaRendererClass, "setScreenKeyboardHintMessage", "(Ljava/lang/String;)V");
|
||||
|
||||
@@ -241,6 +241,9 @@ void SDL_android_init_keymap(SDLKey *SDL_android_keymap)
|
||||
keymap[KEYCODE_BUTTON_14] = SDL_KEY(N);
|
||||
keymap[KEYCODE_BUTTON_15] = SDL_KEY(O);
|
||||
keymap[KEYCODE_BUTTON_16] = SDL_KEY(P);
|
||||
keymap[KEYCODE_MEDIA_TOP_MENU] = SDL_KEY(MENU);
|
||||
keymap[KEYCODE_TV_CONTENTS_MENU] = SDL_KEY(MENU);
|
||||
keymap[KEYCODE_TV_MEDIA_CONTEXT_MENU] = SDL_KEY(MENU);
|
||||
|
||||
keymap[KEYCODE_MOUSE_LEFT] = SDL_KEY(MOUSE_LEFT);
|
||||
keymap[KEYCODE_MOUSE_MIDDLE] = SDL_KEY(MOUSE_MIDDLE);
|
||||
|
||||
@@ -6,58 +6,48 @@
|
||||
android:verticalGap="0px"
|
||||
android:keyHeight="10%p">
|
||||
<Row>
|
||||
<Key android:codes="49" android:keyLabel="1" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="50" android:keyLabel="2"/>
|
||||
<Key android:codes="51" android:keyLabel="3"/>
|
||||
<Key android:codes="52" android:keyLabel="4"/>
|
||||
<Key android:codes="53" android:keyLabel="5"/>
|
||||
<Key android:codes="54" android:keyLabel="6"/>
|
||||
<Key android:codes="55" android:keyLabel="7"/>
|
||||
<Key android:codes="56" android:keyLabel="8"/>
|
||||
<Key android:codes="57" android:keyLabel="9"/>
|
||||
<Key android:codes="48" android:keyLabel="0" android:keyEdgeFlags="right"/>
|
||||
<Key android:codes="45" android:keyLabel="q" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="51" android:keyLabel="w" android:isRepeatable="true"/>
|
||||
<Key android:codes="33" android:keyLabel="e" android:isRepeatable="true"/>
|
||||
<Key android:codes="46" android:keyLabel="r" android:isRepeatable="true"/>
|
||||
<Key android:codes="48" android:keyLabel="t" android:isRepeatable="true"/>
|
||||
<Key android:codes="53" android:keyLabel="y" android:isRepeatable="true"/>
|
||||
<Key android:codes="49" android:keyLabel="u" android:isRepeatable="true"/>
|
||||
<Key android:codes="37" android:keyLabel="i" android:isRepeatable="true"/>
|
||||
<Key android:codes="43" android:keyLabel="o" android:isRepeatable="true"/>
|
||||
<Key android:codes="44" android:keyLabel="p" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="119" android:keyLabel="w"/>
|
||||
<Key android:codes="101" android:keyLabel="e"/>
|
||||
<Key android:codes="114" android:keyLabel="r"/>
|
||||
<Key android:codes="116" android:keyLabel="t"/>
|
||||
<Key android:codes="121" android:keyLabel="y"/>
|
||||
<Key android:codes="117" android:keyLabel="u"/>
|
||||
<Key android:codes="105" android:keyLabel="i"/>
|
||||
<Key android:codes="111" android:keyLabel="o"/>
|
||||
<Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right"/>
|
||||
<Key android:codes="29" android:keyLabel="a" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="47" android:keyLabel="s" android:isRepeatable="true"/>
|
||||
<Key android:codes="32" android:keyLabel="d" android:isRepeatable="true"/>
|
||||
<Key android:codes="34" android:keyLabel="f" android:isRepeatable="true"/>
|
||||
<Key android:codes="35" android:keyLabel="g" android:isRepeatable="true"/>
|
||||
<Key android:codes="36" android:keyLabel="h" android:isRepeatable="true"/>
|
||||
<Key android:codes="38" android:keyLabel="j" android:isRepeatable="true"/>
|
||||
<Key android:codes="39" android:keyLabel="k" android:isRepeatable="true"/>
|
||||
<Key android:codes="40" android:keyLabel="l" android:isRepeatable="true"/>
|
||||
<Key android:codes="74" android:keyLabel=";" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="97" android:keyLabel="a" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="115" android:keyLabel="s"/>
|
||||
<Key android:codes="100" android:keyLabel="d"/>
|
||||
<Key android:codes="102" android:keyLabel="f"/>
|
||||
<Key android:codes="103" android:keyLabel="g"/>
|
||||
<Key android:codes="104" android:keyLabel="h"/>
|
||||
<Key android:codes="106" android:keyLabel="j"/>
|
||||
<Key android:codes="107" android:keyLabel="k"/>
|
||||
<Key android:codes="108" android:keyLabel="l"/>
|
||||
<Key android:codes="35,64" android:keyLabel="\# \@" android:keyEdgeFlags="right"/>
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="-1" android:keyLabel="CAPS" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="122" android:keyLabel="z"/>
|
||||
<Key android:codes="120" android:keyLabel="x"/>
|
||||
<Key android:codes="99" android:keyLabel="c"/>
|
||||
<Key android:codes="118" android:keyLabel="v"/>
|
||||
<Key android:codes="98" android:keyLabel="b"/>
|
||||
<Key android:codes="110" android:keyLabel="n"/>
|
||||
<Key android:codes="109" android:keyLabel="m"/>
|
||||
<Key android:codes="46" android:keyLabel="."/>
|
||||
<Key android:codes="63,33,58" android:keyLabel="\? ! :" android:keyEdgeFlags="right"/>
|
||||
<Key android:codes="-1" android:keyLabel="⇪" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="54" android:keyLabel="z" android:isRepeatable="true"/>
|
||||
<Key android:codes="52" android:keyLabel="x" android:isRepeatable="true"/>
|
||||
<Key android:codes="31" android:keyLabel="c" android:isRepeatable="true"/>
|
||||
<Key android:codes="50" android:keyLabel="v" android:isRepeatable="true"/>
|
||||
<Key android:codes="30" android:keyLabel="b" android:isRepeatable="true"/>
|
||||
<Key android:codes="42" android:keyLabel="n" android:isRepeatable="true"/>
|
||||
<Key android:codes="41" android:keyLabel="m" android:isRepeatable="true"/>
|
||||
<Key android:codes="67" android:keyLabel="←x" android:keyWidth="20%p" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="44" android:keyLabel="," android:keyWidth="10%p" android:keyEdgeFlags="left"/>
|
||||
<Key android:codes="47" android:keyLabel="/" android:keyWidth="10%p"/>
|
||||
<Key android:codes="32" android:keyLabel="SPACE" android:keyWidth="40%p" android:isRepeatable="true"/>
|
||||
<Key android:codes="-5" android:keyLabel="DEL" android:keyWidth="20%p" android:isRepeatable="true"/>
|
||||
<Key android:codes="-4" android:keyLabel="DONE" android:keyWidth="20%p" android:keyEdgeFlags="right"/>
|
||||
<Key android:codes="-6" android:keyLabel="123…" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="71" android:keyLabel="[" android:isRepeatable="true"/>
|
||||
<Key android:codes="72" android:keyLabel="]" android:isRepeatable="true"/>
|
||||
<Key android:codes="76" android:keyLabel="/" android:isRepeatable="true"/>
|
||||
<Key android:codes="62" android:keyLabel="Space" android:keyWidth="20%p" android:isRepeatable="true"/>
|
||||
<Key android:codes="55" android:keyLabel="," android:isRepeatable="true"/>
|
||||
<Key android:codes="56" android:keyLabel="." android:isRepeatable="true"/>
|
||||
<Key android:codes="66" android:keyLabel="Enter" android:keyWidth="20%p" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
</Keyboard>
|
||||
|
||||
57
project/res/xml/qwerty_alt.xml
Normal file
57
project/res/xml/qwerty_alt.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- When creating new keyboard layout, add it to TextInputKeyboardList array in project/java/MainActivity.java -->
|
||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:keyWidth="10%p"
|
||||
android:horizontalGap="0px"
|
||||
android:verticalGap="0px"
|
||||
android:keyHeight="10%p">
|
||||
|
||||
<Row>
|
||||
<Key android:codes="8" android:keyLabel="1" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="9" android:keyLabel="2" android:isRepeatable="true"/>
|
||||
<Key android:codes="10" android:keyLabel="3" android:isRepeatable="true"/>
|
||||
<Key android:codes="11" android:keyLabel="4" android:isRepeatable="true"/>
|
||||
<Key android:codes="12" android:keyLabel="5" android:isRepeatable="true"/>
|
||||
<Key android:codes="13" android:keyLabel="6" android:isRepeatable="true"/>
|
||||
<Key android:codes="14" android:keyLabel="7" android:isRepeatable="true"/>
|
||||
<Key android:codes="15" android:keyLabel="8" android:isRepeatable="true"/>
|
||||
<Key android:codes="16" android:keyLabel="9" android:isRepeatable="true"/>
|
||||
<Key android:codes="7" android:keyLabel="0" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="111" android:keyLabel="Esc" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="68" android:keyLabel="`" android:isRepeatable="true"/>
|
||||
<Key android:codes="69" android:keyLabel="-" android:isRepeatable="true"/>
|
||||
<Key android:codes="70" android:keyLabel="=" android:isRepeatable="true"/>
|
||||
<Key android:codes="73" android:keyLabel="\\" android:isRepeatable="true"/>
|
||||
<Key android:codes="124" android:keyLabel="Ins" android:isRepeatable="true"/>
|
||||
<Key android:codes="92" android:keyLabel="PgUp" android:isRepeatable="true"/>
|
||||
<Key android:codes="122" android:keyLabel="Home" android:isRepeatable="true"/>
|
||||
<Key android:codes="19" android:keyLabel="↑" android:isRepeatable="true"/>
|
||||
<Key android:codes="123" android:keyLabel="End" android:isRepeatable="true" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="-1" android:keyLabel="!@#…" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="75" android:keyLabel="'" android:isRepeatable="true"/>
|
||||
<Key android:codes="100075" android:keyLabel=""" android:isRepeatable="true"/>
|
||||
<Key android:codes="61" android:keyLabel="Tab" android:isRepeatable="true"/>
|
||||
<Key android:codes="115" android:keyLabel="CapsLk" android:isRepeatable="true"/>
|
||||
<Key android:codes="112" android:keyLabel="Del" android:isRepeatable="true"/>
|
||||
<Key android:codes="93" android:keyLabel="PgDn" android:isRepeatable="true"/>
|
||||
<Key android:codes="21" android:keyLabel="←" android:isRepeatable="true"/>
|
||||
<Key android:codes="20" android:keyLabel="↓" android:isRepeatable="true"/>
|
||||
<Key android:codes="22" android:keyLabel="→" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-6" android:keyLabel="abc…" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="59" android:keyLabel="Shift" android:isRepeatable="true"/>
|
||||
<Key android:codes="113" android:keyLabel="Ctrl" android:isRepeatable="true"/>
|
||||
<Key android:codes="117" android:keyLabel="☆" android:isRepeatable="true"/>
|
||||
<Key android:codes="57" android:keyLabel="Alt" android:isRepeatable="true"/>
|
||||
<Key android:codes="58" android:keyLabel="Alt" android:isRepeatable="true"/>
|
||||
<Key android:codes="118" android:keyLabel="☆" android:isRepeatable="true"/>
|
||||
<Key android:codes="226" android:keyLabel="•••" android:isRepeatable="true"/>
|
||||
<Key android:codes="114" android:keyLabel="Ctrl" android:isRepeatable="true"/>
|
||||
<Key android:codes="60" android:keyLabel="Shift" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
</Keyboard>
|
||||
57
project/res/xml/qwerty_alt_shift.xml
Normal file
57
project/res/xml/qwerty_alt_shift.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- When creating new keyboard layout, add it to TextInputKeyboardList array in project/java/MainActivity.java -->
|
||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:keyWidth="10%p"
|
||||
android:horizontalGap="0px"
|
||||
android:verticalGap="0px"
|
||||
android:keyHeight="10%p">
|
||||
|
||||
<Row>
|
||||
<Key android:codes="100008" android:keyLabel="!" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="100009" android:keyLabel="\@" android:isRepeatable="true"/>
|
||||
<Key android:codes="100010" android:keyLabel="#" android:isRepeatable="true"/>
|
||||
<Key android:codes="100011" android:keyLabel="$" android:isRepeatable="true"/>
|
||||
<Key android:codes="100012" android:keyLabel="%" android:isRepeatable="true"/>
|
||||
<Key android:codes="100013" android:keyLabel="^" android:isRepeatable="true"/>
|
||||
<Key android:codes="100014" android:keyLabel="&" android:isRepeatable="true"/>
|
||||
<Key android:codes="100015" android:keyLabel="*" android:isRepeatable="true"/>
|
||||
<Key android:codes="100016" android:keyLabel="(" android:isRepeatable="true"/>
|
||||
<Key android:codes="100007" android:keyLabel=")" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="111" android:keyLabel="Esc" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="100068" android:keyLabel="~" android:isRepeatable="true"/>
|
||||
<Key android:codes="100069" android:keyLabel="_" android:isRepeatable="true"/>
|
||||
<Key android:codes="100070" android:keyLabel="+" android:isRepeatable="true"/>
|
||||
<Key android:codes="100073" android:keyLabel="|" android:isRepeatable="true"/>
|
||||
<Key android:codes="100075" android:keyLabel=""" android:isRepeatable="true"/>
|
||||
<Key android:codes="131" android:keyLabel="F1" android:isRepeatable="true"/>
|
||||
<Key android:codes="132" android:keyLabel="F2" android:isRepeatable="true"/>
|
||||
<Key android:codes="133" android:keyLabel="F3" android:isRepeatable="true"/>
|
||||
<Key android:codes="134" android:keyLabel="F4" android:isRepeatable="true" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="-1" android:keyLabel="123…" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="143" android:keyLabel="NumLk" android:isRepeatable="true"/>
|
||||
<Key android:codes="120" android:keyLabel="Print" android:isRepeatable="true"/>
|
||||
<Key android:codes="116" android:keyLabel="ScrollLk" android:isRepeatable="true"/>
|
||||
<Key android:codes="121" android:keyLabel="Pause" android:isRepeatable="true"/>
|
||||
<Key android:codes="158" android:keyLabel="Kp ." android:isRepeatable="true"/>
|
||||
<Key android:codes="135" android:keyLabel="F5" android:isRepeatable="true"/>
|
||||
<Key android:codes="136" android:keyLabel="F6" android:isRepeatable="true"/>
|
||||
<Key android:codes="137" android:keyLabel="F7" android:isRepeatable="true"/>
|
||||
<Key android:codes="138" android:keyLabel="F8" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-6" android:keyLabel="abc…" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="154" android:keyLabel="Kp /" android:isRepeatable="true"/>
|
||||
<Key android:codes="155" android:keyLabel="Kp *" android:isRepeatable="true"/>
|
||||
<Key android:codes="156" android:keyLabel="Kp -" android:isRepeatable="true"/>
|
||||
<Key android:codes="157" android:keyLabel="Kp +" android:isRepeatable="true"/>
|
||||
<Key android:codes="160" android:keyLabel="Kp ↵" android:isRepeatable="true"/>
|
||||
<Key android:codes="139" android:keyLabel="F9" android:isRepeatable="true"/>
|
||||
<Key android:codes="140" android:keyLabel="F10" android:isRepeatable="true"/>
|
||||
<Key android:codes="141" android:keyLabel="F11" android:isRepeatable="true"/>
|
||||
<Key android:codes="142" android:keyLabel="F12" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
</Keyboard>
|
||||
53
project/res/xml/qwerty_shift.xml
Normal file
53
project/res/xml/qwerty_shift.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- When creating new keyboard layout, add it to TextInputKeyboardList array in project/java/MainActivity.java -->
|
||||
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:keyWidth="10%p"
|
||||
android:horizontalGap="0px"
|
||||
android:verticalGap="0px"
|
||||
android:keyHeight="10%p">
|
||||
<Row>
|
||||
<Key android:codes="45" android:keyLabel="Q" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="51" android:keyLabel="W" android:isRepeatable="true"/>
|
||||
<Key android:codes="33" android:keyLabel="E" android:isRepeatable="true"/>
|
||||
<Key android:codes="46" android:keyLabel="R" android:isRepeatable="true"/>
|
||||
<Key android:codes="48" android:keyLabel="T" android:isRepeatable="true"/>
|
||||
<Key android:codes="53" android:keyLabel="Y" android:isRepeatable="true"/>
|
||||
<Key android:codes="49" android:keyLabel="U" android:isRepeatable="true"/>
|
||||
<Key android:codes="37" android:keyLabel="I" android:isRepeatable="true"/>
|
||||
<Key android:codes="43" android:keyLabel="O" android:isRepeatable="true"/>
|
||||
<Key android:codes="44" android:keyLabel="P" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="29" android:keyLabel="A" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="47" android:keyLabel="S" android:isRepeatable="true"/>
|
||||
<Key android:codes="32" android:keyLabel="D" android:isRepeatable="true"/>
|
||||
<Key android:codes="34" android:keyLabel="F" android:isRepeatable="true"/>
|
||||
<Key android:codes="35" android:keyLabel="G" android:isRepeatable="true"/>
|
||||
<Key android:codes="36" android:keyLabel="H" android:isRepeatable="true"/>
|
||||
<Key android:codes="38" android:keyLabel="J" android:isRepeatable="true"/>
|
||||
<Key android:codes="39" android:keyLabel="K" android:isRepeatable="true"/>
|
||||
<Key android:codes="40" android:keyLabel="L" android:isRepeatable="true"/>
|
||||
<Key android:codes="74" android:keyLabel=":" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="-1" android:keyLabel="⇫" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="54" android:keyLabel="Z" android:isRepeatable="true"/>
|
||||
<Key android:codes="52" android:keyLabel="X" android:isRepeatable="true"/>
|
||||
<Key android:codes="31" android:keyLabel="C" android:isRepeatable="true"/>
|
||||
<Key android:codes="50" android:keyLabel="V" android:isRepeatable="true"/>
|
||||
<Key android:codes="30" android:keyLabel="B" android:isRepeatable="true"/>
|
||||
<Key android:codes="42" android:keyLabel="N" android:isRepeatable="true"/>
|
||||
<Key android:codes="41" android:keyLabel="M" android:isRepeatable="true"/>
|
||||
<Key android:codes="67" android:keyLabel="←x" android:keyWidth="20%p" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-6" android:keyLabel="!@#…" android:keyEdgeFlags="left" android:isRepeatable="true"/>
|
||||
<Key android:codes="71" android:keyLabel="{" android:isRepeatable="true"/>
|
||||
<Key android:codes="72" android:keyLabel="}" android:isRepeatable="true"/>
|
||||
<Key android:codes="76" android:keyLabel="\?" android:isRepeatable="true"/>
|
||||
<Key android:codes="62" android:keyLabel="Space" android:keyWidth="20%p" android:isRepeatable="true"/>
|
||||
<Key android:codes="55" android:keyLabel="<" android:isRepeatable="true"/>
|
||||
<Key android:codes="56" android:keyLabel=">" android:isRepeatable="true"/>
|
||||
<Key android:codes="66" android:keyLabel="Enter" android:keyWidth="20%p" android:keyEdgeFlags="right" android:isRepeatable="true"/>
|
||||
</Row>
|
||||
</Keyboard>
|
||||
Reference in New Issue
Block a user