Compare commits

...

4 Commits

Author SHA1 Message Date
Jules Aguillon
6d3dfd0c5a Add 'playpause' key
Sends the KEYCODE_MEDIA_PLAY_PAUSE keyevent.
2024-09-21 21:53:53 +02:00
Mostafa Khorashadi Zadeh
4d686a8836 Change the place of چ and ژ in Persian Keyboard Layout (#757)
* Change place of "چ" and "ژ"

* rollback unexpected changes
2024-09-21 11:33:59 +02:00
Zitrone
b21bf3fffd Improve bone layout (#748)
* shell.nix: fix gradle error

error was:
> \> Task :compileDebugJavaWithJavac FAILED
> error: Source option 7 is no longer supported. Use 8 or later.
> error: Target option 7 is no longer supported. Use 8 or later.

fixed by overriding the jdk version for gradle to openjdk17

* layouts/latn_bone: fix layout

- fix alignment with tabs mess
- make like actual bone layout, instead of trying to fit it into a 10 key
  wide keyboard
  - fixes missing üäö
  - fix missing $
  - moves q and ß where they belong
  - remove all of the diacritic keys (they can be added through the
    settings as extra keys)
  - kept the number row extra keys integration into top row
  - kept the idea of compressing , and . into the swipe actions of the
    bottom row
  - kept the number keys as key4 in the layer4 positions (instead of
    moving them to a number row, which i also considered)
2024-09-19 23:57:26 +02:00
Spike
7454389f48 doc: Point to code for built-in bottom row and number row for use as starting points (#756) 2024-09-19 23:48:56 +02:00
6 changed files with 77 additions and 41 deletions

View File

@@ -64,7 +64,7 @@ Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {
# latn_bepo_fr
0 warnings
# latn_bone
Layout includes some ASCII punctuation but not all, missing: $
Layout doesn't define some important keys, missing: loc esc, loc tab
Layout redefines the bottom row but some important keys are missing, missing: cursor_left, cursor_right, loc compose, loc end, loc home, loc page_down, loc page_up, loc switch_clipboard, loc switch_greekmath, loc voice_typing, switch_backward
2 warnings
# latn_colemak

View File

@@ -34,11 +34,19 @@ Here is a complete keyboard file with a single row containing an "a" key on the
</keyboard>
## Keyboard metadata
The `<keyboard>`...`</keyboard>` pair follows the declaration tag and encloses the whole keyboard. The following properties may be used (The first two appear in the example above):
* `name`: The name of the keyboard. The name you specify will appear in the Settings menu. If not present, the layout will just appear as “Custom layout”.
* `script`: The (main) writing system that the keyboard supports. The possible values are `arabic`, `armenian`, `bengali`, `cyrillic`, `devanagari`, `gujarati`, `hangul`, `hebrew`, `latin`, `persian`, `shavian`, and `urdu`. It defaults to `latin`.
* `numpad_script`: The script to use for the numpad. This is useful for scripts where a different, non-ASCII set of numerals is used, like Devanagari and Arabic. It defaults to the same as `script`.
* `bottom_row`: Whether or not to show the common bottom row. It accepts `true` or `false`, and defaults to `true`. If your custom layout defines the bottom row, then specify `bottom_row="false"` to disable the built-in bottom row.
* `bottom_row`: Whether or not to show the built-in bottom row. It accepts `true` or `false`, and defaults to `true`. If your custom layout defines the bottom row, then specify `bottom_row="false"` to disable the built-in bottom row.
+ We recommend your layout use the built-in bottom row, because it is still evolving and your layout will incorporate innovations in future versions. However, to define your own, the current definition of the bottom row is in [bottom_row.xml](https://github.com/Julow/Unexpected-Keyboard/res/xml/bottom_row.xml). You can copypaste this XML into your custom layout as a starting point.
+ Likewise, the current definition of the top (number) row is in [number_row.xml](https://github.com/Julow/Unexpected-Keyboard/res/xml/number_row.xml).
* `locale_extra_keys`: Whether Unexpected should add language-dependent extra keys from [method.xml](../res/xml/method.xml) to this layout. It accepts `true` or `false`, and defaults to `true`. To disable these automatic additions, specify `locale_extra_keys="false"`.
## Row

View File

@@ -15,12 +15,13 @@ let
ANDROID_SDK_ROOT = "${android.androidsdk}/libexec/android-sdk";
gradle = pkgs.gradle.override { java = jdk; };
# Without this option, aapt2 fails to run with a permissions error.
gradle_wrapped = pkgs.runCommandLocal "gradle-wrapped" {
nativeBuildInputs = with pkgs; [ makeBinaryWrapper ];
} ''
mkdir -p $out/bin
ln -s ${pkgs.gradle}/bin/gradle $out/bin/gradle
ln -s ${gradle}/bin/gradle $out/bin/gradle
wrapProgram $out/bin/gradle \
--add-flags "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/${build_tools_version}/aapt2"
'';

View File

@@ -502,6 +502,7 @@ public final class KeyValue implements Comparable<KeyValue>
case "f12": return keyeventKey("F12", KeyEvent.KEYCODE_F12, FLAG_SMALLER_FONT);
case "tab": return keyeventKey(0xE00F, KeyEvent.KEYCODE_TAB, FLAG_SMALLER_FONT);
case "menu": return keyeventKey("Menu", KeyEvent.KEYCODE_MENU, FLAG_SMALLER_FONT);
case "playpause": return keyeventKey("Play", KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, FLAG_SMALLER_FONT);
/* Spaces */
case "\\t": return charKey("\\t", '\t', 0); // Send the tab character

View File

@@ -11,7 +11,7 @@
<key key0="ه" key2="۸" key3="*"/>
<key key0="خ" key2="۹" key3="(" key4=")"/>
<key key0="ح" key2="۰"/>
<key key0="ج" key2="چ"/>
<key key0="ج"/>
</row>
<row>
<key key0="ش" key2="loc tab"/>
@@ -29,13 +29,13 @@
<row>
<key shift="0.5" key0="ظ"/>
<key key0="ط"/>
<key key0="ز" key2="«"/>
<key key0="ر" key2="»"/>
<key key0="ژ" key2="."/>
<key key0="ز" key1="«" key2="»"/>
<key key0="ر" key1="ژ" key2="."/>
<key key0="ذ" key2=":"/>
<key key0="د" key2="؛"/>
<key key0="پ" key2="&#1567;"/>
<key key0="و"/>
<key key0="چ"/>
<key width="1.5" key0="backspace" key2="delete"/>
</row>
</keyboard>

View File

@@ -1,46 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://neo-layout.org/Layouts/bone/ -->
<keyboard name="Bone" bottom_row="false" script="latin">
<!-- first row + characters from number row:
jduaxphlmwß
…_[]^!<>=&ſ
°§ℓ»«$€„“”—
›‹¢¥‚‘’
-->
<row>
<key key0="j" key2="loc esc" key4="…"/>
<key key0="d" key2="°" key4="_"/>
<key key0="u" key2="§" key4="["/>
<key key0="a" key4="]"/>
<key key0="x" key4="^"/>
<key key0="p" key3="!" key4="7"/>
<key key0="h" key3="&lt;" key4="8"/>
<key key0="l" key1="" key3="&gt;" key4="9"/>
<key key0="m" key1="≠" key3="="/>
<key key0="w" key3="&amp;"/>
<!--left side-->
<key key0="j" key2="°" key4=""/>
<key key0="d" key2="§" key4="_"/>
<key key0="u" key2="" key4="["/>
<key key0="a" key2="»" key4="]" key1=""/>
<key key0="x" key2="«" key4="^" key1=""/>
<!--middle-->
<key key0="p" key7="¢" key8="!"/>
<!--right side-->
<key key0="h" key1="€" key3="&lt;" key4="7" key2="/>
<key key0="l" key1="„" key3="&gt;" key4="8" key2=""/>
<key key0="m" key1="“" key3="=" key4="9" key2=""/>
<key key0="w" key1="”" key3="&amp;" key2=""/>
<key key0="ß" key1="—" key3="ſ"/>
</row>
<!--second row:
ctieobnrsgq
\/{}*?()-:@
-->
<row>
<key key0="c" key2="loc tab" key4="\\"/>
<key key0="t" key1="accent_circonflexe" key2="accent_caron" key4="/"/>
<key key0="i" key1="accent_aigu" key2="accent_grave" key4="{"/>
<key key0="e" key1="accent_cedille" key2="accent_ogonek" key4="}"/>
<key key0="o" key1="accent_ring" key2="accent_dot_above" key4="*"/>
<key key0="b" key2="accent_macron" key3="\?" key4="4"/>
<key key0="n" key2="accent_tilde" key3="(" key4="5"/>
<key key0="r" key2="accent_trema" key3=")" key4="6"/>
<key key0="s" key2="accent_slash" key3="-"/>
<key key0="g" key1="\@" key3=":"/>
<!--left side-->
<key key0="c" key4="\\"/>
<key key0="t" key4="/"/>
<key key0="i" key4="{"/>
<key key0="e" key4="}"/>
<key key0="o" key4="*"/>
<!--middle-->
<key key0="b" key8="\?"/>
<!--right side-->
<key key0="n" key3="(" key4="4"/>
<key key0="r" key3=")" key4="5"/>
<key key0="s" key3="-" key4="6"/>
<key key0="g" key3=":"/>
<key key0="q" key3="@"/>
</row>
<!--third row -> compressed to also fit shift and backspace:
fvüäöyz,.k
#$|~`+%"';
-->
<row>
<key width="1.5" key0="shift" key4="\#" key2="loc capslock"/>
<key key0="f" key4="|"/>
<key key0="v" key4="~"/>
<key key0="ß" key4="`"/>
<!--left side-->
<key width="1.5" key0="shift" key4="\#"/>
<key key0="f" key4="$"/>
<key key0="v" key4="|"/>
<key key0="ü" key4="~"/>
<key key0="ä" key4="`"/>
<!--right side-->
<key key0="ö" key3="+"/>
<key key0="y" key3="%" key4="1"/>
<key key0="z" key1="&quot;" key3="+" key4="2"/>
<key key0="q" key1="&apos;" key3="," key4="3"/>
<key key0="k" key3="."/>
<key width="1.5" key0="backspace" key1="delete" key3=";"/>
<key key0="z" key3="," key1="&quot;" key4="2"/>
<key key0="k" key3="." key1="&apos;" key4="3"/>
<key width="1.5" key0="backspace" key3=";" key1="delete"/>
</row>
<!--bottom row-->
<row height="0.95">
<key width="1.8" key0="ctrl" key2="loc meta" key4="switch_numeric"/>
<key width="1.2" key0="fn" key1="loc alt" key2="loc change_method" key3="switch_emoji" key4="config"/>
<key width="4.0" key0="space" key7="switch_forward" key8="0"/>
<key width="1.2" key7="up" key6="right" key5="left" key8="down"/>
<key width="5.0" key0="space" key7="switch_forward" key8="0"/>
<key width="1.2" key5="left" key6="right" key7="up" key8="down"/>
<key width="1.8" key0="enter" key3="action"/>
</row>
</keyboard>