diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..aeae1d1 --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..89943a9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,235 @@ +# Contributing + +Thanks for contributing :) + +## Building the app + +The application uses Gradle and can be used with Android Studio, but using +Android Studio is not required. The build dependencies are: +- OpenJDK 17 +- Android SDK: build tools (minimum `28.0.1`), platform `30` + +Python 3 is required to update generated files but not to build the app. + +For Android Studio users, no more setup is needed. + +For Nix users, the right environment can be obtained with `nix-shell ./shell.nix`. +Instructions to install Nix are [here](https://wiki.nixos.org/wiki/Nix_Installation_Guide). + +If you don't use Android Studio or Nix, you have to inform Gradle about the +location of your Android SDK by either: +- Setting the `ANDROID_HOME` environment variable to point to the android sdk or +- Creating the file `local.properties` and writing + `sdk.dir=` into it. + +Building the debug apk: + +```sh +./gradlew assembleDebug +``` + +Nix users can call gradle directly: `gradle assembleDebug`. + +If the build succeeds, the debug apk is located in `build/outputs/apk/debug/app-debug.apk`. + +## Debugging on your phone + +First [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb#Enabling). +Then connect your phone to your computer using an USB cable or via wireless +debugging. + +If you use Android Studio, this process will be automatic and you don't have to +follow this guide anymore. + +And finally, install the application with: +```sh +./gradlew installDebug +``` + +The released version of the application won't be removed, both versions will +be installed at the same time. + +## Debugging the application: INSTALL_FAILED_UPDATE_INCOMPATIBLE + +`./gradlew installDebug` can fail with the following error message: + +``` +FAILURE: Build failed with an exception. +* What went wrong: +Execution failed for task ':installDebug'. +> java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Existing package juloo.keyboard2.debug signatures do not match newer version; ignoring! +``` + +The application can't be "updated" because the temporary certificate has been +lost. The solution is to uninstall and install again. +The application must be enabled again in the settings. + +```sh +adb uninstall juloo.keyboard2.debug +./gradlew installDebug +``` + +## Specifying a debug signing certificate on Github Actions + +It's possible to specify the signing certificate that the automated build +should use. +After you successfully run `./gradlew asssembleDebug`, (thus a debug.keystore +exists) you can use this second command to generate a base64 stringified +version of it: + +```sh +gpg -c --armor --pinentry-mode loopback --passphrase debug0 --yes "debug.keystore" +``` + +This will create the file `debug.keystore.asc`, paste its content into a new +Github secret named `DEBUG_KEYSTORE`. + +## Guidelines + +### Adding a layout + +Layouts are defined in XML, see `srcs/layouts/latn_qwerty_us.xml`. +An online tool for editing layout files written by @Lixquid is available +[here](https://unexpected-keyboard-layout-editor.lixquid.com/). + +Makes sure to specify the `name` attribute like in `latn_qwerty_us.xml`, +otherwise the layout won't be added to the app. + +The layout file must be placed in the `srcs/layouts` directory and named +according to: +- script (`latn` for latin, etc..) +- layout name (eg. the name of a standard) +- country code (or language code if more adequate) + +Then, run `./gradlew genLayoutsList` to add the layout to the app. + +The last step will update the file `res/values/layouts.xml`, that you should +not edit directly. + +Run `./gradlew checkKeyboardLayouts` to check some properties about your +layout. This will change the file `check_layout.output`, which you should +commit. + +Layouts are CC0 licensed by default. If you do not want your layout to be +released into the public domain, add a copyright notice at the top of the file +and a mention in `srcs/layouts/LICENSE`. + +#### Adding a programming layout + +A programming layout must contain all ASCII characters. +The current programming layouts are: QWERTY, Dvorak and Colemak. + +See for example, Dvorak, added in https://github.com/Julow/Unexpected-Keyboard/pull/16 + +It's best to leave free spots on the layout for language-specific symbols that +are added automatically when necessary. +These symbols are defined in `res/xml/method.xml` (`extra_keys`). + +It's possible to place extra keys with the `loc` prefix. These keys are +normally hidden unless they are needed. + +Some users cannot easily type the characters close the the edges of the screen +due to a bulky phone case. It is best to avoid placing important characters +there (such as the digits or punctuation). + +#### Adding a localized layout + +Localized layouts (a layout specific to a language) are gladly accepted. +See for example: 4333575 (Bulgarian), 88e2175 (Latvian), 133b6ec (German). + +They don't need to contain every ASCII characters (although it's useful in +passwords) and dead-keys. + +### Adding support for a language + +Supported locales are defined in `res/xml/method.xml`. + +The attributes `languageTag` and `imeSubtypeLocale` define a locale, the +attribute `imeSubtypeExtraValue` defines the default layout and the dead-keys +and other extra keys to show. + +The list of language tags (generally two letters) +and locales (generally of the form `xx_XX`) +can be found in this [stackoverflow answer](https://stackoverflow.com/a/7989085) + +### Updating translations + +The text used in the app is written in `res/values-/strings.xml`. + +The list of language tags can be found in this +[stackoverflow answer](https://stackoverflow.com/a/7989085) + +The first part before the `_` is used, for example, +`res/values-fr/strings.xml` for French, +`res/values-lv/strings.xml` for Latvian. + +Commented-out lines indicate missing translations: + +```xml + +``` + +Remove the `` parts and change the text. + +### Adding a translation + +The preferred method for translating the app is to use Weblate: +https://hosted.weblate.org/engage/unexpected-keyboard/ + +The `res/values-/strings.xml` file must be created by copying the +default translation in `res/values/strings.xml`, which contain the structure of +the file and the English strings. + +Store descriptions in `fastlane/metadata/android/` are updated automatically. +Translating changelogs is not useful. + +The app name might be partially translated, the "Unexpected" word should remain +untranslated if possible. + +As translations need to be updated regularly, you can subscribe to this issue +to receive a notification when an update is needed: +https://github.com/Julow/Unexpected-Keyboard/issues/373 + +### Adding symbols to Shift, Fn, Compose and other modifiers + +New key combinations can be added to builtin modifiers in the following files: + +- Shift in `srcs/compose/shift.json`. +- Fn in `srcs/compose/fn.json`. +- Compose in `srcs/compose/compose/extra.json`. +- Other modifiers are defined in the `accent_*.json` files in `srcs/compose`. + +Generated code must then be updated by running: + +``` +./gradlew compileComposeSequences +``` + +These files describe each symbols that get transformed when a given modifier is +activated, in JSON format. For example: + +Example from `fn.json`, when `Fn` is activated, `<` becomes `«`: +```json +{ + "<": "«", +} +``` + +The result of a sequence can be a key name. See the list of key names in +[doc/Possible-key-values.md](doc/Possible-key-values.md). For example from +`fn.json`, when `Fn` is activated, space becomes `nbsp`: +```json +{ + " ": "nbsp", +} +``` + +Compose sequences are made of several steps. For example, the sequence +`Compose V s = Š` is defined as: +```json +{ + "V": { + "s": "Š" + } +} +``` diff --git a/FUNDING.yml b/FUNDING.yml new file mode 100644 index 0000000..558cae1 --- /dev/null +++ b/FUNDING.yml @@ -0,0 +1,3 @@ +github: [ Julow ] +liberapay: Julow +custom: [ "https://paypal.me/JulesAguillon" ] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index b25a495..497ba54 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,40 @@ -# un-key +# Unexpected Keyboard [État de la traduction](https://hosted.weblate.org/engage/unexpected-keyboard/) -Android Keyboard App \ No newline at end of file +[Get it on F-Droid](https://f-droid.org/packages/juloo.keyboard2/) +[Get it on Google Play](https://play.google.com/store/apps/details?id=juloo.keyboard2) + +Lightweight and privacy-conscious virtual keyboard for Android. + +https://github.com/Julow/Unexpected-Keyboard/assets/2310568/28f8f6fe-ac13-46f3-8c5e-d62443e16d0d + +The main feature is that you can type more characters by swiping the keys towards the corners. + +This application was originally designed for programmers using Termux. +Now perfect for everyday use. + +This application contains no ads, doesn't make any network requests and is Open Source. + +Usage: to apply the symbols located in the corners of each key, slide your finger in the direction of the symbols. For example, the Settings are opened by sliding in the left down corner. + +| Screenshot-1 | Screenshot-2 | Screenshot-3 | +| --- | --- | --- | +| Screenshot-4 | Screenshot-5 | Screenshot-6 | + +## Help translate the application + +Improve the application translations [using Weblate](https://hosted.weblate.org/engage/unexpected-keyboard/). + +[État de la traduction](https://hosted.weblate.org/engage/unexpected-keyboard/) + +## Similar apps + +* [Calculator++](https://git.bubu1.eu/Bubu/android-calculatorpp) - Calculator with a similar UX, swipe to corners for advanced math symbols and operators. + +## Contributing + +For instructions on building the application, see +[Contributing](CONTRIBUTING.md). diff --git a/assets/special_font.ttf b/assets/special_font.ttf new file mode 100644 index 0000000..b124fc5 Binary files /dev/null and b/assets/special_font.ttf differ diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..9cad84c --- /dev/null +++ b/build.gradle @@ -0,0 +1,197 @@ +plugins { + id 'com.android.application' version '8.6.0' +} + +dependencies { + implementation "androidx.window:window-java:1.3.0" + implementation "androidx.core:core:1.16.0" + testImplementation "junit:junit:4.13.2" +} + +android { + namespace 'juloo.keyboard2' + compileSdk 35 + + defaultConfig { + applicationId "juloo.keyboard2" + minSdk 21 + targetSdkVersion 35 + versionCode 50 + versionName "1.32.1" + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['srcs/juloo.keyboard2'] + res.srcDirs = ['res', 'build/generated-resources'] + assets.srcDirs = ['assets'] + } + + test { + java.srcDirs = ['test'] + } + } + + signingConfigs { + // Debug builds will always be signed. If no environment variables are set, a default + // keystore will be initialized by the task initDebugKeystore and used. This keystore + // can be uploaded to GitHub secrets by following instructions in CONTRIBUTING.md + // in order to always receive correctly signed debug APKs from the CI. + debug { + storeFile(System.env.DEBUG_KEYSTORE ? file(System.env.DEBUG_KEYSTORE) : file("debug.keystore")) + storePassword(System.env.DEBUG_KEYSTORE_PASSWORD ? "$System.env.DEBUG_KEYSTORE_PASSWORD" : "debug0") + keyAlias(System.env.DEBUG_KEY_ALIAS ? "$System.env.DEBUG_KEY_ALIAS" : "debug") + keyPassword(System.env.DEBUG_KEY_PASSWORD ? "$System.env.DEBUG_KEY_PASSWORD" : "debug0") + } + + release { + if (System.env.RELEASE_KEYSTORE) { + storeFile file(System.env.RELEASE_KEYSTORE) + storePassword "$System.env.RELEASE_KEYSTORE_PASSWORD" + keyAlias "$System.env.RELEASE_KEY_ALIAS" + keyPassword "$System.env.RELEASE_KEY_PASSWORD" + } + } + } + + buildTypes { + release { + minifyEnabled true + shrinkResources true + debuggable false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') + resValue "string", "app_name", "@string/app_name_release" + signingConfig signingConfigs.release + } + + debug { + minifyEnabled false + shrinkResources false + debuggable true + applicationIdSuffix ".debug" + resValue "string", "app_name", "@string/app_name_debug" + resValue "bool", "debug_logs", "true" + signingConfig signingConfigs.debug + } + } + + // Name outputs after the application ID. + android.applicationVariants.all { variant -> + variant.outputs.all { + outputFileName = "${applicationId}.apk" + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + lintOptions { + // Translation are already checked by 'syncTranslations' + disable 'MissingTranslation' + } +} + +tasks.register('buildKeyboardFont') { + println "\nBuilding assets/special_font.ttf" + mkdir "$buildDir" + exec { + workingDir "$projectDir/srcs/special_font" + def svgFiles = workingDir.listFiles().findAll { + it.isFile() && it.name.endsWith(".svg") + } + commandLine("fontforge", "-lang=ff", "-script", "build.pe", "$buildDir/special_font.ttf", *svgFiles) + } + copy { + from "$buildDir/special_font.ttf" + into "assets" + } +} + +tasks.register('genEmojis') { + println "\nGenerating res/raw/emojis.txt" + exec { + workingDir = projectDir + commandLine "python", "gen_emoji.py" + } +} + +tasks.withType(Test).configureEach { + dependsOn 'genLayoutsList' + dependsOn 'checkKeyboardLayouts' + dependsOn 'syncTranslations' + dependsOn 'compileComposeSequences' +} + +tasks.register('genLayoutsList') { + println "\nGenerating res/values/layouts.xml" + exec { + workingDir = projectDir + commandLine "python", "gen_layouts.py" + } +} + +tasks.register('checkKeyboardLayouts') { + println "\nChecking layouts" + exec { + workingDir = projectDir + commandLine("python", "check_layout.py") + } +} + +tasks.register('syncTranslations') { + println "\nUpdating translations" + exec { + workingDir = projectDir + commandLine "python", "sync_translations.py" + } +} + +tasks.register('compileComposeSequences') { + def out = "srcs/juloo.keyboard2/ComposeKeyData.java" + println "\nGenerating ${out}" + exec { + def sequences = new File(projectDir, "srcs/compose").listFiles().findAll { + !it.name.endsWith(".py") && !it.name.endsWith(".md") + } + workingDir = projectDir + commandLine("python", "srcs/compose/compile.py", *sequences) + standardOutput = new FileOutputStream("${projectDir}/${out}") + } +} + +tasks.named("preBuild") { + dependsOn += "initDebugKeystore" + dependsOn += "copyRawQwertyUS" + dependsOn += "copyLayoutDefinitions" +} + +tasks.register('initDebugKeystore') { + if (!file("debug.keystore").exists()) { + println "Initializing default debug keystore" + exec { + // A shell script might be needed if this line requires input from the user + commandLine "keytool", "-genkeypair", "-dname", "cn=d, ou=e, o=b, c=ug", "-alias", "debug", "-keypass", "debug0", "-keystore", "debug.keystore", "-keyalg", "rsa", "-storepass", "debug0", "-validity", "10000" + } + } +} + +// latn_qwerty_us is used as a raw resource by the custom layout option. +tasks.register('copyRawQwertyUS') +{ + copy { + from "srcs/layouts/latn_qwerty_us.xml" + into "build/generated-resources/raw" + } +} + +tasks.register('copyLayoutDefinitions') +{ + copy { + from "srcs/layouts" + include "*.xml" + into "build/generated-resources/xml" + } +} diff --git a/check_layout.output b/check_layout.output new file mode 100644 index 0000000..84f101e --- /dev/null +++ b/check_layout.output @@ -0,0 +1,25 @@ +arab_alt: Layout includes some ASCII punctuation but not all, missing: !, ", ', +, -, /, :, ;, <, =, >, ?, [, \, ], _, |, ~ +arab_hamvaj_tly: Layout includes some ASCII punctuation but not all, missing: ", %, ', ,, /, ;, <, =, >, ?, [, \, ], _, `, {, |, } +arab_pc: Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, | +arab_pc_ckb: Layout includes some ASCII punctuation but not all, missing: ", %, ', +, ,, ;, <, =, >, ?, `, |, ~ +arab_pc_ckb_fa: Layout includes some ASCII punctuation but not all, missing: ", #, $, %, &, ', ,, /, ;, ?, @, \, ^, `, |, ~ +arab_pc_hindu: Layout includes some ASCII punctuation but not all, missing: !, ', +, ;, ?, \, | +arab_pc_ir: Layout includes some ASCII punctuation but not all, missing: ", %, ', ,, /, ;, <, =, >, ?, [, \, ], `, {, |, } +beng_national: Layout includes some ASCII punctuation but not all, missing: $ +beng_provat: Layout includes some ASCII punctuation but not all, missing: $, &, *, ., /, <, >, [, \, ], `, {, |, } +cyrl_jcuken_as: Layout includes some ASCII punctuation but not all, missing: ', ^, ~ +cyrl_jcuken_as: Layout contains unknown keys: combining_acute +cyrl_lynyertdz_mk: Layout includes some ASCII punctuation but not all, missing: " +cyrl_yaverti: Layout includes some ASCII punctuation but not all, missing: ~ +cyrl_yxukeng_os: Layout includes some ASCII punctuation but not all, missing: ", #, $, &, ', @, [, ], ~ +deva_alt: Layout includes some ASCII punctuation but not all, missing: #, $, %, &, ', (, ), *, +, ., /, :, <, =, >, [, \, ], ^, _, `, {, |, }, ~ +deva_inscript: Layout includes some ASCII punctuation but not all, missing: ", $, ', ^, _, `, | +hebr_1_il: Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {, } +hebr_2_il: Layout includes some ASCII punctuation but not all, missing: (, ), <, >, [, ], {, } +kann_kannada: Layout includes some ASCII punctuation but not all, missing: #, $, %, (, ), *, +, /, <, =, >, [, \, ], ^, `, {, |, }, ~ +latn_colemak: Some keys contain whitespaces, unexpected: ́ +latn_dvorak: Missing important key, missing: loc capslock +latn_neo2: Layout redefines the bottom row but some important keys are missing, missing: loc switch_clipboard +latn_qwertz_cz_multifunctional: Layout includes some ASCII punctuation but not all, missing: ` +latn_qwertz_sk: Layout includes some ASCII punctuation but not all, missing: ` +urdu_phonetic_ur: Layout includes some ASCII punctuation but not all, missing: <, >, ?, `, |, ~ diff --git a/check_layout.py b/check_layout.py new file mode 100644 index 0000000..0208a97 --- /dev/null +++ b/check_layout.py @@ -0,0 +1,139 @@ +import xml.etree.ElementTree as ET +import sys, os, glob, re + +layout_file_name = 0 +warnings = [] + +KNOWN_NOT_LAYOUT = set([ + "number_row", "numpad", "pin", + "bottom_row", "settings", "method", + "greekmath", "numeric", "emoji_bottom_row", + "clipboard_bottom_row" ]) + +KEY_ATTRIBUTES = set([ + "key0", "key1", "key2", "key3", "key4", "key5", "key6", "key7", "key8", + "c", "nw", "ne", "sw", "se", "w", "e", "n", "s" + ]) + +# Keys defined in KeyValue.java +known_keys = set() + +def warn(msg): + global warnings + warnings.append("%s: %s" % (layout_file_name, msg)) + +def key_list_str(keys): + return ", ".join(sorted(list(keys))) + +def missing_some_of(keys, symbols, class_name=None): + if class_name is None: + class_name = "of [" + ", ".join(symbols) + "]" + missing = set(symbols).difference(keys) + if len(missing) > 0 and len(missing) != len(symbols): + warn("Layout includes some %s but not all, missing: %s" % ( + class_name, key_list_str(missing))) + +def missing_required(keys, symbols, msg): + missing = set(symbols).difference(keys) + if len(missing) > 0: + warn("%s, missing: %s" % (msg, key_list_str(missing))) + +def unexpected_keys(keys, symbols, msg): + unexpected = set(symbols).intersection(keys) + if len(unexpected) > 0: + warn("%s, unexpected: %s" % (msg, key_list_str(unexpected))) + +# Write to [keys] and [dup]. +def parse_row_from_et(row, keys, dup): + for key in row: + for attr in key.keys(): + if attr in KEY_ATTRIBUTES: + k = key.get(attr).removeprefix("\\") + if k in keys: dup.add(k) + keys.add(k) + +def parse_layout(fname): + keys = set() + dup = set() + root = ET.parse(fname).getroot() + if root.tag != "keyboard": + return None + for row in root: + parse_row_from_et(row, keys, dup) + return root, keys, dup + +def parse_row(fname): + keys = set() + dup = set() + root = ET.parse(fname).getroot() + if root.tag != "row": + return None + parse_row_from_et(root, keys, dup) + return root, keys, dup + +def check_layout(layout): + root, keys, dup = layout + if len(dup) > 0: warn("Duplicate keys: " + key_list_str(dup)) + missing_some_of(keys, "~!@#$%^&*(){}`[]=\\-_;:/.,?<>'\"+|", "ASCII punctuation") + missing_some_of(keys, "0123456789", "digits") + missing_required(keys, ["backspace", "delete"], "Layout doesn't define some important keys") + unexpected_keys(keys, + ["copy", "paste", "cut", "selectAll", "shareText", + "pasteAsPlainText", "undo", "redo" ], + "Layout contains editing keys") + unexpected_keys(keys, + [ "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", + "f10", "f11", "f12" ], + "Layout contains function keys") + unexpected_keys(keys, [""], "Layout contains empty strings") + unexpected_keys(keys, ["loc"], "Special keyword cannot be a symbol") + unexpected_keys(keys, filter(lambda k: k.strip()!=k, keys), "Some keys contain whitespaces") + unexpected_keys(keys, ["f11_placeholder", "f12_placeholder"], "These keys are now added automatically") + + if root.get("script", "latin") == "latin": + missing_required(keys, ["shift", "loc capslock"], "Missing important key") + missing_required(keys, ["loc esc", "loc tab"], "Missing programming keys") + + _, bottom_row_keys, _ = parse_row("res/xml/bottom_row.xml") + + if root.get("bottom_row") == "false": + missing_required(keys, bottom_row_keys, + "Layout redefines the bottom row but some important keys are missing") + else: + unexpected_keys(keys, bottom_row_keys, + "Layout contains keys present in the bottom row") + + if root.get("script") == None: + warn("Layout doesn't specify a script.") + + keys_without_loc = set(( k.removeprefix("loc ") for k in keys )) + # Keys with a len under 3 are often composed characters + special_keys = set(( k for k in keys_without_loc if len(k) > 3 and ":" not in k )) + unknown = special_keys.difference(known_keys) + if len(unknown) > 0: + warn("Layout contains unknown keys: %s" % key_list_str(unknown)) + +# Fill 'known_keys', which is used for some checks +def parse_known_keys(): + global known_keys + with open("srcs/juloo.keyboard2/KeyValue.java", "r") as f: + known_keys = set( + ( m.group(1) for m in re.finditer('case "([^"]+)":', f.read()) ) + ) + +parse_known_keys() + +for fname in sorted(glob.glob("srcs/layouts/*.xml")): + layout_id, _ = os.path.splitext(os.path.basename(fname)) + if layout_id in KNOWN_NOT_LAYOUT: + continue + layout_file_name = layout_id + layout = parse_layout(fname) + if layout == None: + warn("Not a layout file") + else: + check_layout(layout) + +with open("check_layout.output", "w") as out: + for w in warnings: + print(w, file=out) diff --git a/doc/Custom-layouts.md b/doc/Custom-layouts.md new file mode 100644 index 0000000..1c37b18 --- /dev/null +++ b/doc/Custom-layouts.md @@ -0,0 +1,158 @@ +# Custom layouts +You select a key layout for Unexpected Keyboard by calling up the Settings page (swipe the gear icon) and, at the top of the page, either tapping an existing layout or tapping _Add an alternate layout_. This displays a menu of available layouts. You can define your own layout by choosing _Custom layout_ at the bottom of this menu. Unexpected Keyboard now displays code in the XML format. You make changes by replacing this with different code and tapping OK. + +We recommend you keep your work in a file outside Unexpected Keyboard (named something like `MyChanges.xml`). If you installed a new version of Unexpected from a different website (with a different signature), then the work you did solely by editing the XML inside Unexpected would be lost. + +Put initial contents into your file in one of these ways: +* Copypaste the code Unexpected displays for _Custom layout_. +* Make a copy of one of the built-in layouts found in [`/srcs/layouts`](https://github.com/Julow/Unexpected-Keyboard/tree/master/srcs/layouts). +* Use the [web-based editor](https://unexpected-keyboard-layout-editor.lixquid.com/). Interact with this web page to define keys and swipes and move keys to desired positions, and it will write the XML code for you. You can make the web page put the XML in a text file or copy it to the clipboard. + +When you have prepared suitable XML code in one of these ways, copy it to the clipboard and paste it into Unexpected Keyboard. + +## XML language overview +A layout XML file comprises tags that start with `<` and end with `>`. +* Every layout file starts with this declaration: + `` +* Certain tags come in pairs—an opening tag and a closing tag—and apply to everything between them. + * The ``...`` pair says that the material between them is the definition of your keyboard. There can be only one of these. + * The ``...`` pair encloses the definition of a single row. + * An optional ``...`` pair contains instructions if you want to change the behavior of a modifier key such as Shift. +* Stand-alone tags include ``, which defines a single key. + +A tag can have properties, defined using an equals sign and a pair of ASCII double quotes. For example, `` defines the "a" key. The `c` property of the `key` tag says which key you are defining, and the tag's location inside ``...`` specifies where it will go in the row. + +### Example +Here is a complete keyboard file with a single row containing an "a" key on the left and a "b" key on the right: + + + + + + + + + +## Keyboard metadata + +The ``...`` 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 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). + +* `embedded_number_row`: Whether the layout has an embedded number row, and thus the "Show number row" setting shouldn't add another one. It accepts `true` or `false`, and defaults to `false`. + +* `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 +The ``...`` pair encloses one row on the keyboard. It has the following optional property: +* `height`: The height of the row: a positive floating-point value. + +* `scale`: A positive floating-point value. If present, scale the width of each key so that the total is equal to the specified value, in key width unit. + +A row's default height is 1.0 (one quarter of the keyboard height specified on the Settings menu). The `height` property makes the row taller or shorter than this. For example, if you define a 5-row keyboard but one row has `height="0.7"`, then the keyboard's total height is 4.7 units. If the total is different from 4.0, the keyboard will be taller or shorter than that specified in Settings. + +## Key +The `` tag defines a key on the keyboard. Its position in the sequence of keys inside ``...`` indicates its position in the row from left to right. What the key does is defined by optional properties. + +### Taps +What the key does when tapped is defined by the optional `c` property. For example, `` defines the "a" key. Unexpected Keyboard provides a legend in the middle of the key. + +When the Shift modifier is tapped, the "a" key becomes the "A" key and the legend temporarily changes. The Fn modifier makes a different change. You can override this behavior with a modmap (see below). + +### Swipes +The following optional properties define the effects of swipes: +* `n`, `ne`, `e`, `se`, `s`, `sw`, `w`, `nw`: What the key should do when it is swiped in the direction of that compass point. ("North" means upward and "East" is to the right.) + + + + + + + + + + +
nwnne
wce
swsse
+ +* `key1` through `key8` is an older way to achieve the same effects. The directions are ordered as follows: + + + + + + + + + + +
key1key7key2
key5key0key6
key3key8key4
+ +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. + +* `anticircle`: The key value to send when doing an anti-clockwise gesture on the key. + +### Layout +A key may have the following properties to control the row's layout: +* `width`: The width of the key, a positive floating-point value. It defaults to 1.0 +* `shift`: How much empty space to add to the left of this key, a non-negative floating-point value. It defaults to 0.0 + +Normally, a key's width is 1.0 unit. Unexpected Keyboard occupies the full width of the screen, and the row defining the highest number of units (in widths plus shifts) is as wide as the screen. A row whose width is a smaller number of units has empty space on the right. + +### Extra legend +* `indication`: An optional extra legend to show under the main label. For example, `` displays ABC at the bottom of the 2 key, as on a pinpad or some telephones. If the key also defines a downward swipe with `s` or `key8`, the legends overlap. + +### Possible key values +Built-in strings that assign a special function to a key are described in [this page](Possible-key-values.md). For example, `se="copy"` means a southeasterly swipe produces the Copy key. If a key value does not match any of the built-in strings, it outputs that text _verbatim_. For example, `c="a"` simply outputs the letter a. + +In a layout, a key value can also start with the `loc` prefix. These are place-holders; the tap or swipe does nothing unless enabled through the "Add keys to keyboard" option in the Settings menu, or implicitly enabled by the language the device is set to use. For example, `ne="loc accent_aigu"` says that a northeast swipe produces the acute accent combinatorial key—if enabled. + +## Modmap +The ``...`` pair encloses custom mappings for modifier keys. The modmap is placed inside the ``...`` pair, but outside any row. A layout can have at most one modmap. It can contain any number of mappings. Each mapping has an `a` property and a `b` property and maps the `a` key to the `b` key. Valid values are listed in [Possible key values](Possible-key-values.md). + +The following mappings are supported: + +```xml + +``` +This means that when the Shift modifier is on, the key `before` is changed into `after`. + +```xml + +``` +This means that when the Fn modifier is on, the key `before` is changed into `after`. + +```xml + +``` +This means that when the Ctrl modifier is on, the key `before` is changed into `after`. The `` mapping is special in that the Ctrl modifier is applied to `after` after the mapping. + +The clockwise circle and the round-trip gestures are affected by both `` and `` mappings. The Shift mappings are used first and if that did not modify the key, the Fn mappings are used instead. + +### Examples +① Turkish keyboards use the Latin alphabet, but when "i" is shifted, it should produce "İ". This is achieved with the following mapping: + +```xml + +``` +② Cyrillic layouts have no V key. A layout can define Ctrl-V with the following mapping: + +```xml + +``` +This maps Ctrl+в to Ctrl+V—not to v. + +## Portrait vs. landscape +Unexpected Keyboard remembers *separately* which layout has last been used in portrait and landscape orientation. So you may have one custom layout for portrait orientation, but another custom layout for landscape orientation, and Unexpected Keyboard will switch between them without your intervention. + +## Contributing your layout +The Unexpected Keyboard project enthusiastically accepts user contributions, including custom layouts. (See the guidance for layouts at [CONTRIBUTING.md](https://github.com/Julow/Unexpected-Keyboard/blob/master/CONTRIBUTING.md#Adding-a-layout)). +* Submit a layout that has innovations of possible interest to other users at [Unexpected-Keyboard-layouts](https://github.com/Julow/Unexpected-Keyboard-layouts). +* Propose that your layout be included in the set of built-in layouts by making a Pull Request for an addition to [srcs/layouts](https://github.com/Julow/Unexpected-Keyboard/tree/master/srcs/layouts). Please show that such a layout is standard in your locale or has a substantial number of users. diff --git a/doc/Possible-key-values.md b/doc/Possible-key-values.md new file mode 100644 index 0000000..e59a523 --- /dev/null +++ b/doc/Possible-key-values.md @@ -0,0 +1,188 @@ +# Key values + +A key value defines what a key on the keyboard does when pressed or swiped. + +Key values appear in the following places: + +- In custom layouts, they are the value of: the `c` attribute, the compass-point attributes `nw` ... `se`, and the old-style `key0` ... `key8` attributes. +- Internally, they are used in the definition of the "Add keys to the keyboard" setting. + +Key values can be any of the following: + +- The name of a special key. A complete list of valid special keys follows. + +- An arbitrary sequence of characters not containing `:`. + This results in a key that writes the specified characters. + +- The syntax `legend:key_def`. + `legend` is the visible legend on the keyboard. It cannot contain `:`. + `key_def` can be: + + The name of a special key, as listed below. + + `'string'` An arbitrary string that can contain `:`. `'` can be added to the string as `` \' ``. + + `keyevent:keycode` An Android keycode. They are listed as `KEYCODE_...` in [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent#summary). + + Examples: + + `⏯:keyevent:85` A play/pause key (which has no effect in most apps). + + `my@:'my.email@domain.com'` A key that sends an arbitrary string + +- A macro, `legend:key_def1,key_def2,...`. + This results in a key with legend `legend` that behaves as if the sequence of `key_def` had been pressed in order. + + Examples: + + `CA:ctrl,a,ctrl,c` A key with legend CA that sends the sequence `ctrl+a`, `ctrl+c`. + + `Cd:ctrl,backspace` A key with legend Cd that sends the shortcut `ctrl+backspace`. + +### Escape codes + +When defining a key value, several characters have special effects. If you want a character not to have its usual effect but to be taken literally, you should "escape" it in the usual way for XML: + +To get this character... | ...you can type +:---- | :------ +A literal newline character, which is different from `enter` and `action` in certain apps. | `\n` +A literal tab character, which is different from `tab` in certain apps. | `\t` +`&` | `&` +`<` | `<` +`>` | `>` +`"` | `"` + +The characters `\` (unless followed by n or t), `?`, `#`, and `@` do not need to be escaped when writing custom layouts. When writing a layout to be included in the app (in [srcs/layouts](https://github.com/Julow/Unexpected-Keyboard/tree/master/srcs/layouts)), they are represented by typing `\\`, `\?`, `\#`, and `\@`. + +The characters `,` and `:` can be escaped in a key value, using single quotes. For example, this macro defines a key with legend `http` that sends a string containing `:`: `` For simplicity, `,` and `:` cannot be escaped in the key legend. + +## Modifiers +System modifiers are sent to the app, which can take app-specific action. + +Value | Meaning +:---------- | :------ +`shift` | System modifier. +`ctrl` | System modifier. +`alt` | System modifier. +`meta` | System modifier. Equivalent to the Windows key. + +The other modifiers take effect only within the keyboard. + +Value | Meaning +:---------- | :------ +`fn` | Activates Fn mode, which assigns letters and symbols to special characters. Example: `fn` `!` = `¡` +`compose` | Compose key. Enables composing characters using Linux-like shortcuts. Example: `Compose` `A` `'` types `Á` (A with acute accent). +`capslock` | Activates and locks Shift. + +## App function keys +These keys are sent to apps, which are free to ignore them. The keyboard does not perform editing in response to these keys. + +`esc`, `enter`, +`up`, `right`, +`down`, `left`, +`page_up`, `page_down`, +`home`, `end`, +`backspace`, `delete`, +`insert`, `scroll_lock`, +`f1`-`f12`, +`tab`, `copy`, +`paste`, `cut`, +`selectAll`, `pasteAsPlainText`, +`undo`, `redo` + +## Keyboard editing actions +In contrast, these keys perform editing on the text without sending anything to the app. +Value | Meaning +:-------------------- | :------ +`cursor_left` | Moves the cursor to the left with the slider gesture. +`cursor_right` | Moves the cursor to the right with the slider gesture. +`cursor_up` | Moves the cursor up with the slider gesture. Warning: this might make the cursor leave the text box. +`cursor_down` | Moves the cursor down with the slider gesture. Warning: this might make the cursor leave the text box. +`delete_word` | Delete the word to the left of the cursor. +`forward_delete_word` | Delete the word to the right of the cursor. + +The values with `cursor_` are new in v1.31.0. Previous custom layouts specified the slider with `slider="true"`, which should be removed. + +## Whitespace +Value | Meaning +:------ | :------ +`space` | Space bar. +`nbsp` | Non-breaking space. +`nnbsp` | Narrow non-breaking space. +`zwj` | Zero-width joiner. +`zwnj` | Zero-width non-joiner. + +## Other modifiers and diacritics +Value | Meaning +:------------------- | :------ +`accent_aigu` | Acute accent. `á` +`accent_caron` | Háček. `č` +`accent_cedille` | Cedilla. `ç` +`accent_circonflexe` | Circumflex. `â` +`accent_grave` | Grave accent. `à` +`accent_macron` | Macron. `ā` +`accent_ring` | Ring accent. `å` +`accent_tilde` | Tilde. `ã` +`accent_trema` | Dieresis/umlaut. `ä` +`accent_ogonek` | Ogonek. `ą` +`accent_dot_above` | Dot accent. `ż` If applied to the lowercase `i`, removes the dot instead for Turkish. `ı` +`accent_double_aigu` | Double acute accent. `ő` +`accent_slash` | Slash through. `ø` +`accent_arrow_right` | Right arrow above, used to denote a vector. `a⃗` +`accent_breve` | Breve. `ă` +`accent_bar` | Bar/strikethrough. `ɨ` +`accent_dot_below` | Dot below. `ạ` +`accent_horn` | Horn accent. `ơ` +`accent_hook_above` | Hook accent. `ả` +`accent_double_grave` | Double grave accent. `ȁ` +`superscript` | Superscript. `ᵃ` +`subscript` | Subscript. `ₐ` +`ordinal` | Turns `a` and `o` into `ª` and `º`. +`arrows` | Turns `1`-`4` and `6`-`9` into arrows. +`box` | Turns `1`-`9`, `0`, and `.` into single-line, thin box-drawing characters. + +## Bidirectional +Value | Meaning +:------ | :------ +`lrm` | Left-to-right mark. +`rlm` | Right-to-left mark. +`b(`, `b)`, `b[`, `b]`, `b{`, `b}`, `blt`, `bgt` | Sends the bracket characters, but with mirrored key legends for right-to-left languages. (`blt` and `bgt` print `<` and `>` respectively.) + +## Hebrew +Keys ending in `_placeholder` are normally hidden unless the Fn key is pressed. + +`qamats`, `patah`, +`sheva`, `dagesh`, +`hiriq`, `segol`, +`tsere`, `holam`, +`qubuts`, `hataf_patah`, +`hataf_qamats`, `hataf_segol`, +`shindot`, `shindot_placeholder`, +`sindot`, `sindot_placeholder`, +`geresh`, `gershayim`, +`maqaf`, `rafe`, +`ole`, `ole_placeholder`, +`meteg`, `meteg_placeholder` + +## Keyboard behavior keys +Value | Meaning +:--------------------- | :------ +`config` | Gear icon; opens Unexpected Keyboard settings. +`switch_text` | Switch to the text layer (main layer). +`switch_numeric` | Switch to the numeric layer. +`switch_emoji` | Switch to the emoji layer. +`switch_back_emoji` | Switch to the text layer from the emoji layer. +`switch_forward` | Change the keyboard layout, as long as Unexpected Keyboard has multiple keyboard layouts enabled in the settings. +`switch_backward` | Change the keyboard layout to the previous one in the list. +`switch_greekmath` | Switch to the Greek & Math Symbols layer. +`switch_clipboard` | Switch to the clipboard pane. +`change_method` | Open the input method picker dialog. +`change_method_prev` | Switch to the previously used input method. +`action` | Performs a special context-sensitive operation related to the Enter key. For example, in the Twitter (X) app, `enter` adds a new line, while `action` posts. +`voice_typing` | Begin voice typing. +`voice_typing_chooser` | Shows a menu where you can choose which voice typing provider to use, then begins voice typing when you make a selection. +`shareText` | Emit a share Intent for the selected text. **Oddity:** This is in CamelCase. + +## Unused +These keys are known to do nothing. + +`replaceText`, `textAssist`, +`autofill`, `removed` + +## Placeholders +These keys are normally hidden unless the Fn modifier is activated. + +`f11_placeholder` | `f12_placeholder` diff --git a/fastlane/metadata/android/cs-CZ/full_description.txt b/fastlane/metadata/android/cs-CZ/full_description.txt new file mode 100644 index 0000000..0f83159 --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/full_description.txt @@ -0,0 +1,6 @@ +Hlavní funkcí je možnost psát více znaků posunutím kláves směrem k rohům. + +Tato aplikace byla původně navržena pro programátory používající Termux. +Nyní je ideální pro každodenní použití. + +Tato aplikace neobsahuje žádné reklamy, nevyužívá připojení k síti a je Open Source. diff --git a/fastlane/metadata/android/cs-CZ/short_description.txt b/fastlane/metadata/android/cs-CZ/short_description.txt new file mode 100644 index 0000000..a08cb7f --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/short_description.txt @@ -0,0 +1 @@ +Nenáročná virtuální klávesnice pro vývojáře. diff --git a/fastlane/metadata/android/cs-CZ/title.txt b/fastlane/metadata/android/cs-CZ/title.txt new file mode 100644 index 0000000..41e555e --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/title.txt @@ -0,0 +1 @@ +Klávesnice Unexpected diff --git a/fastlane/metadata/android/de-DE/full_description.txt b/fastlane/metadata/android/de-DE/full_description.txt new file mode 100644 index 0000000..b445acd --- /dev/null +++ b/fastlane/metadata/android/de-DE/full_description.txt @@ -0,0 +1,6 @@ +Diese Tastatur zeichnet sich dadurch aus, dass man zusätzliche Zeichen durch Wischgesten in Richtung der Tastenecken eingeben kann. + +Die Anwendung wurde ursprünglich für das Programmieren in Termux entwickelt. +Mittlerweile ist sie auch für den täglichen Gebrauch perfekt geeignet. + +Diese App enthält keine Werbung, benötigt keinen Netzwerkzugriff und ist quelloffen. diff --git a/fastlane/metadata/android/de-DE/short_description.txt b/fastlane/metadata/android/de-DE/short_description.txt new file mode 100644 index 0000000..8fb5817 --- /dev/null +++ b/fastlane/metadata/android/de-DE/short_description.txt @@ -0,0 +1 @@ +Eine schlanke, datenschutzfreundliche Bildschirmtastatur für Android. diff --git a/fastlane/metadata/android/de-DE/title.txt b/fastlane/metadata/android/de-DE/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/de-DE/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/en-US/changelogs/11.txt b/fastlane/metadata/android/en-US/changelogs/11.txt new file mode 100644 index 0000000..d502a46 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/11.txt @@ -0,0 +1,3 @@ +- Add support for Spanish and Italian +- Improved the placement of some characters (especially accents) and added more (french quotes, dash and em-dash). +- Fixed some bugs (a crash on old versions of Android and a graphical bug due to rotation) diff --git a/fastlane/metadata/android/en-US/changelogs/12.txt b/fastlane/metadata/android/en-US/changelogs/12.txt new file mode 100644 index 0000000..4cd703d --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/12.txt @@ -0,0 +1 @@ +First open-source release! diff --git a/fastlane/metadata/android/en-US/changelogs/13.txt b/fastlane/metadata/android/en-US/changelogs/13.txt new file mode 100644 index 0000000..3517dce --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/13.txt @@ -0,0 +1,3 @@ +- Add support for Swedish +- Fix keyboard shortcuts not working in some applications +- Fix a graphical bug and add some tweaks diff --git a/fastlane/metadata/android/en-US/changelogs/14.txt b/fastlane/metadata/android/en-US/changelogs/14.txt new file mode 100644 index 0000000..39acd32 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/14.txt @@ -0,0 +1,8 @@ +New languages: German + +New keyboard layouts: QWERTZ + +Added themes: White, Dark and OLED Black + +Added the Action key near the Enter key, required for some app. +Improved some options and fixed a few bugs. diff --git a/fastlane/metadata/android/en-US/changelogs/15.txt b/fastlane/metadata/android/en-US/changelogs/15.txt new file mode 100644 index 0000000..39acd32 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/15.txt @@ -0,0 +1,8 @@ +New languages: German + +New keyboard layouts: QWERTZ + +Added themes: White, Dark and OLED Black + +Added the Action key near the Enter key, required for some app. +Improved some options and fixed a few bugs. diff --git a/fastlane/metadata/android/en-US/changelogs/16.txt b/fastlane/metadata/android/en-US/changelogs/16.txt new file mode 100644 index 0000000..5ddd4e3 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/16.txt @@ -0,0 +1,13 @@ +New languages: Latvian (thanks @eandersons), Bulgarian (thanks Zdravko Iskrenov) +New layouts: Bulgarian traditional, Latvian + +The application can now be translated. +Translations: French, Latvian (thanks @eandersons) + +Improve the behavior of the Action key. +The globe key now opens the keyboard switching dialog. +The literal tab character can be typed with Fn+Tab. +Add options to control the spacing between the keys. +Better integration with the system theme. + +Thanks to all the contributors: @Moini, @sdrapha, @eandersons, @Poussinou, Zdravko Iskrenov diff --git a/fastlane/metadata/android/en-US/changelogs/17.txt b/fastlane/metadata/android/en-US/changelogs/17.txt new file mode 100644 index 0000000..257a884 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/17.txt @@ -0,0 +1,13 @@ +New languages: Portuguese (thanks @sdrapha), Russian (thanks @carrot-cookie), Spanish (thanks @gh0ste) +New layouts: Dvorak (thanks @AlexandraAlter), Russian Jcuken, Spanish Qwerty + +Added the Meta key (the equivalent of the Win on Windows) +Added ordinal symbols on the number pane (thanks @sdrapha) +Better position for the arrow keys (thanks @MaxGyver83) +Improvements to some of the symbols (thanks @MaxGyver83, @Roy-Orbison) +Improvements to the layouts +Improvements to the key-repeat for arrows +Fixed Shift+Arrows for selecting text +Fixed dark theme bugs on Xiaomi phones + +Thanks to all the contributors: @sdrapha, @MaxGyver83, @AlexandraAlter, @Roy-Orbison, @carrot-cookie, @gh0ste diff --git a/fastlane/metadata/android/en-US/changelogs/18.txt b/fastlane/metadata/android/en-US/changelogs/18.txt new file mode 100644 index 0000000..78be338 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/18.txt @@ -0,0 +1,5 @@ +Improved text size, especially on large screens +Increased contrasts +Improved symbols (thanks @sdrapha) +German translation (thanks @polyctena) +Fix to some layouts. diff --git a/fastlane/metadata/android/en-US/changelogs/19.txt b/fastlane/metadata/android/en-US/changelogs/19.txt new file mode 100644 index 0000000..ac71f0a --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/19.txt @@ -0,0 +1,21 @@ +Translations: Brazilian portuguese (@igorSilCar), Chinese-Simplified (@9-2-1), Korean (@notnickid) +New layouts: Swedish (@thabubble), Korean (@notnickid) + +Improved computation of the swipe gesture and fix unstoppable key-repeat on +some devices. + +Moved keys away from the edges of the screen and other improvements to the layouts. + +Improved rendering of some symbols. + +Added more characters to the keyboard: +- New combinations to Fn (@ArenaL5) +- Currency symbols +- Added arrow and box symbols (@sdrapha) +- F11 and F12. + +Option for making modifiers lockable. (@sdrapha) +Fixes to the Spanish layout and other fixes. (@ArenaL5) +Many other fixes. + +Huge thanks to the contributors: @igorSilCar, @sdrapha, @ArenaL5, @notnickid, @9-2-1, @thabubble diff --git a/fastlane/metadata/android/en-US/changelogs/20.txt b/fastlane/metadata/android/en-US/changelogs/20.txt new file mode 100644 index 0000000..d4d7b13 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/20.txt @@ -0,0 +1,25 @@ +Quick fix release. + +Previously: + +Translations: Brazilian portuguese (@igorSilCar), Chinese-Simplified (@9-2-1), Korean (@notnickid) +New layouts: Swedish (@thabubble), Korean (@notnickid) + +Improved computation of the swipe gesture and fix unstoppable key-repeat on +some devices. + +Moved keys away from the edges of the screen and other improvements to the layouts. + +Improved rendering of some symbols. + +Added more characters to the keyboard: +- New combinations to Fn (@ArenaL5) +- Currency symbols +- Added arrow and box symbols (@sdrapha) +- F11 and F12. + +Option for making modifiers lockable. (@sdrapha) +Fixes to the Spanish layout and other fixes. (@ArenaL5) +Many other fixes. + +Huge thanks to the contributors: @igorSilCar, @sdrapha, @ArenaL5, @notnickid, @9-2-1, @thabubble diff --git a/fastlane/metadata/android/en-US/changelogs/21.txt b/fastlane/metadata/android/en-US/changelogs/21.txt new file mode 100644 index 0000000..573c019 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/21.txt @@ -0,0 +1,4 @@ +Fix compatibility with Android 6. +Translation improvements. + +Huge thanks to the contributors: @marciozomb13 diff --git a/fastlane/metadata/android/en-US/changelogs/22.txt b/fastlane/metadata/android/en-US/changelogs/22.txt new file mode 100644 index 0000000..d2c119c --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/22.txt @@ -0,0 +1,7 @@ +Support languages: Lithuanian, Hungarian (@tbilles) +New layouts: Neo2 (@matthiakl) + +Translation improvements (@polyctena, @marciozomb13) +Fix modifiers applied twice when typing quickly. Some other fixes. + +Many thanks to the contributors: @matthiakl, @polyctena, @marciozomb13, @dircsem diff --git a/fastlane/metadata/android/en-US/changelogs/23.txt b/fastlane/metadata/android/en-US/changelogs/23.txt new file mode 100644 index 0000000..22ab208 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/23.txt @@ -0,0 +1,9 @@ +New languages: Turkish (@erqan), Dutch (Belgium) (@draxaris1010) +New layouts: Turkish (@erqan), Colemak (@dircsem), Hungarian QWERTY + +Less typos: Select the closest key on swipe (@Rodrigodd) +Removed settings: Vibration, Show every accents +More tweaks to the layouts +Fixes to landscape mode, updated translations and more tweaks. + +Thanks to the contributors: @erqan, @draxaris1010, @dircsem, @Rodrigodd, @meanindra diff --git a/fastlane/metadata/android/en-US/changelogs/24.txt b/fastlane/metadata/android/en-US/changelogs/24.txt new file mode 100644 index 0000000..786376c --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/24.txt @@ -0,0 +1,5 @@ +Add back the vibration option. +Fix localized keys not in predefined positions. +Improvements to layouts. + +Thanks to the contributors: @Thunder-Squirrel diff --git a/fastlane/metadata/android/en-US/changelogs/25.txt b/fastlane/metadata/android/en-US/changelogs/25.txt new file mode 100644 index 0000000..5a7c858 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/25.txt @@ -0,0 +1,12 @@ +New supported languages: Polish, Ukrainian, Bengali, Norwegian +New layouts: Ukrainian, Bengali, Norwegian, Bone, Czech +New translations: Brazilian Portuguese, Italian, Russian, Czech + +Hold modifiers to lock, double tap on shift disabled by default. +Option to add more keys to the keyboard. +Automatic capitalisation at beginning of sentences. +Added e-ink oriented theme. +New pane for greek letters and mathematical symbols. +Improvements to the layouts and various bug fixes. + +Thanks to the contributors: @nanno, @Quantenzitrone, @eandersons, @iamrasel, @ChristianGynnild, @igorSilCar, @CastixGitHub, @94KONG, @ptrm, @Validbit diff --git a/fastlane/metadata/android/en-US/changelogs/26.txt b/fastlane/metadata/android/en-US/changelogs/26.txt new file mode 100644 index 0000000..0af7c47 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/26.txt @@ -0,0 +1,7 @@ +New supported languages: Hindi, Greek + +Disable fullscreen mode. +Improvements to layouts and translations. +Various fixes and improvements. + +Thanks to the contributors: @sdrapha, @lpv11, @Raj9039852537, @polyctena diff --git a/fastlane/metadata/android/en-US/changelogs/27.txt b/fastlane/metadata/android/en-US/changelogs/27.txt new file mode 100644 index 0000000..b05b825 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/27.txt @@ -0,0 +1,11 @@ +New layouts: QWERTZ (Deutsch) + +Add optional numpad for wide screens. +Add pin entry layout for numbers. +Remove option "Lockable modifiers". +Hide Alt and Meta keys by default. +Added more optional keys. +Allow typing password on boot. +Improvements to the layouts and bug fixes. + +Thanks to the contributors: @geroxyz diff --git a/fastlane/metadata/android/en-US/changelogs/28.txt b/fastlane/metadata/android/en-US/changelogs/28.txt new file mode 100644 index 0000000..f6ea04a --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/28.txt @@ -0,0 +1,6 @@ +Updated translations: Latvian + +Fix crash when typing device password +Increase target SDK version to 31 + +Thanks to the contributors: @eandersons diff --git a/fastlane/metadata/android/en-US/changelogs/29.txt b/fastlane/metadata/android/en-US/changelogs/29.txt new file mode 100644 index 0000000..61d5612 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/29.txt @@ -0,0 +1,10 @@ +New layouts: QWERTY (Polski) + +Allow switching quickly between two layouts. +Allow choosing opacity of the keyboard. +Improved themes and rendering. +Updated translations. +Fixed key repeat bug when holding 3 keys. +Tweaked the swipe gesture. Added some options. + +Thanks to the contributors: @9-2-1, @ChasmSolacer diff --git a/fastlane/metadata/android/en-US/changelogs/30.txt b/fastlane/metadata/android/en-US/changelogs/30.txt new file mode 100644 index 0000000..3e561ee --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/30.txt @@ -0,0 +1 @@ +Bug fix release. diff --git a/fastlane/metadata/android/en-US/changelogs/31.txt b/fastlane/metadata/android/en-US/changelogs/31.txt new file mode 100644 index 0000000..2ea5cbb --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/31.txt @@ -0,0 +1,7 @@ +New layouts: QWERTZ (Slovak) + +Bugs fixed. +Updated translations. +Tweaked themes and settings. + +Thanks to the contributors: Jozef Kundlak, @MAKI1LOVE diff --git a/fastlane/metadata/android/en-US/changelogs/32.txt b/fastlane/metadata/android/en-US/changelogs/32.txt new file mode 100644 index 0000000..d887e7e --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/32.txt @@ -0,0 +1,10 @@ +New translations: Vietnamese +New layouts: Hebrew, Vietnamese + +Move the cursor by sliding on the space bar. +New ePaper theme. +Added number row. +Option to switch to the previous keyboard. +Updated translations. + +Thanks to the contributors: @K4zoku, @rVnPower, @RamKromberg, @MAKI1LOVE diff --git a/fastlane/metadata/android/en-US/changelogs/33.txt b/fastlane/metadata/android/en-US/changelogs/33.txt new file mode 100644 index 0000000..2d93153 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/33.txt @@ -0,0 +1,7 @@ +New layouts: Arabic, Devanagari + +Updated translations. +Updated layouts. +Bugs fixed. + +Thanks to the contributors: @ChasmSolacer, @mostafaayesh, @lrvideckis, @eandersons, @mscheidemann, @JackDotJS diff --git a/fastlane/metadata/android/en-US/changelogs/34.txt b/fastlane/metadata/android/en-US/changelogs/34.txt new file mode 100644 index 0000000..4379e1e --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/34.txt @@ -0,0 +1,3 @@ +Bug fixes. + +Thanks to the contributors: @doak diff --git a/fastlane/metadata/android/en-US/changelogs/35.txt b/fastlane/metadata/android/en-US/changelogs/35.txt new file mode 100644 index 0000000..57b5e88 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/35.txt @@ -0,0 +1,9 @@ +New layouts: Persian, Kurdish, Bengali Provat, Romanian, Czech +New languages support: Icelandic +Updated translations: Polish, Latvian, Russian, German, Vietnamese, Farsi, Brazilian, French, Simplified Chinese, Romanian + +Voice typing shortcut (can be disabled in settings). +Improved vibration settings. +Many bug fixes and improvements. + +Thanks to the contributors: @ChasmSolacer, @eandersons, @MAKI1LOVE, @Moini, @polyctena, @rVnPower, @RZHSSNZDH, @vladgba, @marciozomb13, @GoRaN909, @9-2-1, @shmVirus, @GrimPixel, @frimdo diff --git a/fastlane/metadata/android/en-US/changelogs/36.txt b/fastlane/metadata/android/en-US/changelogs/36.txt new file mode 100644 index 0000000..dae5520 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/36.txt @@ -0,0 +1,9 @@ +Allow selecting any number of standard and custom layouts. +Allow adding custom keys to the keyboard. +Changed behavior of auto-added keys (often dead-keys). +New layouts. +Improved layouts and language support. +Improved the space bar slider, and many more. +Updated translations. + +Thanks to the contributors: @ChasmSolacer, @ElucGeek, @GoRaN909, @RZHSSNZDH, @Shareef101, @Validbit, @eandersons, @nitsvga, @polyctena, @sdrapha, @syskill diff --git a/fastlane/metadata/android/en-US/changelogs/37.txt b/fastlane/metadata/android/en-US/changelogs/37.txt new file mode 100644 index 0000000..b9f92cc --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/37.txt @@ -0,0 +1,8 @@ +Improved custom layout option. +Allow selecting voice typing app with a long press. +The numpad can work with other numeral systems. +New and updated layouts. +New themes. +Many small improvements. + +Thanks to the contributors: @pharook, @syskill, @ojas-bhagavath, @lrvideckis, @lyubomirv, @matthiakl, @deftkHD, @V6lhost, @RZHSSNZDH, @RetrogisusDEV, @rafasaurus, @krtsgnr7230, @eandersons, @ChasmSolacer, @Validbit, @polyctena diff --git a/fastlane/metadata/android/en-US/changelogs/38.txt b/fastlane/metadata/android/en-US/changelogs/38.txt new file mode 100644 index 0000000..7dec7e2 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/38.txt @@ -0,0 +1,7 @@ +The custom vibration setting is back. +Allow to hide the keyboard switching key. +Fixed modifier keys in some development apps. +Updated translations. +Bug fixes and general improvements. + +Many thanks to the contributors: @abb128, @marciozomb13, @RetrogisusDEV, @Sestowner, @vedamanavi, @krtsgnr7230 diff --git a/fastlane/metadata/android/en-US/changelogs/39.txt b/fastlane/metadata/android/en-US/changelogs/39.txt new file mode 100644 index 0000000..d215d03 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/39.txt @@ -0,0 +1,6 @@ +New layouts: QWERTY (Slovak), Gujarati phonetic +Add Linux Compose key to type a variety of characters using known combinations. +Fixed localized numpad and number row. +Many improvements and bug fixes. + +Huge thanks to the contributors: @Yogesh-B, @ChasmSolacer, @matthiakl, @Sestowner, @RyanGibb, @BogdanLata, @RetrogisusDEV, @V6lhost, @ErrrorMaxx, @sdrapha, @vedamanavi diff --git a/fastlane/metadata/android/en-US/changelogs/40.txt b/fastlane/metadata/android/en-US/changelogs/40.txt new file mode 100644 index 0000000..2588a3c --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40.txt @@ -0,0 +1,11 @@ +MessagEase and Thumb-Key inspired gestures with the anti-clockwise circle being +completely configurable. + +Updated emojis. +Improved Hangul (Korean) support. +Added Danish support. +Improved spacebar slider. +Updated translations. +Various improvements and fixes to the app and layouts. + +Many thanks to the contributors: @alotbsol555 @bkmgit @Cheesebaron @CloneWith @eandersons @JapanYoshi @Julow @la-ninpre @m15a @marciozomb13 @polyctena @solokot @Spike-from-NH @tmqCypher @Validbit diff --git a/fastlane/metadata/android/en-US/changelogs/41.txt b/fastlane/metadata/android/en-US/changelogs/41.txt new file mode 100644 index 0000000..cd0a1ec --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/41.txt @@ -0,0 +1,8 @@ +Clipboard pane + +New Monet theme +Improvements to custom layouts +Options to disable key repeat and the circle gesture +Options to disable the Tab and Esc keys + +Many thanks to the contributors: @alotbsol555 @ChasmSolacer @eandersons @polyctena @Sestowner @solokot @Spike-from-NH @TadaCZE @V6lhost @Validbit diff --git a/fastlane/metadata/android/en-US/changelogs/42.txt b/fastlane/metadata/android/en-US/changelogs/42.txt new file mode 100644 index 0000000..2000d36 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/42.txt @@ -0,0 +1,6 @@ +Fix crash on Android 6. +Fix scaling issues for layouts with few columns. +Added Serbian layouts. +Layout and compose key tweaks. Improvements to custom layouts. Added Menu key. + +Many thanks to the contributors: @adrian4096 @asivery @bokidori @dingodoppelt @RZHSSNZDH diff --git a/fastlane/metadata/android/en-US/changelogs/43.txt b/fastlane/metadata/android/en-US/changelogs/43.txt new file mode 100644 index 0000000..3e65865 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/43.txt @@ -0,0 +1,14 @@ +New supported languages: Albanian, Belgian, Estonian, Georgian, Hawaiian, +Irish, Kannada, Kazakh, Old Church Slavonic, Serbian, Tajiki, Tamil, Welsh + +Added WORKMAN (US) layout. +Improved layouts for modern Hindi and Sanskrit, Greek, Kurdish, Persian, Czech. + +New compose sequences and added combining diacritic keys. +New and improved themes. +Many bug fixes and improvements. + +Many thanks to the contributors: @anaskaejdar @bokidori @cknight828 @cuhsy +@Danger-Mkh @DocJr90 @IYO-OYI @kalankaboom @Kxeo @marciozomb13 @ms-jagadeeshan +@npnpatidar @ptitgnu @quantenzitrone @Sestowner @solokot @Spike-from-NH +@tenextractor diff --git a/fastlane/metadata/android/en-US/changelogs/44.txt b/fastlane/metadata/android/en-US/changelogs/44.txt new file mode 100644 index 0000000..e13dfb4 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/44.txt @@ -0,0 +1 @@ +Bug fixes diff --git a/fastlane/metadata/android/en-US/changelogs/45.txt b/fastlane/metadata/android/en-US/changelogs/45.txt new file mode 100644 index 0000000..e13dfb4 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/45.txt @@ -0,0 +1 @@ +Bug fixes diff --git a/fastlane/metadata/android/en-US/changelogs/46.txt b/fastlane/metadata/android/en-US/changelogs/46.txt new file mode 100644 index 0000000..e13dfb4 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/46.txt @@ -0,0 +1 @@ +Bug fixes diff --git a/fastlane/metadata/android/en-US/changelogs/47.txt b/fastlane/metadata/android/en-US/changelogs/47.txt new file mode 100644 index 0000000..19b229f --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/47.txt @@ -0,0 +1,8 @@ +Delete a word with a circle gesture on the delete key. +Compose key can be unselected. +Improved space bar slider and added selection mode. +Lock shift with a circle gesture. +Improvements to layouts. +Various bug fixes and improvements to themes. + +Huge thanks to the contributors: @0skar2 @chuckwagoncomputing @dzaima @eandersons Lokesh Kumar @lrvideckis @ms-jagadeeshan @quantenzitrone @Sestowner @solokot @Spike-from-NH @srikanban @tenextractor diff --git a/fastlane/metadata/android/en-US/changelogs/48.txt b/fastlane/metadata/android/en-US/changelogs/48.txt new file mode 100644 index 0000000..1bf730f --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/48.txt @@ -0,0 +1,9 @@ +Bug fixes + +Delete a word with a circle gesture on the delete key. +Compose key can be unselected. +Improved space bar slider and added selection mode. +Lock shift with a circle gesture. +Various bug fixes and improvements to themes and layouts. + +Many thanks to the contributors: @HaleyHalcyon @Jaoheah @Spike-from-NH diff --git a/fastlane/metadata/android/en-US/changelogs/49.txt b/fastlane/metadata/android/en-US/changelogs/49.txt new file mode 100644 index 0000000..11ac5b6 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/49.txt @@ -0,0 +1,6 @@ +Better support for foldable devices +Added layouts +Improved selection mode +Bug fixes and many other improvements + +Huge thanks to the contributors: @alotbsol555, @bergentroll, @dacc9, @HaleyHalcyon, @Jaoheah, @jorexdeveloper, @malbajun, @matejdro, @Spike-from-NH, @tenextractor diff --git a/fastlane/metadata/android/en-US/changelogs/50.txt b/fastlane/metadata/android/en-US/changelogs/50.txt new file mode 100644 index 0000000..e13dfb4 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/50.txt @@ -0,0 +1 @@ +Bug fixes diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt new file mode 100644 index 0000000..e7ae33a --- /dev/null +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -0,0 +1,6 @@ +The main feature is that you can type more characters by swiping the keys towards the corners. + +This application was originally designed for programmers using Termux. +Now perfect for everyday use. + +This application contains no ads, doesn't make any network requests and is Open Source. diff --git a/fastlane/metadata/android/en-US/images/featureGraphic.png b/fastlane/metadata/android/en-US/images/featureGraphic.png new file mode 100644 index 0000000..cee1006 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/featureGraphic.png differ diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png new file mode 100644 index 0000000..d1818a8 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/icon.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png new file mode 100644 index 0000000..b0a1b81 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png new file mode 100644 index 0000000..c093db6 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png new file mode 100644 index 0000000..81d8177 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png new file mode 100644 index 0000000..1ea9bb2 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png new file mode 100644 index 0000000..02e4100 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png new file mode 100644 index 0000000..c5e3d44 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png differ diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt new file mode 100644 index 0000000..fb43091 --- /dev/null +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -0,0 +1 @@ +Lightweight and privacy-conscious virtual keyboard for Android. diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/en-US/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/en-US/video.txt b/fastlane/metadata/android/en-US/video.txt new file mode 100644 index 0000000..5462335 --- /dev/null +++ b/fastlane/metadata/android/en-US/video.txt @@ -0,0 +1 @@ +https://www.youtube.com/watch?v=rwGvWesPFX8 diff --git a/fastlane/metadata/android/es-ES/full_description.txt b/fastlane/metadata/android/es-ES/full_description.txt new file mode 100644 index 0000000..15c41f1 --- /dev/null +++ b/fastlane/metadata/android/es-ES/full_description.txt @@ -0,0 +1,6 @@ +La característica principal es que hay acceso a más caractéres deslizando hacia las esquinas de las teclas. + +Esta aplicación fue originalmente diseñada para programadores que usaran Termux. +Ahora es perfecta para uso cotidiano. + +La misma no contiene ningún anuncio/publicidad, no realiza peticiones de red y es de Fuente Abierta. diff --git a/fastlane/metadata/android/es-ES/short_description.txt b/fastlane/metadata/android/es-ES/short_description.txt new file mode 100644 index 0000000..e9765d3 --- /dev/null +++ b/fastlane/metadata/android/es-ES/short_description.txt @@ -0,0 +1 @@ +Un teclado virtual ligero para Android consciente de su privacidad. diff --git a/fastlane/metadata/android/es-ES/title.txt b/fastlane/metadata/android/es-ES/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/es-ES/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/fil/full_description.txt b/fastlane/metadata/android/fil/full_description.txt new file mode 100644 index 0000000..cb143cf --- /dev/null +++ b/fastlane/metadata/android/fil/full_description.txt @@ -0,0 +1,6 @@ +Ang pangunahing feature ay maaari kang mag-type ng mas marami pang karakter sa pag-swipe sa gilid ng mga key. + +Noong simula, ginawa itong application para sa mga programmer sa na nagte-Termux. +Ngayo'y perpekto na sa pang-araw-araw. + +Walang ads, hindi nagne-network request at Open Source ang application na ito. diff --git a/fastlane/metadata/android/fil/short_description.txt b/fastlane/metadata/android/fil/short_description.txt new file mode 100644 index 0000000..b70d78a --- /dev/null +++ b/fastlane/metadata/android/fil/short_description.txt @@ -0,0 +1 @@ +Magaan at privacy-conscious na virtual keyboard sa Android. diff --git a/fastlane/metadata/android/fil/title.txt b/fastlane/metadata/android/fil/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/fil/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/fr-FR/full_description.txt b/fastlane/metadata/android/fr-FR/full_description.txt new file mode 100644 index 0000000..1d633e0 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/full_description.txt @@ -0,0 +1,6 @@ +La fonctionnalité principale est l'accès rapide à plus de caractères en balayant les touches vers les coins. + +Cette application a été conçue à l'origine pour les programmeurs utilisant Termux. +Elle est maintenant parfaite pour une utilisation quotidienne. + +Cette application ne contient pas de publicité, n'accède pas au réseau et est Open Source. diff --git a/fastlane/metadata/android/fr-FR/short_description.txt b/fastlane/metadata/android/fr-FR/short_description.txt new file mode 100644 index 0000000..e1db4ce --- /dev/null +++ b/fastlane/metadata/android/fr-FR/short_description.txt @@ -0,0 +1 @@ +Clavier virtuel léger et respectueux de la vie privée pour Android. diff --git a/fastlane/metadata/android/fr-FR/title.txt b/fastlane/metadata/android/fr-FR/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/fr-FR/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/id/full_description.txt b/fastlane/metadata/android/id/full_description.txt new file mode 100644 index 0000000..76d626c --- /dev/null +++ b/fastlane/metadata/android/id/full_description.txt @@ -0,0 +1,6 @@ +Fitur utamanya adalah Anda dapat mengetik lebih banyak karakter dengan menggeser tombol ke arah sudut. + +Aplikasi ini awalnya dirancang untuk programmer yang menggunakan Termux. +Sekarang sempurna untuk penggunaan sehari-hari. + +Aplikasi ini tidak berisi iklan, tidak membuat permintaan jaringan dan Open Source. diff --git a/fastlane/metadata/android/id/short_description.txt b/fastlane/metadata/android/id/short_description.txt new file mode 100644 index 0000000..a7cd36c --- /dev/null +++ b/fastlane/metadata/android/id/short_description.txt @@ -0,0 +1 @@ +Keyboard virtual yang ringan dan sadar privasi untuk Android. diff --git a/fastlane/metadata/android/id/title.txt b/fastlane/metadata/android/id/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/id/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/it-IT/full_description.txt b/fastlane/metadata/android/it-IT/full_description.txt new file mode 100644 index 0000000..544f3e1 --- /dev/null +++ b/fastlane/metadata/android/it-IT/full_description.txt @@ -0,0 +1,6 @@ +La principale funzionalita` e' che si possono digitare caratteri aggiuntivi scorrendo sui tasti verso gli angoli. +. +Questa app e' stata inizialmente progettata per i programmatori che usavano Termux. +Oggi e' perfetta per l'utilizzo quotidiano, +. +Questa app non contiene pubblicita`, non genera chiamate di rete ed e' Open Source. diff --git a/fastlane/metadata/android/it-IT/short_description.txt b/fastlane/metadata/android/it-IT/short_description.txt new file mode 100644 index 0000000..4b01bea --- /dev/null +++ b/fastlane/metadata/android/it-IT/short_description.txt @@ -0,0 +1 @@ +Una Tastiera Virtuale Leggera Per La Programmazione diff --git a/fastlane/metadata/android/it-IT/title.txt b/fastlane/metadata/android/it-IT/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/it-IT/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/ja-JP/full_description.txt b/fastlane/metadata/android/ja-JP/full_description.txt new file mode 100644 index 0000000..23ad747 --- /dev/null +++ b/fastlane/metadata/android/ja-JP/full_description.txt @@ -0,0 +1,7 @@ +このキーボードは、キーの角をスワイプすることで様々なキーを入力できます。 + +このアプリは元々はTermuxでのプログラミング用に設計されました。 +しかし、今では普段の入力にも適しています。 +PCキーボードでの半角入力を再現しています。日本語入力、変換は出来ません。 + +このアプリは広告を含まず、インターネットに接続せず、そしてオープンソースです。 diff --git a/fastlane/metadata/android/ja-JP/short_description.txt b/fastlane/metadata/android/ja-JP/short_description.txt new file mode 100644 index 0000000..ec83506 --- /dev/null +++ b/fastlane/metadata/android/ja-JP/short_description.txt @@ -0,0 +1 @@ +軽量でプライバシーに配慮したAndroid用仮想キーボード diff --git a/fastlane/metadata/android/ja-JP/title.txt b/fastlane/metadata/android/ja-JP/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/ja-JP/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/ko-KR/full_description.txt b/fastlane/metadata/android/ko-KR/full_description.txt new file mode 100644 index 0000000..6e3adca --- /dev/null +++ b/fastlane/metadata/android/ko-KR/full_description.txt @@ -0,0 +1,6 @@ +주요 기능은 모서리 방향으로 키를 스와이프하여 더 많은 문자를 입력할 수 있다는 것입니다. + +이 앱은 처음에는 Termux를 사용하는 프로그래머들을 위한 것으로 개발되었습니다. +지금은 일상적인 용도로도 완벽합니다. + +이 응용 프로그램에는 광고가 없으며 네트워크 요청을 하지 않고 오픈 소스입니다. diff --git a/fastlane/metadata/android/ko-KR/short_description.txt b/fastlane/metadata/android/ko-KR/short_description.txt new file mode 100644 index 0000000..63a2ebc --- /dev/null +++ b/fastlane/metadata/android/ko-KR/short_description.txt @@ -0,0 +1 @@ +개발자들을 위한 가벼운 가상 키보드. diff --git a/fastlane/metadata/android/ko-KR/title.txt b/fastlane/metadata/android/ko-KR/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/ko-KR/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/lv/full_description.txt b/fastlane/metadata/android/lv/full_description.txt new file mode 100644 index 0000000..98e1dee --- /dev/null +++ b/fastlane/metadata/android/lv/full_description.txt @@ -0,0 +1,6 @@ +Galvenā tastatūras iespēja ir viegli ievadīt vairāk rakstzīmju ar pavilkšanu uz taustiņu stūriem. + +Sākotnēji šī lietotne tika izstrādāta programmētājiem, kas izmanto Termux. +Tagad tā lieliski piemērota ikdienas lietošanai. + +Lietotne nesatur reklāmas, neveic nekādus tīkla pieprasījumus, un tās pirmkods ir pieejams visiem. diff --git a/fastlane/metadata/android/lv/short_description.txt b/fastlane/metadata/android/lv/short_description.txt new file mode 100644 index 0000000..77960bf --- /dev/null +++ b/fastlane/metadata/android/lv/short_description.txt @@ -0,0 +1 @@ +Mazizmēra virtuālā Android tastatūra, kurai rūp privātums. diff --git a/fastlane/metadata/android/lv/title.txt b/fastlane/metadata/android/lv/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/lv/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/nl-NL/full_description.txt b/fastlane/metadata/android/nl-NL/full_description.txt new file mode 100644 index 0000000..ec086bc --- /dev/null +++ b/fastlane/metadata/android/nl-NL/full_description.txt @@ -0,0 +1,6 @@ +De belangrijkste functie is dat je meer tekens kunt typen door de toetsen naar de hoeken te vegen. + +Deze applicatie is oorspronkelijk ontworpen voor programmeurs die Termux gebruiken. +Nu perfect voor dagelijks gebruik. + +Deze applicatie bevat geen advertenties, doet geen netwerkverzoeken en is Open Source. diff --git a/fastlane/metadata/android/nl-NL/short_description.txt b/fastlane/metadata/android/nl-NL/short_description.txt new file mode 100644 index 0000000..4fff3de --- /dev/null +++ b/fastlane/metadata/android/nl-NL/short_description.txt @@ -0,0 +1 @@ +Lichtgewicht en privacy-bewust virtueel toetsenbord voor Android. diff --git a/fastlane/metadata/android/nl-NL/title.txt b/fastlane/metadata/android/nl-NL/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/nl-NL/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/pl-PL/full_description.txt b/fastlane/metadata/android/pl-PL/full_description.txt new file mode 100644 index 0000000..9151127 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/full_description.txt @@ -0,0 +1,6 @@ +Główną cechą tej klawiatury jest możliwość wprowadzania więcej znaków poprzez przesuwanie po klawiszach do ich rogów. + +Ta aplikacja została pierwotnie zaprojektowana z myślą o programistach używających Termuxa. +Obecnie nadaje się doskonale do codziennego użytku. + +Aplikacja nie zawiera reklam, nie żąda dostępu do internetu, a jej kod źródłowy jest dostępny publicznie. diff --git a/fastlane/metadata/android/pl-PL/short_description.txt b/fastlane/metadata/android/pl-PL/short_description.txt new file mode 100644 index 0000000..9622eff --- /dev/null +++ b/fastlane/metadata/android/pl-PL/short_description.txt @@ -0,0 +1 @@ +Lekka i dbająca o prywatność klawiatura wirtualna dla Androida. diff --git a/fastlane/metadata/android/pl-PL/title.txt b/fastlane/metadata/android/pl-PL/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/pl-PL/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/pt-BR/full_description.txt b/fastlane/metadata/android/pt-BR/full_description.txt new file mode 100644 index 0000000..2fe0b2d --- /dev/null +++ b/fastlane/metadata/android/pt-BR/full_description.txt @@ -0,0 +1,6 @@ +A principal característica é que você pode digitar mais caracteres deslizando as teclas para os cantos. + +O app foi criado originalmente para desenvolvedores que usam Termux. +Agora aperfeiçoado para o uso diário. + +Este aplicativo não contém anúncios, não faz nenhuma solicitação de rede e é Open Source. diff --git a/fastlane/metadata/android/pt-BR/short_description.txt b/fastlane/metadata/android/pt-BR/short_description.txt new file mode 100644 index 0000000..d7eba67 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/short_description.txt @@ -0,0 +1 @@ +Um teclado virtual leve para desenvolvedores. diff --git a/fastlane/metadata/android/pt-BR/title.txt b/fastlane/metadata/android/pt-BR/title.txt new file mode 100644 index 0000000..823279f --- /dev/null +++ b/fastlane/metadata/android/pt-BR/title.txt @@ -0,0 +1 @@ +Teclado Unexpected diff --git a/fastlane/metadata/android/ro/full_description.txt b/fastlane/metadata/android/ro/full_description.txt new file mode 100644 index 0000000..9468568 --- /dev/null +++ b/fastlane/metadata/android/ro/full_description.txt @@ -0,0 +1,6 @@ +Funcționalitatea principală este accesul rapid la o mulțime de caractere ASCII prin glisarea către colțurile tastelor. + +Această aplicație a fost concepută inițial pentru programatori care folosec Termux. +Este perfectă pentru uzul cotidian. + +Această aplicație nu conține publicitate, nu folosește rețeaua deloc și e Open Source. diff --git a/fastlane/metadata/android/ro/short_description.txt b/fastlane/metadata/android/ro/short_description.txt new file mode 100644 index 0000000..bb39045 --- /dev/null +++ b/fastlane/metadata/android/ro/short_description.txt @@ -0,0 +1 @@ +Tastatură virtuală pentru Android, ușoară și respectuoasă cu viața privată. diff --git a/fastlane/metadata/android/ro/title.txt b/fastlane/metadata/android/ro/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/ro/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/ru-RU/full_description.txt b/fastlane/metadata/android/ru-RU/full_description.txt new file mode 100644 index 0000000..a801475 --- /dev/null +++ b/fastlane/metadata/android/ru-RU/full_description.txt @@ -0,0 +1,6 @@ +Главная особенность клавиатуры — это возможность легко напечатать любой ASCII-символ жестами в углы клавиш. + +Приложение изначально было разработано для использования с Termux. +На данный момент оно также удобно в повседневном использовании. + +Приложение не содержит рекламы, не осуществляет никаких запросов в сеть и имеет открытый исходный код. diff --git a/fastlane/metadata/android/ru-RU/short_description.txt b/fastlane/metadata/android/ru-RU/short_description.txt new file mode 100644 index 0000000..3ad65e4 --- /dev/null +++ b/fastlane/metadata/android/ru-RU/short_description.txt @@ -0,0 +1 @@ +Легкая клавиатура для пользователей, заботящихся о конфиденциальности. diff --git a/fastlane/metadata/android/ru-RU/title.txt b/fastlane/metadata/android/ru-RU/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/ru-RU/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/tr-TR/full_description.txt b/fastlane/metadata/android/tr-TR/full_description.txt new file mode 100644 index 0000000..1a5e700 --- /dev/null +++ b/fastlane/metadata/android/tr-TR/full_description.txt @@ -0,0 +1,6 @@ +Bu uygulama özünde tuşların kenarlarından kaydırarak daha fazla karakter yazabilmek amacıyla geliştirildi. + +Bu uygulama aslında Termux kullanıcıları için geliştirildi. +Artık gündelik kullanım için de uygun. + +Bu uygulama açık kaynaklıdır. Reklam içermez ve internete bağlanmaz. diff --git a/fastlane/metadata/android/tr-TR/short_description.txt b/fastlane/metadata/android/tr-TR/short_description.txt new file mode 100644 index 0000000..8d2d530 --- /dev/null +++ b/fastlane/metadata/android/tr-TR/short_description.txt @@ -0,0 +1 @@ +Android için hafif ve güvenlik odaklı bir sanal klavye uygulaması. diff --git a/fastlane/metadata/android/tr-TR/title.txt b/fastlane/metadata/android/tr-TR/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/tr-TR/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/uk/full_description.txt b/fastlane/metadata/android/uk/full_description.txt new file mode 100644 index 0000000..f6e65f3 --- /dev/null +++ b/fastlane/metadata/android/uk/full_description.txt @@ -0,0 +1,6 @@ +Головна особливість полягає в тому, що ви можете вводити більше символів, проводячи клавіші до кутів. + +Ця програма спочатку була розроблена для програмістів, які використовують Termux. +Тепер ідеально підходить для щоденного використання. + +Ця програма не містить реклами, не надсилає жодних мережевих запитів і має відкритий код. diff --git a/fastlane/metadata/android/uk/short_description.txt b/fastlane/metadata/android/uk/short_description.txt new file mode 100644 index 0000000..64c80a2 --- /dev/null +++ b/fastlane/metadata/android/uk/short_description.txt @@ -0,0 +1 @@ +Легка та конфіденційна віртуальна клавіатура для Android. diff --git a/fastlane/metadata/android/uk/title.txt b/fastlane/metadata/android/uk/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/uk/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/vi/full_description.txt b/fastlane/metadata/android/vi/full_description.txt new file mode 100644 index 0000000..0dc66dc --- /dev/null +++ b/fastlane/metadata/android/vi/full_description.txt @@ -0,0 +1,6 @@ +Chức năng chính là dễ dàng gõ nhiều ký tự bằng cách kéo phím về góc của nó. + +Ứng dụng này ban đầu được thiết kế cho các lập trình viên dùng Termux. +Bây giờ đã hoàn hảo cho việc sử dụng hàng ngày. + +Ứng dụng này không chứa quảng cáo, không cần đến mạng, và có mã nguồn mở. diff --git a/fastlane/metadata/android/vi/short_description.txt b/fastlane/metadata/android/vi/short_description.txt new file mode 100644 index 0000000..2eb999c --- /dev/null +++ b/fastlane/metadata/android/vi/short_description.txt @@ -0,0 +1 @@ +Bàn phím ảo gọn nhẹ và tôn trọng quyền riêng tư cho Android. diff --git a/fastlane/metadata/android/vi/title.txt b/fastlane/metadata/android/vi/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/vi/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/fastlane/metadata/android/zh-CN/full_description.txt b/fastlane/metadata/android/zh-CN/full_description.txt new file mode 100644 index 0000000..6749111 --- /dev/null +++ b/fastlane/metadata/android/zh-CN/full_description.txt @@ -0,0 +1,6 @@ +此应用的主要功能是,通过将按键沿四角滑动,您可以输入更多字符。 + +此应用最初是为使用 Termux 的程序员而设计的。 +现在对于日常使用来说也很完美。 + +此应用没有广告,不会发送任何网络请求,而且是开源的。 diff --git a/fastlane/metadata/android/zh-CN/short_description.txt b/fastlane/metadata/android/zh-CN/short_description.txt new file mode 100644 index 0000000..fd943f5 --- /dev/null +++ b/fastlane/metadata/android/zh-CN/short_description.txt @@ -0,0 +1 @@ +适用于 Android 的轻量级、注重隐私的虚拟键盘。 diff --git a/fastlane/metadata/android/zh-CN/title.txt b/fastlane/metadata/android/zh-CN/title.txt new file mode 100644 index 0000000..c18b05b --- /dev/null +++ b/fastlane/metadata/android/zh-CN/title.txt @@ -0,0 +1 @@ +Unexpected Keyboard diff --git a/funding.json b/funding.json new file mode 100644 index 0000000..d433ec1 --- /dev/null +++ b/funding.json @@ -0,0 +1,91 @@ +{ + "version": "v1.0.0", + "entity": { + "type": "individual", + "role": "owner", + "name": "Julow", + "email": "jules@j3s.fr", + "description": "Open source developer and maintainer of Unexpected Keyboard.", + "webpageUrl": { + "url": "https://github.com/Julow" + } + }, + "projects": [ + { + "guid": "unexpected-keyboard", + "name": "Unexpected Keyboard", + "description": "Lightweight and privacy-conscious virtual keyboard for Android.", + "webpageUrl": { + "url": "https://github.com/Julow/Unexpected-Keyboard/" + }, + "repositoryUrl": { + "url": "https://github.com/Julow/Unexpected-Keyboard/" + }, + "licenses": [ + "spdx:GPL-3.0", + "spdx:CC0-1.0" + ], + "tags": [ + "android", + "mobile", + "privacy", + "productivity", + "programming", + "user-experience" + ] + } + ], + "funding": { + "channels": [ + { + "guid": "liberapay", + "type": "other", + "address": "https://liberapay.com/Julow/", + "description": "Recurring donations for funding Unexpected Keyboard." + }, + { + "guid": "github-sponsors", + "type": "other", + "address": "https://github.com/sponsors/Julow", + "description": "Recurring donations for funding Unexpected Keyboard." + }, + { + "guid": "paypal", + "type": "other", + "address": "https://paypal.me/JulesAguillon", + "description": "One-time donations for funding Unexpected-keyboard." + } + ], + "plans": [ + { + "guid": "fund-maintenance", + "status": "active", + "name": "Fund developer time", + "description": "Help the maintainers spend time on Unexpected Keyboard", + "amount": 0, + "currency": "EUR", + "frequency": "monthly", + "channels": [ + "liberapay", + "github-sponsors", + "paypal" + ] + }, + { + "guid": "one-time-contribution", + "status": "active", + "name": "Fund developer time", + "description": "Help the maintainers spend time on Unexpected Keyboard", + "amount": 0, + "currency": "EUR", + "frequency": "one-time", + "channels": [ + "liberapay", + "github-sponsors", + "paypal" + ] + } + ], + "history": [] + } +} diff --git a/gen_emoji.py b/gen_emoji.py new file mode 100644 index 0000000..bb1ef8e --- /dev/null +++ b/gen_emoji.py @@ -0,0 +1,38 @@ +import urllib.request +import os.path + +EMOJIS_PATH = 'res/raw/emojis.txt' +EMOJI_TEST_PATH = 'emoji-test.txt' +EMOJI_TEST_URL = 'https://unicode.org/Public/emoji/latest/emoji-test.txt' + +def rawEmojiFromCodes(codes): + return ''.join([chr(int(c, 16)) for c in codes]) + +def getEmojiTestContents(): + if os.path.exists(EMOJI_TEST_PATH): + print(f'Using existing {EMOJI_TEST_PATH}') + else: + print(f'Downloading {EMOJI_TEST_URL}') + urllib.request.urlretrieve(EMOJI_TEST_URL, EMOJI_TEST_PATH) + return open(EMOJI_TEST_PATH, mode='r', encoding='UTF-8').read() + + +emoji_list = [] +group_indices = [] +for line in getEmojiTestContents().splitlines(): + if line.startswith('# group:'): + if len(group_indices) == 0 or len(emoji_list) > group_indices[-1]: + group_indices.append(len(emoji_list)) + elif not line.startswith('#') and 'fully-qualified' in line: + codes = line.split(';')[0].split() + emoji_list.append(rawEmojiFromCodes(codes)) + +with open(EMOJIS_PATH, 'w', encoding='UTF-8') as emojis: + for e in emoji_list: + emojis.write(f'{e}\n') + emojis.write('\n') + + emojis.write(' '.join([str(g) for g in group_indices])) + emojis.write('\n') + +print(f'Parsed {len(emoji_list)} emojis in {len(group_indices)}') diff --git a/gen_layouts.py b/gen_layouts.py new file mode 100644 index 0000000..6cae361 --- /dev/null +++ b/gen_layouts.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +# Generates the list of layouts in res/values/layouts.xml from the layout files +# in srcs/layouts. Every layouts must have a 'name' attribute to be listed. + +import itertools as it +import sys, os, glob +import xml.etree.ElementTree as XML + +# Layouts first in the list (these are the programming layouts). Other layouts +# are sorted alphabetically. +FIRST_LAYOUTS = [ "latn_qwerty_us", "latn_colemak", "latn_dvorak" ] + +# Read a layout from a file. Returns [None] if [fname] is not a layout. +def read_layout(fname): + root = XML.parse(fname).getroot() + if root.tag != "keyboard": + return None + return { "name": root.get("name") } + +# Yields the id (based on the file name) and the display name for every layouts +def read_layouts(files): + for layout_file in files: + layout_id, _ = os.path.splitext(os.path.basename(layout_file)) + layout = read_layout(layout_file) + if layout == None: + print("Not a layout file: %s" % layout_file) + elif layout["name"] == None: + print("Layout doesn't have a name: %s" % layout_id) + else: + yield (layout_id, layout["name"]) + +# Sort layouts alphabetically, except for layouts in FIRST_LAYOUTS, which are +# placed at the top. +# Returns a list. 'layouts' can be an iterator. +def sort_layouts(layouts): + layouts = dict(layouts) + head = [ (lid, layouts.pop(lid)) for lid in FIRST_LAYOUTS ] + return head + sorted(layouts.items()) + +# Write the XML arrays used in the preferences. +def generate_arrays(out, layouts): + def mk_array(tag, name, strings_items): + elem = XML.Element(tag, name=name) + for s in strings_items: + item = XML.Element("item") + item.text = s + elem.append(item) + return elem + system_item = [ ("system", "@string/pref_layout_e_system") ] + custom_item = [ ("custom", "@string/pref_layout_e_custom") ] + values_items, entries_items = zip(*(system_item + layouts + custom_item)) # unzip + ids_items = map(lambda s: "@xml/%s" % s if s not in ["system", "custom"] else "-1", values_items) + root = XML.Element("resources") + root.append(XML.Comment(text=" DO NOT EDIT. This file is generated, run 'gradle genLayoutsList'. ")) + root.append(mk_array("string-array", "pref_layout_values", values_items)) + root.append(mk_array("string-array", "pref_layout_entries", entries_items)) + root.append(mk_array("integer-array", "layout_ids", ids_items)) + XML.indent(root) + XML.ElementTree(element=root).write(out, encoding="unicode", xml_declaration=True) + +layouts = sort_layouts(read_layouts(glob.glob("srcs/layouts/*.xml"))) +with open("res/values/layouts.xml", "w") as out: + generate_arrays(out, layouts) diff --git a/gen_sinhala_phonetic_layout.py b/gen_sinhala_phonetic_layout.py new file mode 100755 index 0000000..44cc39f --- /dev/null +++ b/gen_sinhala_phonetic_layout.py @@ -0,0 +1,524 @@ +#! /bin/env python3 + +""" +Script to generate a layout based on an existing. + +Tuned to create Sinhala phonetic layout based on qwerty (US), but may be adoped +for other scripts. Look at dicts before the LayoutBuilder code. + +Usage: + python3 gen_sinhala_phonetic_layout [-h|--help] [-v|--verbose] [-o|--output] + +By default with no args will write to corresponding file in `srcs/layouts/`. + +Script uses central symbol (in direction "c") to identify a key, which may not +be appropriate for base (reference) layouts other, than qwerty (US). + +Warning will be printed to stderr if new symbol overrides some symbol of the +reference layout in directions other, than "c". + +Exception will be rised on other +conflicts e. g. when trying to move a symbol into occupied position. + + - Made with latn_qwerty_us.xml from commit `6b1551d` + - Made with Python 3.13 + - Requires Python >= 3.11 +""" + +import argparse +import logging + +from enum import StrEnum +from pathlib import Path +from xml.etree import ElementTree + + +class Placement(StrEnum): + C = 'c' + NW = 'nw' + N = 'n' + NE = 'ne' + E = 'e' + SE = 'se' + S = 's' + SW = 'sw' + W = 'w' + + +# Based on XKB Sinhala (phonetic) +KEYS_MAP: dict[str, tuple[str, str, str, str]] = { + # Row 1 ########################################### + 'q': ('ඍ', 'ඎ', '\u0DD8', '\u0DF2'), + 'w': ('ඇ', 'ඈ', '\u0DD0', '\u0DD1'), + 'e': ('එ', 'ඒ', '\u0DD9', '\u0DDA'), + 'r': ('ර', '', '', ''), # In XKB virama is on layer 2 + 't': ('ත', 'ථ', 'ට', 'ඨ'), + 'y': ('ය', '', '', ''), # In XKB virama is on layer 2 + 'u': ('උ', 'ඌ', '\u0DD4', '\u0DD6'), + 'i': ('ඉ', 'ඊ', '\u0DD2', '\u0DD3'), + 'o': ('ඔ', 'ඕ', '\u0DDC', '\u0DDD'), + 'p': ('ප', 'ඵ', '', ''), + # Row 2 ########################################### + 'a': ('අ', 'ආ', '\u0DCA', '\u0DCF'), + 's': ('ස', 'ශ', 'ෂ', ''), + 'd': ('ද', 'ධ', 'ඩ', 'ඪ'), + 'f': ('ෆ', '\u0D93', '', '\u0DDB'), # In XKB aiyanna placed otherwise + 'g': ('ග', 'ඝ', 'ඟ', ''), + 'h': ('හ', '\u0D83', '\u0DDE', 'ඖ'), + 'j': ('ජ', 'ඣ', 'ඦ', ''), + 'k': ('ක', 'ඛ', 'ඦ', 'ඐ'), + 'l': ('ල', 'ළ', '\u0DDF', '\u0DF3'), + # Row 3 ########################################### + 'z': ('ඤ', 'ඥ', '', ''), # In XKB contains bar, broken bar + 'x': ('ඳ', 'ඬ', '', ''), + 'c': ('ච', 'ඡ', '', ''), + 'v': ('ව', '', '', ''), + 'b': ('බ', 'භ', '', ''), + 'n': ('න', 'ණ', '\u0D82', 'ඞ'), + 'm': ('ම', 'ඹ', '', ''), +} + +# How to place four levels of Key. +# Syntax: LEVEL: PLACEMENT | 'FROM_LEVEL+MODIFIER' +# The last means symbol on level FROM_LEVEL with modifier key MODIFIER gives +# key on level LEVEL +# +LEVELS_MAP = { + 0: Placement.C, + 1: Placement.NE, + 2: '0+shift', + 3: '1+shift', +} + +# Additional modify keys combinations. +# Syntax: +# MODKEY: { A: B } +# +MODMAP_EXTRA: dict[str, dict[str, str]] = { + 'shift': { + # Astrological numbers + '1': '෧', + '2': '෨', + '3': '෩', + '4': '෪', + '5': '෫', + '6': '෬', + '7': '෭', + '8': '෮', + '9': '෯', + '0': '෦', + # Kunddaliya + '.': '෴', + # Extra broken bar intead z key in XKB + '\u007C': '\u00A6', + # Special whitespaces + 'zwj': 'zwnj', + }, + 'fn': { + # Sinhala archaic digits + 'ඍ': '𑇡', # 1 + 'ඇ': '𑇢', # 2 + 'එ': '𑇣', # 3 + 'ර': '𑇤', # 4 + 'ත': '𑇥', # 5 + 'ය': '𑇦', # 6 + 'උ': '𑇧', # 7 + 'ඉ': '𑇨', # 8 + 'ඔ': '𑇩', # 9 + 'ප': '𑇪', # 10 + 'අ': '𑇫', # 20 + 'ස': '𑇬', # 30 + 'ද': '𑇭', # 40 + 'ෆ': '𑇮', # 50 + 'ග': '𑇯', # 60 + 'හ': '𑇰', # 70 + 'ජ': '𑇱', # 80 + 'ක': '𑇲', # 90 + 'ල': '𑇳', # 100 + 'ළ': '𑇴', # 1000 + # Sinhala candrabindu for Sanskrit + 'ණ': '\u0D81', + }, +} + +# Table to move additional characters in reference layout. +# Format is (CENTRAL_CHAR, PLACEMENT): (CENTRAL_CHAR, PLACEMENT). E. g. to move +# char from key with central character "q", direction "se" to key with central +# character "w", direction "sw", add line: +# ('q', Placement.SE): ('w', Placement.SW), +# +# To delete a char, use None as destination placement. E.g.: +# ('q', Placment.SE): ('q', None) +# +# Moving of main char in central placement is not supported. +# +TRANSITIONS_MAP: dict[tuple[str, Placement], tuple[str, Placement | None]] = { + ('q', Placement.SE): ('q', Placement.SW), # loc esc + ('q', Placement.NE): ('q', Placement.SE), # 1 + + ('w', Placement.NE): ('w', Placement.SE), # 2 + + ('e', Placement.SE): ('r', Placement.NW), # loc € + ('e', Placement.NE): ('e', Placement.SE), # 3 + + ('r', Placement.NE): ('r', Placement.SE), # 4 + ('t', Placement.NE): ('t', Placement.SE), # 5 + ('y', Placement.NE): ('y', Placement.SE), # 6 + ('u', Placement.NE): ('u', Placement.SE), # 7 + ('i', Placement.NE): ('i', Placement.SE), # 8 + + ('o', Placement.SE): ('p', Placement.SW), # ) + ('o', Placement.NE): ('o', Placement.SE), # 9 + + ('p', Placement.NE): ('p', Placement.SE), # 0 + + ('a', Placement.NE): ('a', Placement.NW), # ` + ('a', Placement.NW): ('a', Placement.SW), # loc tab + + ('s', Placement.NE): ('s', Placement.NW), # loc § + + ('g', Placement.SW): ('g', Placement.NW), # _ + ('g', Placement.NE): ('g', Placement.SW), # - + + ('h', Placement.SW): ('h', Placement.NW), # + + ('h', Placement.NE): ('h', Placement.SW), # = + + ('l', Placement.NE): ('l', Placement.NW), # | + + ('x', Placement.NE): ('x', Placement.NW), # loc † + ('c', Placement.NE): ('c', Placement.NW), # < + ('b', Placement.NE): ('b', Placement.NW), # ? + ('n', Placement.NE): ('n', Placement.NW), # : + ('m', Placement.NE): ('m', Placement.NW), # " +} + +# Add additional characters to arbitrary places. +# Syntax is CHAR: POSITION, where POSITION is a pari as in TRANSITIONS_MAP. +# +CHARS_EXTRA = { + # In XKB ZWJ is on `/` key, and ZWNJ is on spacebar + 'zwj': ('m', Placement.SE), +} + + +# List of char unicode numbers and inclusive ranges of numbers to encode as XML +# numeric character references. +# Good for combining signs to not mess with quotes. +# Characters in line of the keyboard tag will not be escaped. +# +ESCAPE_LIST: list[int | tuple[int, int]] = [ + # Sinhalese diacritics + (0xD81, 0xD83), + (0xDCA, 0xDDF), +] + +# Default filename. Output path can be overrided with `-o` flag also. +LAYOUT_FILENAME = 'sinhala_phonetic.xml' + +# Will be placed after XML declaration. Need to have proper tags. +COMMENT = ''' + +''' + +BASE_DIR = Path(__file__).parent +REFERENCE_LAYOUT_FILE = BASE_DIR / 'srcs/layouts/latn_qwerty_us.xml' + +LOGGER = logging.getLogger(__name__) +KeysMapType = list[list[ElementTree.Element]] + + +class LayoutGenError(RuntimeError): + ... + + +def xml_elem_to_str(element: ElementTree.Element) -> str: + return ElementTree.tostring( + element, + xml_declaration=False, + encoding='unicode').strip() + + +def keys_map_to_str(keys_map: KeysMapType) -> str: + """ Make laout rows map printable for debug purposes """ + result = '[\n' + for row in keys_map: + result += ' ' * 4 + for key in row: + result += str(key.attrib) + ', ' + result += '\n' + result += ']' + return result + + +def is_in_escape_list(char: str | int) -> bool: + if isinstance(char, str): + char = ord(char) + for item in ESCAPE_LIST: + if isinstance(item, tuple) and char >= item[0] and char <= item[1]: + return True + elif isinstance(item, int): + if char == item: + return True + else: + TypeError(f'Unexpected item {item} of ESCAPE_LIST') + return False + + +def xml_encode_char(ch: str | int) -> str: + if isinstance(ch, str): + ch = ord(ch) + hex_val = hex(ch).split('x')[-1] + return f'&#x{hex_val.upper().zfill(4)};' + + +class LayoutBuilder: + XML_DECLARATION = "" + + def __init__( + self, + name: str = '', + script: str = '', + numpad_script: str = '', + comment: str = '', + ) -> None: + """ + :param comment: MUST be a valid XML comment wrapped in + """ + attrs = {} + if name: + attrs['name'] = name + if script: + attrs['script'] = script + if numpad_script: + attrs['numpad_script'] = numpad_script + self._comment = None + if comment: + self._comment = comment.strip() or None + self._xml_keyboard = ElementTree.Element('keyboard', attrib=attrs) + self._modmap = ElementTree.Element('modmap') + + @staticmethod + def _parse_reference_layout() -> list[ElementTree.Element]: + return ElementTree.parse(REFERENCE_LAYOUT_FILE).findall('row') + + @staticmethod + def _move_untransited_to_new_map( + ref_map: KeysMapType, + new_map: KeysMapType + ) -> None: + coordinates = [ + (row_num, key_num) + for row_num in range(len(ref_map)) + for key_num in range(len(ref_map[row_num])) + ] + + for row_num, key_num in coordinates: + old_key = ref_map[row_num][key_num] + new_key = new_map[row_num][key_num] + for k, val in old_key.attrib.items(): + if (transited := new_key.attrib.get(k)) is not None: + msg = ( + f'Transition of {transited} to' + f' {new_key.get(Placement.C)}:{k} conflictls with' + f' existing value "{val}"') + raise LayoutGenError(msg) + new_key.set(k, val) + + @staticmethod + def _add_extra_chars_to_ref_map( + coord_map: dict[str, tuple[int, int]], + new_map: KeysMapType + ) -> None: + for char, (to_key_name, to_plc) in CHARS_EXTRA.items(): + if not (to_coord := coord_map.get(to_key_name)): + msg = f'Trying to add "{char}" to missing key "{to_key_name}"' + raise LayoutGenError(msg) + row_num, key_num = to_coord + key = new_map[row_num][key_num] + if (existing := key.get(to_plc)) is not None: + msg = f'Trying to add char to <{to_key_name}:{to_plc}>, but already contains "{existing}"' + raise LayoutGenError(msg) + key.set(to_plc, char) + LOGGER.info( + 'Added "%s" to <%s:%s>', + char, to_key_name, to_plc) + + @classmethod + def _apply_transitions(cls, ref_map: list) -> list: + coord_map: dict[str, tuple[int, int]] = {} + + coordinates = [ + (row_num, key_num) + for row_num in range(len(ref_map)) + for key_num in range(len(ref_map[row_num])) + ] + + for row_num, key_num in coordinates: + row = ref_map[row_num] + key = row[key_num] + key_name = key.get(Placement.C) + if key_name in coord_map: + msg = f'Duplicated value "{key_name}" in central position' + raise LayoutGenError(msg) + coord_map[key_name] = (row_num, key_num) + + # Make new map with empty keys + result_map = [[ElementTree.Element('key') for key in row] for row in ref_map] + + # Place by transitions map on new places + for (from_key_name, from_plc), (to_key_name, to_plc) in TRANSITIONS_MAP.items(): + if Placement.C in (from_plc, to_plc): + raise NotImplementedError('Transition from or to placment "c"') + if not (from_coord := coord_map.get(from_key_name)): + raise LayoutGenError(f'Transition from missing key {from_key_name}') + if not (to_coord := coord_map.get(to_key_name)): + raise LayoutGenError(f'Transition to missing key {to_key_name}') + from_key = ref_map[from_coord[0]][from_coord[1]] + to_key = result_map[to_coord[0]][to_coord[1]] + try: + val = from_key.attrib.pop(from_plc) + except KeyError: + msg = f'No value in key {from_key_name}, placement {from_plc} to move' + raise LayoutGenError(msg) + if to_plc is not None: + if to_key.get(to_plc): + msg = f'Second transition to key {to_key_name}, placement {to_plc}' + raise LayoutGenError(msg) + to_key.set(to_plc, val) + LOGGER.info( + 'Moved "%s" from <%s:%s> to <%s:%s>', + val, from_key_name, from_plc, to_key_name, to_plc) + else: + LOGGER.info( + 'Deleted "%s" from <%s:%s>', + val, from_key_name, from_plc) + + # Fill new map with other values + cls._move_untransited_to_new_map(ref_map, new_map=result_map) + + # Add additional characters + cls._add_extra_chars_to_ref_map(coord_map, new_map=result_map) + + return result_map + + @staticmethod + def _resolve_placement( + key: ElementTree.Element, + placement: Placement, + new_char: str + ) -> None: + if placement != Placement.C: + central_char = key.get(Placement.C) + existing = key.get(placement) + if existing: + LOGGER.warning( + 'Placement %s of key %s already occupied with %s', + placement, central_char, existing) + key.set(placement, new_char) + + def _process_key(self, key: ElementTree.Element) -> ElementTree.Element: + central_char = key.get(Placement.C) + if not central_char: + return key + new_key_entry = KEYS_MAP.get(central_char) + if new_key_entry is None: + return key + + for level, placement_spec in LEVELS_MAP.items(): + if not (new_char := new_key_entry[level]): + continue + if '+' in placement_spec: + pair = placement_spec.split('+') + from_level, modkey = int(pair[0]), pair[1] + key_a = new_key_entry[from_level] + key_b = new_char + if key_a is None: + raise LayoutGenError(f'Tried to modife {key_a} to {key_b}') + ElementTree.SubElement(self._modmap, modkey, a=key_a, b=key_b) + else: + placement = Placement(placement_spec) + self._resolve_placement(key, placement=placement, new_char=new_char) + return key + + @staticmethod + def _make_extra_modmap(modmap: ElementTree.Element) -> ElementTree.Element: + for modkey, ab_map in MODMAP_EXTRA.items(): + for a, b in ab_map.items(): + LOGGER.info('Adding modmap %s "%s" -> "%s"', modkey, a, b) + ElementTree.SubElement(modmap, modkey, a=a, b=b) + return modmap + + @staticmethod + def _post_escape(data: str) -> str: + buf = '' + lines = data.splitlines(keepends=True) + for line in lines: + # Skip keyboard tag line to keep attributes + if ' None: + raw_ref_rows = self._parse_reference_layout() + ref_rows = self._apply_transitions(raw_ref_rows) + for row in ref_rows: + new_row = ElementTree.SubElement(self._xml_keyboard, 'row') + for key in row: + LOGGER.debug( + 'Processing reference entry %s', + xml_elem_to_str(key)) + new_row.append(self._process_key(key)) + self._modmap = self._make_extra_modmap(self._modmap) + self._xml_keyboard.append(self._modmap) + + def get_xml(self) -> str: + ElementTree.indent(self._xml_keyboard) + body_raw = xml_elem_to_str(self._xml_keyboard) + body = self._post_escape(body_raw) + + result = self.XML_DECLARATION + '\n' + if self._comment: + result += self._comment + '\n' + result += body + '\n' + + return result + + +def get_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + prog='gen_sinhala_phonetic_layout', + description='Generate XKB-based Sinhala layout',) + parser.add_argument( + '-o', + '--output', + default=BASE_DIR / f'srcs/layouts/{LAYOUT_FILENAME}', + help='File to write result, `-` for stdout') + parser.add_argument( + '-v', + '--verbose', + help='More verbose logging', + action='store_true') + return parser.parse_args() + + +if __name__ == '__main__': + args = get_args() + logging.basicConfig( + level=logging.DEBUG if args.verbose else logging.WARNING, + format='%(levelname)s: %(message)s') + builder = LayoutBuilder(name='සිංහල', script='sinhala', comment=COMMENT) + builder.build() + content = builder.get_xml() + if args.output == '-': + print(content) + else: + with open(args.output, 'w') as file: + file.write(content) diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..81039a2 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Dfile.encoding=UTF-8 +android.useAndroidX=true +android.nonTransitiveRClass=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e708b1c Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..3227f43 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Mon Aug 21 18:13:41 CEST 2023 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..4f906e0 --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/res/drawable/cog_outline.xml b/res/drawable/cog_outline.xml new file mode 100644 index 0000000..c910a9e --- /dev/null +++ b/res/drawable/cog_outline.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/res/drawable/doc_anim_circle.xml b/res/drawable/doc_anim_circle.xml new file mode 100644 index 0000000..cac58c2 --- /dev/null +++ b/res/drawable/doc_anim_circle.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable/doc_anim_round_trip.xml b/res/drawable/doc_anim_round_trip.xml new file mode 100644 index 0000000..924528a --- /dev/null +++ b/res/drawable/doc_anim_round_trip.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/res/drawable/doc_anim_swipe.xml b/res/drawable/doc_anim_swipe.xml new file mode 100644 index 0000000..fc063cf --- /dev/null +++ b/res/drawable/doc_anim_swipe.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/res/drawable/doc_key_g.xml b/res/drawable/doc_key_g.xml new file mode 100644 index 0000000..6699bd8 --- /dev/null +++ b/res/drawable/doc_key_g.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/res/drawable/doc_key_u.xml b/res/drawable/doc_key_u.xml new file mode 100644 index 0000000..4a94fe2 --- /dev/null +++ b/res/drawable/doc_key_u.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/res/drawable/ic_clipboard_paste.xml b/res/drawable/ic_clipboard_paste.xml new file mode 100644 index 0000000..1507f27 --- /dev/null +++ b/res/drawable/ic_clipboard_paste.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/res/drawable/ic_clipboard_save.xml b/res/drawable/ic_clipboard_save.xml new file mode 100644 index 0000000..53abcf2 --- /dev/null +++ b/res/drawable/ic_clipboard_save.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/res/drawable/ic_delete.xml b/res/drawable/ic_delete.xml new file mode 100644 index 0000000..5b69d0b --- /dev/null +++ b/res/drawable/ic_delete.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/res/drawable/ic_launcher_background.xml b/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..146896b --- /dev/null +++ b/res/drawable/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + + diff --git a/res/drawable/ic_launcher_foreground.xml b/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..927626a --- /dev/null +++ b/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/res/layout/clipboard_history_entry.xml b/res/layout/clipboard_history_entry.xml new file mode 100644 index 0000000..9d34a9e --- /dev/null +++ b/res/layout/clipboard_history_entry.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/res/layout/clipboard_pane.xml b/res/layout/clipboard_pane.xml new file mode 100644 index 0000000..84dc6c9 --- /dev/null +++ b/res/layout/clipboard_pane.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/res/layout/clipboard_pin_entry.xml b/res/layout/clipboard_pin_entry.xml new file mode 100644 index 0000000..9cd8b2d --- /dev/null +++ b/res/layout/clipboard_pin_entry.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/res/layout/dialog_edit_text.xml b/res/layout/dialog_edit_text.xml new file mode 100644 index 0000000..5b935dc --- /dev/null +++ b/res/layout/dialog_edit_text.xml @@ -0,0 +1,4 @@ + + + + diff --git a/res/layout/emoji_pane.xml b/res/layout/emoji_pane.xml new file mode 100644 index 0000000..379cfd3 --- /dev/null +++ b/res/layout/emoji_pane.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/res/layout/keyboard.xml b/res/layout/keyboard.xml new file mode 100644 index 0000000..8af048d --- /dev/null +++ b/res/layout/keyboard.xml @@ -0,0 +1,2 @@ + + diff --git a/res/layout/launcher_activity.xml b/res/layout/launcher_activity.xml new file mode 100644 index 0000000..2273641 --- /dev/null +++ b/res/layout/launcher_activity.xml @@ -0,0 +1,24 @@ + + + + +