diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md index e9196f8c3..13f68e547 100644 --- a/doc/Custom-layouts.md +++ b/doc/Custom-layouts.md @@ -93,7 +93,6 @@ The following optional properties define the effects of swipes: You can define a swipe only once with either compass-point or numeric notation. Unexpected Keyboard automatically puts a small legend in that direction from the center of the key. -* `slider`: If `slider="true"`, and the key also has `w` and `e` properties, then the key tracks horizontal finger motion precisely and sends the `w` and `e` keystrokes repeatedly. In built-in layouts, this makes the space bar send left and right characters as the user slides on the space bar. * `anticircle`: The key value to send when doing an anti-clockwise gesture on the key. ### Layout diff --git a/doc/Possible-key-values.md b/doc/Possible-key-values.md index 556307825..d66e86d94 100644 --- a/doc/Possible-key-values.md +++ b/doc/Possible-key-values.md @@ -66,8 +66,8 @@ Value | Meaning These keys perform editing on the text without sending keys that the app can interpret differently or ignore. Value | Meaning :----------------- | :------ -`cursor_left` | Moves the cursor position to the left directly, without sending a `left` key event. -`cursor_right` | Moves the cursor position to the right directly, without sending a `right` key event. +`cursor_left` | Moves the cursor to the left with the slider gesture. +`cursor_right` | Moves the cursor to the right with the slider gesture. ## Other modifiers and diacritics Value | Meaning diff --git a/res/xml/bottom_row.xml b/res/xml/bottom_row.xml index 600795e8e..35b70aa88 100644 --- a/res/xml/bottom_row.xml +++ b/res/xml/bottom_row.xml @@ -2,7 +2,7 @@ - + diff --git a/res/xml/clipboard_bottom_row.xml b/res/xml/clipboard_bottom_row.xml index 2dfc59615..9a290fdf1 100644 --- a/res/xml/clipboard_bottom_row.xml +++ b/res/xml/clipboard_bottom_row.xml @@ -3,7 +3,7 @@ - + diff --git a/res/xml/emoji_bottom_row.xml b/res/xml/emoji_bottom_row.xml index 8c5172b6b..308e6f95b 100644 --- a/res/xml/emoji_bottom_row.xml +++ b/res/xml/emoji_bottom_row.xml @@ -3,7 +3,7 @@ - + diff --git a/srcs/juloo.keyboard2/KeyboardData.java b/srcs/juloo.keyboard2/KeyboardData.java index aca8ba322..0c54291ea 100644 --- a/srcs/juloo.keyboard2/KeyboardData.java +++ b/srcs/juloo.keyboard2/KeyboardData.java @@ -401,9 +401,6 @@ public static class Key public final float width; /** Extra empty space on the left of the key. */ public final float shift; - /** Keys 2 and 3 are repeated as the finger moves laterally on the key. - Used for the left and right arrow keys on the space bar. */ - public final boolean slider; /** String printed on the keys. It has no other effect. */ public final String indication; @@ -411,14 +408,13 @@ public static class Key public static final int F_LOC = 1; public static final int ALL_FLAGS = F_LOC; - protected Key(KeyValue[] ks, KeyValue antic, int f, float w, float s, boolean sl, String i) + protected Key(KeyValue[] ks, KeyValue antic, int f, float w, float s, String i) { keys = ks; anticircle = antic; keysflags = f; width = Math.max(w, 0f); shift = Math.max(s, 0f); - slider = sl; indication = i; } @@ -487,11 +483,10 @@ public static Key parse(XmlPullParser parser) throws Exception KeyValue anticircle = parse_nonloc_key_attr(parser, "anticircle"); float width = attribute_float(parser, "width", 1f); float shift = attribute_float(parser, "shift", 0.f); - boolean slider = attribute_bool(parser, "slider", false); String indication = parser.getAttributeValue(null, "indication"); while (parser.next() != XmlPullParser.END_TAG) continue; - return new Key(ks, anticircle, keysflags, width, shift, slider, indication); + return new Key(ks, anticircle, keysflags, width, shift, indication); } /** Whether key at [index] as [flag]. */ @@ -503,8 +498,7 @@ public boolean keyHasFlag(int index, int flag) /** New key with the width multiplied by 's'. */ public Key scaleWidth(float s) { - return new Key(keys, anticircle, keysflags, width * s, shift, slider, - indication); + return new Key(keys, anticircle, keysflags, width * s, shift, indication); } public void getKeys(Map dst, int row, int col) @@ -525,12 +519,12 @@ public Key withKeyValue(int i, KeyValue kv) for (int j = 0; j < keys.length; j++) ks[j] = keys[j]; ks[i] = kv; int flags = (keysflags & ~(ALL_FLAGS << i)); - return new Key(ks, anticircle, flags, width, shift, slider, indication); + return new Key(ks, anticircle, flags, width, shift, indication); } public Key withShift(float s) { - return new Key(keys, anticircle, keysflags, width, s, slider, indication); + return new Key(keys, anticircle, keysflags, width, s, indication); } public boolean hasValue(KeyValue kv) @@ -556,7 +550,7 @@ public Key apply(Key k) for (int i = 0; i < ks.length; i++) if (k.keys[i] != null) ks[i] = apply(k.keys[i], k.keyHasFlag(i, Key.F_LOC)); - return new Key(ks, k.anticircle, k.keysflags, k.width, k.shift, k.slider, k.indication); + return new Key(ks, k.anticircle, k.keysflags, k.width, k.shift, k.indication); } } diff --git a/srcs/juloo.keyboard2/Pointers.java b/srcs/juloo.keyboard2/Pointers.java index 9323980bd..da8ba39c6 100644 --- a/srcs/juloo.keyboard2/Pointers.java +++ b/srcs/juloo.keyboard2/Pointers.java @@ -295,7 +295,7 @@ public void onTouchMove(float x, float y, int pointerId) ptr.value = new_value; ptr.flags = pointer_flags_of_kv(new_value); // Start sliding mode - if (ptr.key.slider && new_value.getKind() == KeyValue.Kind.Slider) + if (new_value.getKind() == KeyValue.Kind.Slider) startSliding(ptr, x, (dx < 0 ? -1 : 1), new_value); _handler.onPointerDown(new_value, true); } diff --git a/srcs/layouts/latn_neo2.xml b/srcs/layouts/latn_neo2.xml index 4a7d33af4..b600004f5 100644 --- a/srcs/layouts/latn_neo2.xml +++ b/srcs/layouts/latn_neo2.xml @@ -43,7 +43,7 @@ - +