Full Code of VladThodo/behe-keyboard for AI

master 2ff8f030643b cached
84 files
235.8 KB
60.7k tokens
142 symbols
1 requests
Download .txt
Showing preview only (260K chars total). Download the full file or copy to clipboard to get everything.
Repository: VladThodo/behe-keyboard
Branch: master
Commit: 2ff8f030643b
Files: 84
Total size: 235.8 KB

Directory structure:
gitextract_6wnfhx6g/

├── .github/
│   └── workflows/
│       ├── greetings.yml
│       ├── label.yml
│       └── labeler.yaml
├── .gitignore
├── .idea/
│   ├── codeStyleSettings.xml
│   ├── compiler.xml
│   ├── copyright/
│   │   └── profiles_settings.xml
│   ├── gradle.xml
│   ├── misc.xml
│   ├── modules.xml
│   ├── runConfigurations.xml
│   └── vcs.xml
├── .scrutinizer.yml
├── .travis.yml
├── LICENSE
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── com/
│       │           └── vlath/
│       │               └── keyboard/
│       │                   └── ExampleInstrumentedTest.java
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── vlath/
│       │   │           └── keyboard/
│       │   │               ├── CandidateView.java
│       │   │               ├── CustomKeyboard.java
│       │   │               ├── LatinKeyboard.java
│       │   │               ├── Main.java
│       │   │               ├── PCKeyboard.java
│       │   │               ├── Preference.java
│       │   │               ├── PreferenceFragment.java
│       │   │               ├── SeekPreference.java
│       │   │               └── Variables.java
│       │   └── res/
│       │       ├── drawable/
│       │       │   ├── key_background.xml
│       │       │   ├── key_background_back.xml
│       │       │   ├── normal.xml
│       │       │   ├── preview_background.xml
│       │       │   └── round_corners.xml
│       │       ├── layout/
│       │       │   ├── activate.xml
│       │       │   ├── keyboard.xml
│       │       │   ├── keyboard_key_back.xml
│       │       │   ├── main.xml
│       │       │   ├── popup.xml
│       │       │   ├── pref.xml
│       │       │   ├── preview.xml
│       │       │   ├── seek_dialog.xml
│       │       │   ├── slide1.xml
│       │       │   ├── slide2.xml
│       │       │   ├── slide3.xml
│       │       │   └── slide4.xml
│       │       ├── values/
│       │       │   ├── attr.xml
│       │       │   ├── colors.xml
│       │       │   ├── dimens.xml
│       │       │   ├── strings.xml
│       │       │   └── styles.xml
│       │       ├── values-pt-rBR/
│       │       │   └── strings.xml
│       │       └── xml/
│       │           ├── arrow_keys.xml
│       │           ├── azerty.xml
│       │           ├── azerty_arrow_numbers.xml
│       │           ├── azerty_arrows.xml
│       │           ├── azerty_numbers.xml
│       │           ├── dvorak.xml
│       │           ├── emoji.xml
│       │           ├── emoji2.xml
│       │           ├── ime_preferences.xml
│       │           ├── method.xml
│       │           ├── numbers.xml
│       │           ├── popup_template.xml
│       │           ├── programming.xml
│       │           ├── qwerty.xml
│       │           ├── qwerty_arrow_numbers.xml
│       │           ├── qwerty_arrows.xml
│       │           ├── qwerty_numbers.xml
│       │           ├── qwertz.xml
│       │           ├── qwertz_arrow_numbers.xml
│       │           ├── qwertz_arrows.xml
│       │           ├── qwertz_numbers.xml
│       │           ├── symbols.xml
│       │           └── symbols2.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── vlath/
│                       └── keyboard/
│                           └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/greetings.yml
================================================
name: Greetings

on: [pull_request, issues]

jobs:
  greeting:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/first-interaction@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        issue-message: 'Hi there and thanks for reporting the issue! I''ll analize it as soon as I can and try to fix it. This is an automated message, I always read all of the issues, though I may not respond all the times. Thanks for using my app!'
        pr-message: 'Hi there! Thanks for your fisrt contribution on my project. If everything''s alright, I''ll merge it as soon as I can.'


================================================
FILE: .github/workflows/label.yml
================================================
name: "Pull Request Labeler"
on:
- pull_request

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/labeler@v2
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"


================================================
FILE: .github/workflows/labeler.yaml
================================================
translation:
  - app/src/main/res/values/strings.xml




================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild


================================================
FILE: .idea/codeStyleSettings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectCodeStyleSettingsManager">
    <option name="PER_PROJECT_SETTINGS">
      <value>
        <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
        <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
        <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
          <value />
        </option>
        <option name="IMPORT_LAYOUT_TABLE">
          <value>
            <package name="android" withSubpackages="true" static="false" />
            <emptyLine />
            <package name="com" withSubpackages="true" static="false" />
            <emptyLine />
            <package name="junit" withSubpackages="true" static="false" />
            <emptyLine />
            <package name="net" withSubpackages="true" static="false" />
            <emptyLine />
            <package name="org" withSubpackages="true" static="false" />
            <emptyLine />
            <package name="java" withSubpackages="true" static="false" />
            <emptyLine />
            <package name="javax" withSubpackages="true" static="false" />
            <emptyLine />
            <package name="" withSubpackages="true" static="false" />
            <emptyLine />
            <package name="" withSubpackages="true" static="true" />
            <emptyLine />
          </value>
        </option>
        <option name="RIGHT_MARGIN" value="100" />
        <AndroidXmlCodeStyleSettings>
          <option name="USE_CUSTOM_SETTINGS" value="true" />
        </AndroidXmlCodeStyleSettings>
        <Objective-C-extensions>
          <file>
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
          </file>
          <class>
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
            <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
          </class>
          <extensions>
            <pair source="cpp" header="h" />
            <pair source="c" header="h" />
          </extensions>
        </Objective-C-extensions>
        <XML>
          <option name="XML_KEEP_LINE_BREAKS" value="false" />
          <option name="XML_ALIGN_ATTRIBUTES" value="false" />
          <option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
        </XML>
        <codeStyleSettings language="XML">
          <option name="FORCE_REARRANGE_MODE" value="1" />
          <indentOptions>
            <option name="CONTINUATION_INDENT_SIZE" value="4" />
          </indentOptions>
          <arrangement>
            <rules>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>xmlns:android</NAME>
                      <XML_NAMESPACE>^$</XML_NAMESPACE>
                    </AND>
                  </match>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>xmlns:.*</NAME>
                      <XML_NAMESPACE>^$</XML_NAMESPACE>
                    </AND>
                  </match>
                  <order>BY_NAME</order>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*:id</NAME>
                      <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                    </AND>
                  </match>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*:name</NAME>
                      <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                    </AND>
                  </match>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>name</NAME>
                      <XML_NAMESPACE>^$</XML_NAMESPACE>
                    </AND>
                  </match>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>style</NAME>
                      <XML_NAMESPACE>^$</XML_NAMESPACE>
                    </AND>
                  </match>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*</NAME>
                      <XML_NAMESPACE>^$</XML_NAMESPACE>
                    </AND>
                  </match>
                  <order>BY_NAME</order>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*:layout_width</NAME>
                      <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                    </AND>
                  </match>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*:layout_height</NAME>
                      <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                    </AND>
                  </match>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*:layout_.*</NAME>
                      <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                    </AND>
                  </match>
                  <order>BY_NAME</order>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*:width</NAME>
                      <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                    </AND>
                  </match>
                  <order>BY_NAME</order>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*:height</NAME>
                      <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                    </AND>
                  </match>
                  <order>BY_NAME</order>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*</NAME>
                      <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
                    </AND>
                  </match>
                  <order>BY_NAME</order>
                </rule>
              </section>
              <section>
                <rule>
                  <match>
                    <AND>
                      <NAME>.*</NAME>
                      <XML_NAMESPACE>.*</XML_NAMESPACE>
                    </AND>
                  </match>
                  <order>BY_NAME</order>
                </rule>
              </section>
            </rules>
          </arrangement>
        </codeStyleSettings>
      </value>
    </option>
    <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
  </component>
</project>

================================================
FILE: .idea/compiler.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CompilerConfiguration">
    <resourceExtensions />
    <wildcardResourcePatterns>
      <entry name="!?*.java" />
      <entry name="!?*.form" />
      <entry name="!?*.class" />
      <entry name="!?*.groovy" />
      <entry name="!?*.scala" />
      <entry name="!?*.flex" />
      <entry name="!?*.kt" />
      <entry name="!?*.clj" />
      <entry name="!?*.aj" />
    </wildcardResourcePatterns>
    <annotationProcessing>
      <profile default="true" name="Default" enabled="false">
        <processorPath useClasspath="true" />
      </profile>
    </annotationProcessing>
  </component>
</project>

================================================
FILE: .idea/copyright/profiles_settings.xml
================================================
<component name="CopyrightManager">
  <settings default="" />
</component>

================================================
FILE: .idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/app" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>

================================================
FILE: .idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="NullableNotNullManager">
    <option name="myDefaultNullable" value="android.support.annotation.Nullable" />
    <option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
    <option name="myNullables">
      <value>
        <list size="4">
          <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
          <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
          <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
          <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
        </list>
      </value>
    </option>
    <option name="myNotNulls">
      <value>
        <list size="4">
          <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
          <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
          <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
          <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
        </list>
      </value>
    </option>
  </component>
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/build/classes" />
  </component>
  <component name="ProjectType">
    <option name="id" value="Android" />
  </component>
</project>

================================================
FILE: .idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
      <module fileurl="file://$PROJECT_DIR$/keyboard.iml" filepath="$PROJECT_DIR$/keyboard.iml" />
    </modules>
  </component>
</project>

================================================
FILE: .idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="RunConfigurationProducerService">
    <option name="ignoredProducers">
      <set>
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
      </set>
    </option>
  </component>
</project>

================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="$PROJECT_DIR$" vcs="Git" />
  </component>
</project>

================================================
FILE: .scrutinizer.yml
================================================
checks:
    java: true


================================================
FILE: .travis.yml
================================================
language: android
sudo: required
dist: trusty
group: deprecated-2017Q4

android:
  components:
    - tools

    - build-tools-26.0.0
    - android-26
    - extra-android-support
    - extra-android-m2repository
  licenses:
    - 'android-sdk-license-.+'
    - '.*intel.+'
addons:
  apt:
    packages:
      - oracle-java8-installer
before_install:
  - chmod +x gradlew
  - git submodule update --init --recursive
script:
  
- ./gradlew build check

branches:
  only:
  - master
  - dev



================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "{}"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright {yyyy} {name of copyright owner}

   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

       http://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.


================================================
FILE: README.md
================================================
[![Travis](https://img.shields.io/travis/VladThodo/behe-keyboard/master?label=master&style=flat-square)]()
[![Travis](https://img.shields.io/travis/VladThodo/behe-keyboard/dev?label=dev&style=flat-square)]()
[![Quality Score](https://img.shields.io/scrutinizer/g/VladThodo/behe-keyboard.svg?style=flat-square)]()
[![license](https://img.shields.io/github/license/VladThodo/behe-keyboard.svg?style=flat-square)]()
[![GitHub release](https://img.shields.io/github/release/VladThodo/behe-keyboard.svg?style=flat-square)]()
[![GitHub issues](https://img.shields.io/github/issues/VladThodo/behe-keyboard.svg?style=flat-square)]()

<hr>


# BeHe Keyboard

A lightweight hacking &amp; programming keyboard with material design.

BeHe Keyboard aims to provide a smooth and simple keyboard experience, while also providing special keys and interfaces, all with material design.

Also, BeHe Keyboard does not spy on you and is easy to use. Check it out!


<a href="https://f-droid.org/packages/com.vlath.keyboard/" target="_blank">
<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="90"/></a>
<a href="https://play.google.com/store/apps/details?id=com.vlath.keyboard" target="_blank">
<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="90"/></a>

## License
 
 Copyright 2017 - 2019 Vlad Todosin
 
 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
 
     http://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.


================================================
FILE: app/.gitignore
================================================
/build


================================================
FILE: app/build.gradle
================================================
apply plugin: 'com.android.application'

android {
     lintOptions {
          abortOnError false
    }
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.vlath.keyboard"
        minSdkVersion 18
        targetSdkVersion 26
        versionCode 112
        versionName "1.1.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    testCompile 'junit:junit:4.12'
}


================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Vlad\Desktop\SDK/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: app/src/androidTest/java/com/vlath/keyboard/ExampleInstrumentedTest.java
================================================
package com.vlath.keyboard;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
 * Instrumentation test, which will execute on an Android device.
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() throws Exception {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals("com.vlath.keyboard", appContext.getPackageName());
    }
}


================================================
FILE: app/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.vlath.keyboard">

    <uses-permission android:name="android.permission.VIBRATE"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".Main"
            android:label="@string/app_name">
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
       <activity android:name=".Preference"/>

        <service android:name="com.vlath.keyboard.PCKeyboard"
                 android:label="@string/app_name"
                 android:permission="android.permission.BIND_INPUT_METHOD">
            <meta-data android:name="android.view.im" android:resource="@xml/method"/>
            <intent-filter>
                <action android:name="android.view.InputMethod" />
            </intent-filter>
        </service>

    </application>

</manifest>


================================================
FILE: app/src/main/java/com/vlath/keyboard/CandidateView.java
================================================
package com.vlath.keyboard;

/**
 * Created by todo on 02.08.2017.
 */

/*
 * Copyright (C) 2008-2009 The Android Open Source Project
 *
 * 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
 *
 *      http://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.
 */

import android.view.MotionEvent;
import android.view.View;

        import android.content.Context;
        import android.content.res.Resources;
        import android.graphics.Canvas;
        import android.graphics.Paint;
        import android.graphics.Rect;
        import android.graphics.drawable.Drawable;
        import android.view.GestureDetector;
        import android.view.MotionEvent;
        import android.view.View;

        import java.util.ArrayList;
        import java.util.List;

public class CandidateView extends View {

    private static final int OUT_OF_BOUNDS = -1;

    private PCKeyboard mService;
    private List<String> mSuggestions;
    private int mSelectedIndex;
    private int mTouchX = OUT_OF_BOUNDS;
    private Drawable mSelectionHighlight;
    private boolean mTypedWordValid;

    private Rect mBgPadding;

    private static final int MAX_SUGGESTIONS = 32;
    private static final int SCROLL_PIXELS = 20;

    private int[] mWordWidth = new int[MAX_SUGGESTIONS];
    private int[] mWordX = new int[MAX_SUGGESTIONS];

    private static final int X_GAP = 60;

    private static final List<String> EMPTY_LIST = new ArrayList<String>();

    private int mColorNormal;
    private int mColorRecommended;
    private int mColorOther;
    private int mVerticalPadding;
    private Paint mPaint;
    private boolean mScrolled;
    private int mTargetScrollX;

    private int mTotalWidth;

    private GestureDetector mGestureDetector;


    public CandidateView(Context context) {
        super(context);
        mSelectionHighlight = context.getResources().getDrawable(
                android.R.drawable.list_selector_background);
        mSelectionHighlight.setState(new int[] {
                android.R.attr.state_enabled,
                android.R.attr.state_focused,
                android.R.attr.state_window_focused,
                android.R.attr.state_pressed
        });

        Resources r = context.getResources();

        setBackgroundColor(r.getColor(R.color.gray));

        mColorNormal = r.getColor(R.color.candidate_normal);
        mColorRecommended = r.getColor(R.color.candidate_recommended);
        mColorOther = r.getColor(R.color.candidate_other);
        mVerticalPadding = r.getDimensionPixelSize(R.dimen.candidate_vertical_padding);

        mPaint = new Paint();
        mPaint.setColor(mColorNormal);
        mPaint.setAntiAlias(true);
        mPaint.setTextSize(r.getDimensionPixelSize(R.dimen.candidate_font_height));
        mPaint.setStrokeWidth(5);


        mGestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() {
            @Override
            public boolean onScroll(MotionEvent e1, MotionEvent e2,
                                    float distanceX, float distanceY) {
                mScrolled = true;
                int sx = getScrollX();
                sx += distanceX;
                if (sx < 0) {
                    sx = 0;
                }
                if (sx + getWidth() > mTotalWidth) {
                    sx -= distanceX;
                }
                mTargetScrollX = sx;
                scrollTo(sx, getScrollY());
                invalidate();
                return true;
            }
        });
        setHorizontalFadingEdgeEnabled(true);
        setWillNotDraw(false);
        setHorizontalScrollBarEnabled(false);
        setVerticalScrollBarEnabled(false);
    }

    /**
     * A connection back to the service to communicate with the text field
     * @param listener
     */
    public void setService(PCKeyboard listener) {
        mService = listener;
    }

    @Override
    public int computeHorizontalScrollRange() {
        return mTotalWidth;
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int measuredWidth = resolveSize(50, widthMeasureSpec);

        // Get the desired height of the icon menu view (last row of items does
        // not have a divider below)
        Rect padding = new Rect();
        mSelectionHighlight.getPadding(padding);
        final int desiredHeight = ((int)mPaint.getTextSize()) + mVerticalPadding
                + padding.top + padding.bottom;

        // Maximum possible width and desired height
        setMeasuredDimension(measuredWidth,
                resolveSize(desiredHeight, heightMeasureSpec));
    }

    /**
     * If the canvas is null, then only touch calculations are performed to pick the target
     * candidate.
     */
    @Override
    protected void onDraw(Canvas canvas) {
        if (canvas != null) {
            super.onDraw(canvas);
        }
        mTotalWidth = 0;
        if (mSuggestions == null) return;

        if (mBgPadding == null) {
            mBgPadding = new Rect(0, 0, 0, 0);
            if (getBackground() != null) {
                getBackground().getPadding(mBgPadding);
            }
        }
        int x = 0;
        final int count = mSuggestions.size();
        final int height = getHeight();
        final Rect bgPadding = mBgPadding;
        final Paint paint = mPaint;
        final int touchX = mTouchX;
        final int scrollX = getScrollX();
        final boolean scrolled = mScrolled;
        final boolean typedWordValid = mTypedWordValid;
        final int y = (int) (((height - mPaint.getTextSize()) / 2) - mPaint.ascent());

        for (int i = 0; i < count; i++) {
            String suggestion = mSuggestions.get(i);
            float textWidth = paint.measureText(suggestion);
            final int wordWidth = (int) textWidth + X_GAP * 2;

            mWordX[i] = x;
            mWordWidth[i] = wordWidth;
            paint.setColor(mColorNormal);
            if (touchX + scrollX >= x && touchX + scrollX < x + wordWidth && !scrolled) {
                if (canvas != null) {
                    canvas.translate(x, 0);
                    mSelectionHighlight.setBounds(0, bgPadding.top, wordWidth, height);
                    mSelectionHighlight.draw(canvas);
                    canvas.translate(-x, 0);
                }
                mSelectedIndex = i;
            }

            if (canvas != null) {
                if ((i == 1 && !typedWordValid) || (i == 0 && typedWordValid)) {
                    paint.setFakeBoldText(true);
                    paint.setColor(mColorRecommended);
                } else if (i != 0) {
                    paint.setColor(mColorOther);
                }
                canvas.drawText(suggestion, x + X_GAP, y, paint);
                paint.setColor(mColorOther);
                canvas.drawLine(x + wordWidth + 0.5f, bgPadding.top,
                        x + wordWidth + 0.5f, height + 1, paint);
                paint.setFakeBoldText(false);
            }
            x += wordWidth;
        }
        mTotalWidth = x;
        if (mTargetScrollX != getScrollX()) {
            scrollToTarget();
        }
    }

    private void scrollToTarget() {
        int sx = getScrollX();
        if (mTargetScrollX > sx) {
            sx += SCROLL_PIXELS;
            if (sx >= mTargetScrollX) {
                sx = mTargetScrollX;
                requestLayout();
            }
        } else {
            sx -= SCROLL_PIXELS;
            if (sx <= mTargetScrollX) {
                sx = mTargetScrollX;
                requestLayout();
            }
        }
        scrollTo(sx, getScrollY());
        invalidate();
    }

    public void setSuggestions(List<String> suggestions, boolean completions,
                               boolean typedWordValid) {
        clear();
        if (suggestions != null) {
            mSuggestions = new ArrayList<String>(suggestions);
        }
        mTypedWordValid = typedWordValid;
        scrollTo(0, 0);
        mTargetScrollX = 0;
        // Compute the total width
        draw(new Canvas());
        invalidate();
        requestLayout();
    }

    public void clear() {
        mSuggestions = EMPTY_LIST;
        mTouchX = OUT_OF_BOUNDS;
        mSelectedIndex = -1;
        invalidate();
    }

    @Override
    public boolean onTouchEvent(MotionEvent me) {

        if (mGestureDetector.onTouchEvent(me)) {
            return true;
        }

        int action = me.getAction();
        int x = (int) me.getX();
        int y = (int) me.getY();
        mTouchX = x;

        switch (action) {
            case MotionEvent.ACTION_DOWN:
                mScrolled = false;
                invalidate();
                break;
            case MotionEvent.ACTION_MOVE:
                if (y <= 0) {
                    // Fling up!?
                    if (mSelectedIndex >= 0) {
                        mService.pickSuggestionManually(mSelectedIndex);
                        mSelectedIndex = -1;
                    }
                }
                invalidate();
                break;
            case MotionEvent.ACTION_UP:
                if (!mScrolled) {
                    if (mSelectedIndex >= 0) {
                        mService.pickSuggestionManually(mSelectedIndex);
                    }
                }
                mSelectedIndex = -1;
                removeHighlight();
                requestLayout();
                break;
        }
        return true;
    }

    /**
     * For flick through from keyboard, call this method with the x coordinate of the flick
     * gesture.
     * @param x
     */
    public void takeSuggestionAt(float x) {
        mTouchX = (int) x;
        // To detect candidate
        draw(null);
        if (mSelectedIndex >= 0) {
            mService.pickSuggestionManually(mSelectedIndex);
        }
        invalidate();
    }

    private void removeHighlight() {
        mTouchX = OUT_OF_BOUNDS;
        invalidate();
    }
}

================================================
FILE: app/src/main/java/com/vlath/keyboard/CustomKeyboard.java
================================================
package com.vlath.keyboard;

/**
 * Created by Vlad on 6/14/2017.
 */

import android.graphics.Bitmap;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.inputmethodservice.KeyboardView;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.inputmethodservice.Keyboard;
import android.inputmethodservice.Keyboard.Key;
import android.inputmethodservice.KeyboardView;
import android.os.Vibrator;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.InputMethodSubtype;
import android.widget.PopupWindow;

import java.lang.reflect.Field;
import java.util.List;

public class CustomKeyboard extends KeyboardView {

    Drawable mTransparent = new ColorDrawable(Color.TRANSPARENT);
    NinePatchDrawable mSpaceBackground = (NinePatchDrawable) getContext().getResources().getDrawable(R.drawable.space);
    NinePatchDrawable mPressedBackground = (NinePatchDrawable) getContext().getResources().getDrawable(R.drawable.press);
    Paint mPaint = new Paint();

    public CustomKeyboard(Context context, AttributeSet attrs) {
        super(context, attrs);
    }


    public CustomKeyboard(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public LatinKeyboard getLatinKeyboard(){
        return (LatinKeyboard)getKeyboard();
    }

    @Override
    protected boolean onLongPress(Key key) {
        if (key.codes[0] == Keyboard.KEYCODE_CANCEL) {
            getOnKeyboardActionListener().onKey(LatinKeyboard.KEYCODE_OPTIONS, null);
            return true;
        }
        return super.onLongPress(key);
    }

    @Override
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        mPaint.setTextAlign(Paint.Align.CENTER);
        mPaint.setTextSize(28);
        mPaint.setColor(Color.parseColor("#a5a7aa"));

        List<Key> keys = getKeyboard().getKeys();

        for(Key key: keys) {

            if(key.label != null) {
                if (key.codes[0] == 32) {
                    mSpaceBackground.setBounds(key.x, key.y, key.x + key.width, key.y + key.height);
                    mSpaceBackground.draw(canvas);
                }
                if (Variables.isAnyOn()) {
                    if (Variables.isCtrl()) {
                        if (key.codes[0] == -113) {
                            mPressedBackground.setBounds(key.x, key.y, key.x + key.width, key.y + key.height);
                            mPressedBackground.draw(canvas);
                        }
                    }
                    if (Variables.isAlt()){
                        if (key.codes[0] == -114) {
                            mPressedBackground.setBounds(key.x, key.y, key.x + key.width, key.y + key.height);
                            mPressedBackground.draw(canvas);
                        }
                    }

                }
                else{
                    if(key.codes[0] == -113) {
                        mTransparent.setBounds(key.x, key.y, key.x + key.width, key.y + key.height);
                        mTransparent.draw(canvas);
                    }
                    if(key.codes[0] == -114) {
                        mTransparent.setBounds(key.x, key.y, key.x + key.width, key.y + key.height);
                        mTransparent.draw(canvas);
                    }
                }
            }
        }
    }
}

================================================
FILE: app/src/main/java/com/vlath/keyboard/LatinKeyboard.java
================================================
package com.vlath.keyboard;

/**
 * Created by Vlad on 6/14/2017.
 */

import android.content.Context;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
import android.inputmethodservice.Keyboard;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;

public class LatinKeyboard extends Keyboard {

    static final int KEYCODE_OPTIONS = -100;

    static final int KEYCODE_LAYUOUT_SWITCH = -101;

    static final int KEYCODE_DPAD_R = -111;

    static final int KEYCODE_DPAD_L = -108;

    static final int KEYCODE_DPAD_U = -107;

    static final int KEYCODE_DPAD_DO = -109;

    static final int KEYCODE_ESCAPE = -112;

    static final int KEYCODE_CTRL = -113;

    static final int KEYCODE_ALT  = -114;

    static final int KEYCODE_STANDARD_SWITCH = -117;

    static final int KEYCODE_DELL_PROCESS = -121;

    static final int KEYCODE_I_DONT_KNOW_WHY_I_PUT_THAT_HERE = -122;


    private Key mEnterKey;
    private Key mSpaceKey;
    private static short rowNumber = 4;

    /**
     * Stores the current state of the mode change key. Its width will be dynamically updated to
     * match the region of {@link #mModeChangeKey} when {@link #mModeChangeKey} becomes invisible.
     */
    private Key mModeChangeKey;
    /**
     * Stores the current state of the language switch key (a.k.a. globe key). This should be

     * returns true. When this key becomes invisible, its width will be shrunk to zero.
     */
    private Key mLanguageSwitchKey;
    /**
     * Stores the size and other information of {@link #mModeChangeKey} when
     * {@link #mLanguageSwitchKey} is visible. This should be immutable and will be used only as a
     * reference size when the visibility of {@link #mLanguageSwitchKey} is changed.
     */
    private Key mSavedModeChangeKey;
    /**
     * Stores the size and other information of {@link #mLanguageSwitchKey} when it is visible.
     * This should be immutable and will be used only as a reference size when the visibility of
     * {@link #mLanguageSwitchKey} is changed.
     */
    private Key mSavedLanguageSwitchKey;

    public LatinKeyboard(Context context, int xmlLayoutResId) {
        super(context, xmlLayoutResId);
    }

    public LatinKeyboard(Context context, int layoutTemplateResId,
                         CharSequence characters, int columns, int horizontalPadding) {
        super(context, layoutTemplateResId, characters, columns, horizontalPadding);
    }

    @Override
    protected Key createKeyFromXml(Resources res, Row parent, int x, int y,
                                   XmlResourceParser parser) {
        Key key = new LatinKey(res, parent, x, y, parser);
        if (key.codes[0] == 10) {
            mEnterKey = key;
        } else if (key.codes[0] == ' ') {
            mSpaceKey = key;
        } else if (key.codes[0] == Keyboard.KEYCODE_MODE_CHANGE) {
            mModeChangeKey = key;
            mSavedModeChangeKey = new LatinKey(res, parent, x, y, parser);
        } else if (key.codes[0] == LatinKeyboard.KEYCODE_LAYUOUT_SWITCH) {
            mLanguageSwitchKey = key;
            mSavedLanguageSwitchKey = new LatinKey(res, parent, x, y, parser);
        }
        return key;
    }

    /**
     * Dynamically change the visibility of the language switch key (a.k.a. globe key).
     * @param visible True if the language switch key should be visible.
     */
    void setLanguageSwitchKeyVisibility(boolean visible) {
        if (visible) {
            // The language switch key should be visible. Restore the size of the mode change key
            // and language switch key using the saved layout.
            mModeChangeKey.width = mSavedModeChangeKey.width;
            mModeChangeKey.x = mSavedModeChangeKey.x;
            mLanguageSwitchKey.width = mSavedLanguageSwitchKey.width;
            mLanguageSwitchKey.icon = mSavedLanguageSwitchKey.icon;
            mLanguageSwitchKey.iconPreview = mSavedLanguageSwitchKey.iconPreview;
        } else {
            // The language switch key should be hidden. Change the width of the mode change key
            // to fill the space of the language key so that the user will not see any strange gap.
            mModeChangeKey.width = mSavedModeChangeKey.width + mSavedLanguageSwitchKey.width;
            mLanguageSwitchKey.width = 0;
            mLanguageSwitchKey.icon = null;
            mLanguageSwitchKey.iconPreview = null;
        }
    }

    /**
     * This looks at the ime options given by the current editor, to set the
     * appropriate label on the keyboard's enter key (if it has one).
     */
    void setImeOptions(Resources res, int options) {
        if (mEnterKey == null) {
            return;
        }

        switch (options&(EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) {
            case EditorInfo.IME_ACTION_GO:
                mEnterKey.iconPreview = null;
                mEnterKey.icon = null;
                mEnterKey.label = "ENT";
                break;
            case EditorInfo.IME_ACTION_NEXT:
                mEnterKey.iconPreview = null;
                mEnterKey.icon = null;
                mEnterKey.label = "N";
                break;
            case EditorInfo.IME_ACTION_SEARCH:
              //  mEnterKey.icon = "K";
                mEnterKey.label = null;
                break;
            case EditorInfo.IME_ACTION_SEND:
                mEnterKey.iconPreview = null;
                mEnterKey.icon = null;
                mEnterKey.label = "HH";
                break;
            default:
             //   mEnterKey.icon = "U";
                mEnterKey.label = null;
                break;
        }
    }

    public void setRowNumber(short number){

        rowNumber = number;

    }



    void setSpaceIcon(final Drawable icon) {
        if (mSpaceKey != null) {
            mSpaceKey.icon = icon;
        }
    }
    public void changeKeyHeight(double height_modifier){
        int height = 0;
        for(Keyboard.Key key : getKeys()) {
            key.height *= height_modifier;
            key.y *= height_modifier;
            height = key.height;
        }
        setKeyHeight(height);
        getNearestKeys(0, 0); //somehow adding this fixed a weird bug where bottom row keys could not be pressed if keyboard height is too tall.. from the Keyboard source code seems like calling this will recalculate some values used in keypress detection calculation
    }


    /** This piece of code is intended to help us to resize the keyboard at runtime,
     *  thus giving us the opportunity to customize its height. It's a bit tricky though.
     *  And StackOverflow inspired me to be honest.
     * **/

    @Override
    public int getHeight(){

        return getKeyHeight() * rowNumber;
    }

    public void setKeyHeight(int height) {
        super.setKeyHeight(height);
    }


    static class LatinKey extends Keyboard.Key {

        public LatinKey(Resources res, Keyboard.Row parent, int x, int y,
                        XmlResourceParser parser) {
            super(res, parent, x, y, parser);
        }

        /**
         * Overriding this method so that we can reduce the target area for the key that
         * closes the keyboard.
         */
        @Override
        public boolean isInside(int x, int y) {
            return super.isInside(x, codes[0] == KEYCODE_CANCEL ? y - 10 : y);
        }
    }

}

================================================
FILE: app/src/main/java/com/vlath/keyboard/Main.java
================================================
package com.vlath.keyboard;

import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.AnimationUtils;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

public class Main extends AppCompatActivity {

    private ViewPager viewPager;
    private MyViewPagerAdapter myViewPagerAdapter;
    private LinearLayout dotsLayout;
    private TextView[] dots;
    private int[] layouts;
    private Button btnSkip, btnNext;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if(!getPresentationShown()) {

            // Checking for first time launch - before calling setContentView()


            // Making notification bar transparent
            if (Build.VERSION.SDK_INT >= 21) {
                getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
            }


            setContentView(R.layout.main);
            getSupportActionBar().hide();

            viewPager = (ViewPager) findViewById(R.id.view_pager);
            dotsLayout = (LinearLayout) findViewById(R.id.layoutDots);
            btnSkip = (Button) findViewById(R.id.btn_skip);
            btnNext = (Button) findViewById(R.id.btn_next);


            // layouts of all welcome sliders
            // add few more layouts if you want
            layouts = new int[]{
                    R.layout.slide1,
                    R.layout.slide2,
                    R.layout.slide3,
                    R.layout.slide4
            };


            // adding bottom dots
            addBottomDots(0);

            // making notification bar transparent
            changeStatusBarColor();

            myViewPagerAdapter = new MyViewPagerAdapter();
            viewPager.setAdapter(myViewPagerAdapter);
            viewPager.addOnPageChangeListener(viewPagerPageChangeListener);

            btnSkip.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    setPresentationShown();
                    launchHomeScreen();
                }
            });

            btnNext.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    // checking for last page
                    // if last page home screen will be launched
                    int current = getItem(+1);
                    if (current < layouts.length) {
                        // move to next screen
                        viewPager.setCurrentItem(current);
                    } else {
                        setPresentationShown();
                        launchHomeScreen();
                    }
                }
            });
        }

        else{

            setContentView(R.layout.activate);
            TextView t2 = (TextView) findViewById(R.id.textView2);
            t2.setMovementMethod(LinkMovementMethod.getInstance());

            showTwitterDialog();

        }


    }


    private void addBottomDots(int currentPage) {
        dots = new TextView[layouts.length];

        int[] colorsActive = getResources().getIntArray(R.array.array_dot_active);
        int[] colorsInactive = getResources().getIntArray(R.array.array_dot_inactive);

        dotsLayout.removeAllViews();
        for (int i = 0; i < dots.length; i++) {
            dots[i] = new TextView(this);
            dots[i].setText(Html.fromHtml("&#8226;"));
            dots[i].setTextSize(35);
            dots[i].setTextColor(colorsInactive[currentPage]);
            dotsLayout.addView(dots[i]);
        }

        if (dots.length > 0)
            dots[currentPage].setTextColor(colorsActive[currentPage]);
    }

    private int getItem(int i) {
        return viewPager.getCurrentItem() + i;
    }

    private void launchHomeScreen() {
        Intent intent = getIntent();
        finish();
        startActivity(intent);
        overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
    }

    //  viewpager change listener
    ViewPager.OnPageChangeListener viewPagerPageChangeListener = new ViewPager.OnPageChangeListener() {

        @Override
        public void onPageSelected(int position) {
            addBottomDots(position);

            // changing the next button text 'NEXT' / 'GOT IT'
            if (position == layouts.length - 1) {
                // last page. make button text to GOT IT
                btnNext.setText("GOT IT");
                btnSkip.setVisibility(View.GONE);
            } else {
                // still pages are left
                btnNext.setText("NEXT");
                btnSkip.setVisibility(View.VISIBLE);
            }
        }

        @Override
        public void onPageScrolled(int arg0, float arg1, int arg2) {

        }

        @Override
        public void onPageScrollStateChanged(int arg0) {

        }
    };

    /**
     * Making notification bar transparent
     */
    private void changeStatusBarColor() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            Window window = getWindow();
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.setStatusBarColor(Color.TRANSPARENT);
        }
    }

    private void normalStatusBar(){

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            Window window = getWindow();
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.setStatusBarColor(getResources().getColor(R.color.colorPrimaryDark));
        }

    }

    /**
     * View pager adapter
     */
    public class MyViewPagerAdapter extends PagerAdapter {
        private LayoutInflater layoutInflater;

        public MyViewPagerAdapter() {
        }

        @Override
        public Object instantiateItem(ViewGroup container, int position) {
            layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);

            View view = layoutInflater.inflate(layouts[position], container, false);
            container.addView(view);

            return view;
        }

        @Override
        public int getCount() {
            return layouts.length;
        }

        @Override
        public boolean isViewFromObject(View view, Object obj) {
            return view == obj;
        }


        @Override
        public void destroyItem(ViewGroup container, int position, Object object) {
            View view = (View) object;
            container.removeView(view);
        }
    }

    public boolean getPresentationShown(){

        try {
            return PreferenceManager.getDefaultSharedPreferences(this).getBoolean("presentation", false);
        }
        catch (Exception e){

            return false;
        }

    }

    public void setPresentationShown(){

        PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean("presentation", true).commit();

    }

    public void showTwitterDialog(){
        if(PreferenceManager.getDefaultSharedPreferences(this).getBoolean("shown",false)) {}
        else {
            AlertDialog alertDialog = new AlertDialog.Builder(this)
                    .setTitle(getString(R.string.up))
                    .setMessage(getString(R.string.follow))
                    .setPositiveButton("Follow", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialogInterface, int i) {
                            Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/VlathXDA"));
                            startActivity(intent);
                        }
                    })
                    .setNegativeButton("No thanks", new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialogInterface, int i) {
                            dialogInterface.dismiss();
                        }
                    })
                    .show();
            PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean("shown",true).apply();
        }
    }



    public void settings(View v){
        Intent intent = new Intent(this, Preference.class);
        startActivity(intent);
    }

    public void enable(View v){
        this.startActivity(new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS));
    }

    public void select(View v){
        InputMethodManager imeManager = (InputMethodManager) getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
        if (imeManager != null) {
            imeManager.showInputMethodPicker();
        } else {
            Toast.makeText(this, "Not possible" , Toast.LENGTH_LONG).show();
        }
    }






}

================================================
FILE: app/src/main/java/com/vlath/keyboard/PCKeyboard.java
================================================
package com.vlath.keyboard;

/*
 * Copyright (C) 2008-2009 The Android Open Source Project
 *
 * 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
 *
 *      http://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.
 */



import android.app.Dialog;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.inputmethodservice.InputMethodService;
import android.inputmethodservice.Keyboard;
import android.inputmethodservice.KeyboardView;
import android.os.IBinder;
import android.os.Vibrator;
import android.preference.*;
import android.text.InputType;
import android.text.method.MetaKeyKeyListener;
import android.util.Log;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype;
import android.view.textservice.SentenceSuggestionsInfo;
import android.view.textservice.SpellCheckerSession;
import android.view.textservice.SuggestionsInfo;
import android.view.textservice.TextInfo;
import android.view.textservice.TextServicesManager;
import android.widget.PopupWindow;
import java.util.ArrayList;
import java.util.List;

/** Main class  of the keyboard, extending InputMethodService. Here we handle all the user interaction with the keyboard itself. */

public class PCKeyboard extends InputMethodService
        implements KeyboardView.OnKeyboardActionListener, SpellCheckerSession.SpellCheckerSessionListener {


    /**
     * As we don't want to bother changing the app theme, we use filters to theme the keyboard.
     * Each filter needs an array of colors. The arrays are declared below.
     */

    // TODO: Add the arrays in a separate, static class, so they are eay to access and modify

    private static final float[] sNoneColorArray = {
            1.0f, 0, 0, 0, 0, // red
            0, 1.0f, 0, 0, 0, // green
            0, 0, 1.0f, 0, 0, // blue
            0, 0, 0, 1.0f, 0 // alpha
    };

    private static final float[] sNegativeColorArray = {
            -1.0f, 0, 0, 0, 255, // red
            0, -1.0f, 0, 0, 255, // green
            0, 0, -1.0f, 0, 255, // blue
            0, 0, 0, 1.0f, 0 // alpha
    };
    private static final float[] sBlueBlackColorArray = {
            -0.6f, 0, 0, 0, 41, // red
            0, -0.6f, 0, 0, 128, // green
            0, 0, -0.6f, 0, 185, // blue
            0, 0, 0, 1.0f, 0 // alpha
    };
    private static final float[] sBlueWhiteColorArray = {
            1.0f, 0, 0, 0, 41, // red
            0, 1.0f, 0, 0, 128, // green
            0, 0, 1.0f, 0, 185, // blue
            0, 0, 0, 1.0f, 1 // alpha
    };
    private static final float[] sRedWhiteColorArray = {
            1.0f, 0, 0, 0, 192, // red
            0, 1.0f, 0, 0, 57, // green
            0, 0, 1.0f, 0, 43, // blue
            0, 0, 0, 1.0f, 0 // alpha
    };
    private static final float[] sRedBlackColorArray = {
            -0.6f, 0, 0, 0, 192, // red
            0, -0.6f, 0, 0, 57, // green
            0, 0, -0.6f, 0, 43, // blue
            0, 0, 0, 1.0f, 0 // alpha
    };
    private static final float[] sOrangeBlackColorArray = {
            1.0f, 0, 0, 0, 230, // red
            0, 1.0f, 0, 0, 126, // green
            0, 0, 1.0f, 0, 34, // blue
            0, 0, 0, 1.0f, 0 // alpha
    };
    private static final float[] sMaterialDarkColorArray = {
            1.0f, 0, 0, 0, 55, // red
            0, 1.0f, 0, 0, 71, // green
            0, 0, 1.0f, 0, 79, // blue
            0, 0, 0, 1.0f, 1 // alpha
    };

    static final boolean PROCESS_HARD_KEYS = true;

    private InputMethodManager mInputMethodManager;

    private CustomKeyboard mInputView;
    private CandidateView mCandidateView;
    private CompletionInfo[] mCompletions;

    private StringBuilder mComposing = new StringBuilder();
    private boolean mPredictionOn;
    private boolean mCompletionOn;
    private int mLastDisplayWidth;
    private boolean mCapsLock;
    private long mLastShiftTime;
    private long mMetaState;

    private LatinKeyboard mSymbolsKeyboard;
    private LatinKeyboard mSymbolsShiftedKeyboard;
    private LatinKeyboard mStandardKeyboard;



    private String mWordSeparators;

    private SpellCheckerSession mScs;
    private List<String> mSuggestions;

    private boolean firstCaps = false;
    private boolean isSysmbols = false;
    private boolean shiftSim = false;
    private boolean isDpad = false;
    private boolean isProgramming = false;
    private InputMethodManager mServ;
    private float[] mDefaultFilter;
    long shift_pressed=0;

    private short rowNumber = 4;
    private CustomKeyboard kv;

    private LatinKeyboard currentKeyboard;
    private LatinKeyboard mCurKeyboard;
    private LatinKeyboard standardKeyboard;

    private int standardKeyboardID = R.xml.qwerty;
    /**
     * Main initialization of the input method component. Be sure to call
     * to super class.
     */

    @Override public void onCreate() {
        super.onCreate();
        mInputMethodManager = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
        mWordSeparators = getResources().getString(R.string.word_separators);
        final TextServicesManager tsm = (TextServicesManager) getSystemService(
                Context.TEXT_SERVICES_MANAGER_SERVICE);
        mScs = tsm.newSpellCheckerSession(null, null, this, true);
    }

    /**
     * This is the point where you can do all of your UI initialization.  It
     * is called after creation and any configuration change.
     */
    @Override public void onInitializeInterface() {
        if (mStandardKeyboard != null) {
            // Configuration changes can happen after the keyboard gets recreated,
            // so we need to be able to re-build the keyboards if the available
            // space has changed.
            int displayWidth = getMaxWidth();
            if (displayWidth == mLastDisplayWidth) return;
            mLastDisplayWidth = displayWidth;
        }
        mStandardKeyboard = new LatinKeyboard(this, standardKeyboardID);
        mSymbolsKeyboard = new LatinKeyboard(this, R.xml.symbols);
        mSymbolsShiftedKeyboard = new LatinKeyboard(this, R.xml.symbols2);
    }

    /**
     * Called by the framework when your view for creating input needs to
     * be generated.  This will be called the first time your input method
     * is displayed, and every time it needs to be re-created such as due to
     * a configuration change.
     *
     * We also s
     */
    @Override public View onCreateInputView() {
        mInputView = (CustomKeyboard) getLayoutInflater().inflate(
                R.layout.keyboard, null);
        mInputView.setOnKeyboardActionListener(this);
        mInputView.setPreviewEnabled(false);
        setLatinKeyboard(mStandardKeyboard);
        return mInputView;
    }

    private void setLatinKeyboard(LatinKeyboard nextKeyboard) {

        mInputView.setKeyboard(nextKeyboard);

    }

    /**
     * Called by the framework when your view for showing candidates needs to
     * be generated, like {@link #onCreateInputView}.
     */
    @Override public View onCreateCandidatesView() {
        mCandidateView = new CandidateView(this);
        mCandidateView.setService(this);
        setTheme();
        Paint mPaint = new Paint();
        ColorMatrixColorFilter filterInvert = new ColorMatrixColorFilter(mDefaultFilter);
        mPaint.setColorFilter(filterInvert);
        mCandidateView.setLayerType(View.LAYER_TYPE_HARDWARE, mPaint);


        return mCandidateView;
    }

    /**
     * This is the main point where we do our initialization of the input method
     * to begin operating on an application.  At this point we have been
     * bound to the client, and are now receiving all of the detailed information
     * about the target of our edits.
     *
     *
     * And we have to reinitialize all we've one to make sure the keyboard aspect matches
     * The one selected in settings.
     */
    @Override public void onStartInput(EditorInfo attribute, boolean restarting) {
        super.onStartInput(attribute, restarting);

        setTheme();

        mComposing.setLength(0);
        updateCandidates();
        /**
         * Some code on here is based on the SoftKeyboard Sample. I don't fully understand it.
         * I need to look it up and delete any unnecessary stuff.
         * */
        if (!restarting) {
            // Clear shift states.
            mMetaState = 0;
        }
        mCompletions = null;

        if(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("bord",false)){
            kv = (CustomKeyboard) getLayoutInflater().inflate(R.layout.keyboard_key_back, null);
        }
        else {
            kv = (CustomKeyboard) getLayoutInflater().inflate(R.layout.keyboard, null);
        }
        setStandardKeyboard();
        setInputType();
        Paint mPaint = new Paint();
        ColorMatrixColorFilter filterInvert = new ColorMatrixColorFilter(mDefaultFilter);
        mPaint.setColorFilter(filterInvert);
        mCandidateView = new CandidateView(this);
        mCandidateView.setService(this);

        kv.setLayerType(View.LAYER_TYPE_HARDWARE, mPaint);
        currentKeyboard.setRowNumber(getRowNumber());

        kv.setKeyboard(currentKeyboard);

        capsOnFirst();
        kv.setOnKeyboardActionListener(this);

        mPredictionOn = PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("pred", false);
        mCompletionOn = false;

        mCandidateView.setLayerType(View.LAYER_TYPE_HARDWARE, mPaint);

        setInputView(kv);
        kv.getLatinKeyboard().changeKeyHeight(getHeightKeyModifier());

        setCandidatesView(mCandidateView);

    }

    /**
     * This is called when the user is done editing a field.  We can use
     * this to reset our state.
     */
    @Override public void onFinishInput() {
        super.onFinishInput();

        // Clear current composing text and candidates.
        mComposing.setLength(0);
        updateCandidates();

        // We only hide the candidates window when finishing input on
        // a particular editor, to avoid popping the underlying application
        // up and down if the user is entering text into the bottom of
        // its window.
        setCandidatesViewShown(false);

        mCurKeyboard = mStandardKeyboard;
        if (mInputView != null) {
            mInputView.closing();
        }
    }

    /**
     * Deal with the editor reporting movement of its cursor.
     */
    @Override public void onUpdateSelection(int oldSelStart, int oldSelEnd,
                                            int newSelStart, int newSelEnd,
                                            int candidatesStart, int candidatesEnd) {
        super.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd,
                candidatesStart, candidatesEnd);

        // If the current selection in the text view changes, we should
        // clear whatever candidate text we have.
        if (mComposing.length() > 0 && (newSelStart != candidatesEnd
                || newSelEnd != candidatesEnd)) {
            mComposing.setLength(0);
            updateCandidates();
            InputConnection ic = getCurrentInputConnection();
            if (ic != null) {
                ic.finishComposingText();
            }
        }
    }

    /**
     * This tells us about completions that the editor has determined based
     * on the current text in it.  We want to use this in fullscreen mode
     * to show the completions ourself, since the editor can not be seen
     * in that situation.
     */
    @Override public void onDisplayCompletions(CompletionInfo[] completions) {
        if (mCompletionOn) {
            mCompletions = completions;
            if (completions == null) {
                setSuggestions(null, false, false);
                return;
            }

            List<String> stringList = new ArrayList<String>();
            for (int i = 0; i < completions.length; i++) {
                CompletionInfo ci = completions[i];
                if (ci != null) stringList.add(ci.getText().toString());
            }
            setSuggestions(stringList, true, true);
        }
    }

    /**
     * This translates incoming hard key events in to edit operations on an
     * InputConnection.  It is only needed when using the
     * PROCESS_HARD_KEYS option.
     */
    private boolean translateKeyDown(int keyCode, KeyEvent event) {
        mMetaState = MetaKeyKeyListener.handleKeyDown(mMetaState,
                keyCode, event);
        int c = event.getUnicodeChar(MetaKeyKeyListener.getMetaState(mMetaState));
        mMetaState = MetaKeyKeyListener.adjustMetaAfterKeypress(mMetaState);
        InputConnection ic = getCurrentInputConnection();
        if (c == 0 || ic == null) {
            return false;
        }

        boolean dead = false;

        if ((c & KeyCharacterMap.COMBINING_ACCENT) != 0) {
            dead = true;
            c = c & KeyCharacterMap.COMBINING_ACCENT_MASK;
        }

        if (mComposing.length() > 0) {
            char accent = mComposing.charAt(mComposing.length() -1 );
            int composed = KeyEvent.getDeadChar(accent, c);

            if (composed != 0) {
                c = composed;
                mComposing.setLength(mComposing.length()-1);
            }
        }

        onKey(c, null);

        return true;
    }

    /**
     * Use this to monitor key events being delivered to the application.
     * We get first crack at them, and can either resume them or let them
     * continue to the app.
     */
    @Override public boolean onKeyUp(int keyCode, KeyEvent event) {

        return super.onKeyUp(keyCode, event);
    }
    @Override public boolean onKeyDown(int keyCode, KeyEvent event) {

        return super.onKeyDown(keyCode, event);
    }

    /**
     * Helper function to commit any text being composed in to the editor.
     */
    private void commitTyped(InputConnection inputConnection) {
        if (mComposing.length() > 0) {
            inputConnection.commitText(mComposing, mComposing.length());
            mComposing.setLength(0);
            updateCandidates();
        }
    }

    /**
     * Helper to update the shift state of our keyboard based on the initial
     * editor state.
     */
    private void updateShiftKeyState(EditorInfo attr) {
        if (attr != null
                && mInputView != null && mStandardKeyboard == mInputView.getKeyboard()) {
            int caps = 0;
            EditorInfo ei = getCurrentInputEditorInfo();
            if (ei != null && ei.inputType != InputType.TYPE_NULL) {
                caps = getCurrentInputConnection().getCursorCapsMode(attr.inputType);
            }
            mInputView.setShifted(mCapsLock || caps != 0);
        }
    }

    /**
     * Helper to determine if a given character code is alphabetic.
     */
    private boolean isAlphabet(int code) {
        if (Character.isLetter(code)) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * Helper to send a key down / key up pair to the current editor.
     */
    private void keyDownUp(int keyEventCode) {
        getCurrentInputConnection().sendKeyEvent(
                new KeyEvent(KeyEvent.ACTION_DOWN, keyEventCode));
        getCurrentInputConnection().sendKeyEvent(
                new KeyEvent(KeyEvent.ACTION_UP, keyEventCode));
    }

    /**
     * Helper to send a character to the editor as raw key events.
     */
    private void sendKey(int keyCode) {
        switch (keyCode) {
            case '\n':
                keyDownUp(KeyEvent.KEYCODE_ENTER);
                break;
            default:
                if (keyCode >= '0' && keyCode <= '9') {
                    keyDownUp(keyCode - '0' + KeyEvent.KEYCODE_0);
                } else {
                    getCurrentInputConnection().commitText(String.valueOf((char) keyCode), 1);
                }
                break;
        }
    }


    public void onText(CharSequence text) {
        InputConnection ic = getCurrentInputConnection();
        if (ic == null) return;
        ic.beginBatchEdit();
        if (mComposing.length() > 0) {
            commitTyped(ic);
        }
        ic.commitText(text, 0);
        ic.endBatchEdit();
        updateShiftKeyState(getCurrentInputEditorInfo());

    }

    @Override
    public void swipeLeft() {

    }

    @Override
    public void swipeRight() {

    }

    @Override
    public void swipeDown() {

    }

    @Override
    public void swipeUp() {

    }

    /**
     * Update the list of available candidates from the current composing
     * text.  This will need to be filled in by however you are determining
     * candidates.
     */
    private void updateCandidates() {
        if (!mCompletionOn) {
            if (mComposing.length() > 0) {
                ArrayList<String> list = new ArrayList<String>();
                list.add(mComposing.toString());
                mScs.getSentenceSuggestions(new TextInfo[] {new TextInfo(mComposing.toString())}, 5);
                setSuggestions(list, true, true);
            } else {
                setSuggestions(null, false, false);
            }
        }
    }

    public void setSuggestions(List<String> suggestions, boolean completions,
                               boolean typedWordValid) {
        if (suggestions != null && suggestions.size() > 0) {
            setCandidatesViewShown(true);
        } else if (isExtractViewShown()) {
            setCandidatesViewShown(true);
        }
        mSuggestions = suggestions;
        if (mCandidateView != null) {
            mCandidateView.setSuggestions(suggestions, completions, typedWordValid);
        }
    }

    private void handleBackspace() {
        final int length = mComposing.length();
        if (length > 1) {
            mComposing.delete(length - 1, length);
            getCurrentInputConnection().setComposingText(mComposing, 1);
            updateCandidates();
        } else if (length > 0) {
            mComposing.setLength(0);
            getCurrentInputConnection().commitText("", 0);
            updateCandidates();
        } else {
            keyDownUp(KeyEvent.KEYCODE_DEL);
        }
        updateShiftKeyState(getCurrentInputEditorInfo());
    }

    private void handleCharacter(int primaryCode, int[] keyCodes) {
        if (isInputViewShown()) {
            if (kv.isShifted()) {
                primaryCode = Character.toUpperCase(primaryCode);
            }
        }
        if (mPredictionOn && !mWordSeparators.contains(String.valueOf((char)primaryCode))) {
            mComposing.append((char) primaryCode);
            getCurrentInputConnection().setComposingText(mComposing, 1);
            updateShiftKeyState(getCurrentInputEditorInfo());
            updateCandidates();
        }
        if(mPredictionOn && mWordSeparators.contains(String.valueOf((char)primaryCode))){
            char code = (char) primaryCode;
            if (Character.isLetter(code) && firstCaps || Character.isLetter(code) && Variables.isShift()) {
                code = Character.toUpperCase(code);
            }
            getCurrentInputConnection().setComposingRegion(0,0);
            getCurrentInputConnection().commitText(String.valueOf(code), 1);
            firstCaps = false;
            setCapsOn(false);
        }
        if(!mPredictionOn){
            char code = (char) primaryCode;
            if (Character.isLetter(code) && firstCaps || Character.isLetter(code) && Variables.isShift()) {
                code = Character.toUpperCase(code);
            }
            getCurrentInputConnection().setComposingRegion(0,0);
            getCurrentInputConnection().commitText(String.valueOf(code), 1);
            firstCaps = false;
            setCapsOn(false);
        }
    }

    private void handleClose() {
        commitTyped(getCurrentInputConnection());
        requestHideSelf(0);
        mInputView.closing();
    }

    private IBinder getToken() {
        final Dialog dialog = getWindow();
        if (dialog == null) {
            return null;
        }
        final Window window = dialog.getWindow();
        if (window == null) {
            return null;
        }
        return window.getAttributes().token;
    }

    private void handleLanguageSwitch() {
        mInputMethodManager.switchToNextInputMethod(getToken(), false /* onlyCurrentIme */);
    }

    private void checkToggleCapsLock() {
        long now = System.currentTimeMillis();
        if (mLastShiftTime + 800 > now) {
            mCapsLock = !mCapsLock;
            mLastShiftTime = 0;
        } else {
            mLastShiftTime = now;
        }
    }

    private String getWordSeparators() {
        return mWordSeparators;
    }

    public boolean isWordSeparator(String s) {

       if(s.contains(". ") || s.contains("? ") || s.contains("! ")){
           return true;
       }

       return false;

    }

    public void pickDefaultCandidate() {
        pickSuggestionManually(0);
    }

    public void pickSuggestionManually(int index) {
        if (mCompletionOn && mCompletions != null && index >= 0
                && index < mCompletions.length) {
            CompletionInfo ci = mCompletions[index];
            getCurrentInputConnection().commitCompletion(ci);
            if (mCandidateView != null) {
                mCandidateView.clear();
            }
            updateShiftKeyState(getCurrentInputEditorInfo());
        } else if (mComposing.length() > 0) {

            if (mPredictionOn && mSuggestions != null && index >= 0) {
                mComposing.replace(0, mComposing.length(), mSuggestions.get(index));
            }
            commitTyped(getCurrentInputConnection());

        }
    }

    public void onPress(int primaryCode) {
        if(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("vib", false)) {
            Vibrator v = (Vibrator) getBaseContext().getSystemService(Context.VIBRATOR_SERVICE);
            v.vibrate(40);
        }
    }


    public void onRelease(int primaryCode) {

    }
    /**
     * http://www.tutorialspoint.com/android/android_spelling_checker.htm
     * Sort of copy-paste, huh.
     *
     * I need to find time to refine this code
     *
     *
     * @param results results
     */
    @Override
    public void onGetSuggestions(SuggestionsInfo[] results) {
        final StringBuilder sb = new StringBuilder();

        for (SuggestionsInfo result : results) {
            // Returned suggestions are contained in SuggestionsInfo
            final int len = result.getSuggestionsCount();
            sb.append('\n');

            for (int j = 0; j < len; ++j) {
                sb.append(",").append(result.getSuggestionAt(j));
            }

            sb.append(" (").append(len).append(")");
        }
    }

    private void dumpSuggestionsInfoInternal(
            final List<String> sb, final SuggestionsInfo si, final int length, final int offset) {
        // Returned suggestions are contained in SuggestionsInfo
        final int len = si.getSuggestionsCount();
        for (int j = 0; j < len; ++j) {
            sb.add(si.getSuggestionAt(j));
        }
    }

    @Override
    public void onGetSentenceSuggestions(SentenceSuggestionsInfo[] results) {
       try {
           final List<String> sb = new ArrayList<>();
           for (final SentenceSuggestionsInfo ssi : results) {
               for (int j = 0; j < ssi.getSuggestionsCount(); ++j) {
                   dumpSuggestionsInfoInternal(
                           sb, ssi.getSuggestionsInfoAt(j), ssi.getOffsetAt(j), ssi.getLengthAt(j));
               }
           }

           setSuggestions(sb, true, true);
       }
       catch(Exception ignored){}

    }
    private void setCapsOn(boolean on) {

        /** Simple function that enables us to rapidly set the keyboard shifted or not.
         * */
        if(Variables.isShift()){
            kv.getKeyboard().setShifted(true);
            kv.invalidateAllKeys();
        }
        else {
            kv.getKeyboard().setShifted(on);
            kv.invalidateAllKeys();
        }

    }
    private void processKeyCombo(int keycode) {
       /** Ass the function name says, we process key combinations here*/

        if (Variables.isAnyOn()) {
            if (Variables.isCtrl() && Variables.isAlt()) {
                getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, getHardKeyCode(keycode), 0, KeyEvent.META_CTRL_ON | KeyEvent.META_ALT_ON));
                getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_UP, getHardKeyCode(keycode), 0, KeyEvent.META_CTRL_ON | KeyEvent.META_ALT_ON));
            } else {
                if (Variables.isCtrl()) {
                    getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, getHardKeyCode(keycode), 0, KeyEvent.META_CTRL_ON));
                    getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_UP, getHardKeyCode(keycode), 0, KeyEvent.META_CTRL_ON));
                }
                if (Variables.isAlt()) {
                    getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, getHardKeyCode(keycode), 0, KeyEvent.META_ALT_ON));
                    getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_UP, getHardKeyCode(keycode), 0, KeyEvent.META_ALT_ON));
                }
            }
        }

    }
    private int getHardKeyCode(int keycode) {
       /** Seems like the actual soft key code doesn't match the hard key code*/
        PopupWindow p = new PopupWindow();
        char code = (char) keycode;
        switch (String.valueOf(code)) {
            case "a":
                return KeyEvent.KEYCODE_A;
            case "b":
                return KeyEvent.KEYCODE_B;
            case "c":
                return KeyEvent.KEYCODE_C;

            case "d":
                return KeyEvent.KEYCODE_D;

            case "e":
                return KeyEvent.KEYCODE_E;

            case "f":
                return KeyEvent.KEYCODE_F;


            case "g":
                return KeyEvent.KEYCODE_G;

            case "h":
                return KeyEvent.KEYCODE_H;

            case "i":
                return KeyEvent.KEYCODE_I;

            case "j":
                return KeyEvent.KEYCODE_J;


            case "k":
                return KeyEvent.KEYCODE_K;

            case "l":
                return KeyEvent.KEYCODE_L;

            case "m":
                return KeyEvent.KEYCODE_M;

            case "n":
                return KeyEvent.KEYCODE_N;

            case "o":
                return KeyEvent.KEYCODE_O;

            case "p":
                return KeyEvent.KEYCODE_P;


            case "q":
                return KeyEvent.KEYCODE_Q;

            case "r":
                return KeyEvent.KEYCODE_R;


            case "s":
                return KeyEvent.KEYCODE_S;

            case "t":
                return KeyEvent.KEYCODE_T;

            case "u":
                return KeyEvent.KEYCODE_U;

            case "v":
                return KeyEvent.KEYCODE_V;


            case "w":
                return KeyEvent.KEYCODE_W;

            case "x":
                return KeyEvent.KEYCODE_X;

            case "y":
                return KeyEvent.KEYCODE_Y;

            case "z":
                return KeyEvent.KEYCODE_Z;
            default:
                return keycode;
        }
    }

    private void handleAction() {
        EditorInfo curEditor = getCurrentInputEditorInfo();
        switch (curEditor.imeOptions & EditorInfo.IME_MASK_ACTION) {
            case EditorInfo.IME_ACTION_DONE:
                getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_DONE);
                break;
            case EditorInfo.IME_ACTION_GO:
                getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_GO);
                break;
            case EditorInfo.IME_ACTION_NEXT:
                getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_NEXT);
                break;
            case EditorInfo.IME_ACTION_SEARCH:
                getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_SEARCH);
                break;
            case EditorInfo.IME_ACTION_SEND:

                getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_SEND);

                break;
            default:

                break;
        }
    }

    public void setTheme() {
        switch (PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getString("theme", "2")) {
            case "1":
                mDefaultFilter = sNoneColorArray;
                break;
            case "2":
                mDefaultFilter = sNegativeColorArray;
                break;
            case "3":
                mDefaultFilter = sBlueWhiteColorArray;
                break;
            case "4":
                mDefaultFilter = sBlueBlackColorArray;
                break;
            case "5":
                mDefaultFilter = sRedWhiteColorArray;
                break;
            case "6":
                mDefaultFilter = sRedBlackColorArray;
                break;
            case "7":
                mDefaultFilter = sOrangeBlackColorArray;
                break;
            case "8":
                mDefaultFilter = sMaterialDarkColorArray;
                break;

        }
    }
    private void setInputType() {

        /** Checks the preferences for the default keyboard layout.
         * If standard, we start out whether in standard or numbers, depending on the input type.
         * */

        EditorInfo attribute = getCurrentInputEditorInfo();

        if (PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getString("start", "1").equals("1")) {
            switch (attribute.inputType & InputType.TYPE_MASK_CLASS) {
                case InputType.TYPE_CLASS_NUMBER:
                case InputType.TYPE_CLASS_DATETIME:
                case InputType.TYPE_CLASS_PHONE:
                    currentKeyboard = new LatinKeyboard(this, R.xml.numbers);
                    break;
                case InputType.TYPE_CLASS_TEXT:
                    int webInputType = attribute.inputType & InputType.TYPE_MASK_VARIATION;

                    if (webInputType == InputType.TYPE_TEXT_VARIATION_URI ||
                            webInputType == InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT ||
                            webInputType == InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS
                            || webInputType == InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS) {
                        currentKeyboard = new LatinKeyboard(this, standardKeyboardID);
                    } else {
                        currentKeyboard = new LatinKeyboard(this, standardKeyboardID);
                    }

                    break;

                default:
                    currentKeyboard = new LatinKeyboard(this, standardKeyboardID);
                    break;
            }
        } else {
            setDefaultKeyboard();
        }
        if (kv != null) {
            kv.setKeyboard(currentKeyboard);
        }
    }
    public void setDefaultKeyboard() {
        switch (PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getString("start", "1")) {
            case "1":
                currentKeyboard = standardKeyboard;
                break;
            case "2":
                currentKeyboard = new LatinKeyboard(this, R.xml.arrow_keys);
                setRowNumber(4);
                currentKeyboard.setRowNumber(getRowNumber());
                break;
            case "3":
                currentKeyboard = new LatinKeyboard(this, R.xml.programming);
                setRowNumber(5);
                currentKeyboard.setRowNumber(getRowNumber());
                break;
        }
    }
    private void capsOnFirst() {

        /** Huh, a method that calls getCursorCapsMode() and performs a check.
         * Accordingly to the official android documentation, if the caps mode is not equal to 0,
         * We should start in caps mode. Although, tests have proven that additionally checks are needed.
         * I'll see what I can do on this.
         * */
        if(PreferenceManager.getDefaultSharedPreferences(this).getBoolean("caps",true)){
            if (getCursorCapsMode(getCurrentInputConnection(), getCurrentInputEditorInfo()) != 0) {
                firstCaps = true;
                setCapsOn(true);
            }
        }
        else {
            firstCaps = false;
            setCapsOn(false);
        }

    }
    private int getCursorCapsMode(InputConnection ic, EditorInfo attr) {

        /** A rudimentary method to find out whether we should start with caps on or not.
         * */
        // TODO: Perform additional checks.

        int caps = 0;
        EditorInfo ei = getCurrentInputEditorInfo();
        if (ei != null && ei.inputType != EditorInfo.TYPE_NULL) {
            caps = ic.getCursorCapsMode(attr.inputType);
        }
        return caps;
    }
    @Override
    public void onKey(int primaryCode, int[] keyCodes) {
        InputConnection ic = getCurrentInputConnection();


        /** Here we handle the key events. */

        switch (primaryCode) {
            case Keyboard.KEYCODE_DELETE:
               handleBackspace();
                break;
            case Keyboard.KEYCODE_SHIFT:

                /** We need to check whether we are on symbols layout or not.
                 * Then, perform the operation accordingly.
                 * Also, we check for double tab on the shift, and, if detected
                 * We set a global variable that tells us that the Shift is in the lock position.
                 * */

                if (isSysmbols) {
                    if (!shiftSim) {
                        currentKeyboard = new LatinKeyboard(this, R.xml.symbols2);
                        kv.setKeyboard(currentKeyboard);
                        shiftSim = true;
                    } else {
                        currentKeyboard = new LatinKeyboard(this, R.xml.symbols);
                        kv.setKeyboard(currentKeyboard);
                        shiftSim = false;
                    }
                } else {
                    if (shift_pressed + 200 > System.currentTimeMillis()){
                        Variables.setShiftOn();
                        setCapsOn(true);
                        kv.draw(new Canvas());
                    }
                    else{
                        if(Variables.isShift()){
                            Variables.setShiftOff();
                            firstCaps = false;
                            setCapsOn(firstCaps);
                            shift_pressed = System.currentTimeMillis();
                        }
                        else{
                            firstCaps = !firstCaps;
                            setCapsOn(firstCaps);
                            shift_pressed = System.currentTimeMillis();
                        }
                    }


                }
                break;
            case 10:

                /** Handle the 'done' action accordingly to the IME Options. */

                EditorInfo curEditor = getCurrentInputEditorInfo();
                switch (curEditor.imeOptions & EditorInfo.IME_MASK_ACTION) {
                    case EditorInfo.IME_ACTION_DONE:
                        keyDownUp(66);
                        break;
                    case EditorInfo.IME_ACTION_GO:
                        getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_GO);
                        break;
                    case EditorInfo.IME_ACTION_NEXT:
                        keyDownUp(66);
                        break;
                    case EditorInfo.IME_ACTION_SEARCH:
                        getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_SEARCH);
                        break;
                    case EditorInfo.IME_ACTION_SEND:
                        keyDownUp(66);
                        break;
                    default:
                       keyDownUp(66);
                        break;
                }
                break;
            case Keyboard.KEYCODE_MODE_CHANGE:

                /** Switch between standard/symbols layout. */

                if (!isSysmbols) {
                    isSysmbols = !isSysmbols;
                    currentKeyboard = new LatinKeyboard(this, R.xml.symbols);
                    kv.setKeyboard(currentKeyboard);
                } else {
                    isSysmbols = false;
                    currentKeyboard = new LatinKeyboard(this, standardKeyboardID);
                    kv.setKeyboard(currentKeyboard);
                }
                kv.getLatinKeyboard().changeKeyHeight(getHeightKeyModifier());
                break;

            case LatinKeyboard.KEYCODE_LAYUOUT_SWITCH:

                /** Language Switch is a custom value defined in the LatinKeyboard class.
                 * We use it to switch between standard/arrow keys/programming layouts. */

                if (isDpad || isProgramming) {
                    if (isProgramming) {
                        currentKeyboard = new LatinKeyboard(this, standardKeyboardID);
                        kv.invalidateAllKeys();
                        currentKeyboard.setRowNumber(getStandardRowNumber());
                        kv.setKeyboard(currentKeyboard);
                        isProgramming = false;
                        isDpad = false;
                    }

                    if (isDpad) {
                        currentKeyboard = new LatinKeyboard(this, R.xml.programming);
                        kv.invalidateAllKeys();
                        setRowNumber(5);
                        currentKeyboard.setRowNumber(getRowNumber());
                        kv.setKeyboard(currentKeyboard);
                        isDpad = false;
                        isProgramming = true;
                    }
                } else {
                    currentKeyboard = new LatinKeyboard(this, R.xml.arrow_keys);
                    kv.invalidateAllKeys();
                    setRowNumber(4);
                    currentKeyboard.setRowNumber(getRowNumber());
                    kv.setKeyboard(currentKeyboard);
                    isDpad = true;
                }
                kv.getLatinKeyboard().changeKeyHeight(getHeightKeyModifier());
                break;
            case LatinKeyboard.KEYCODE_DPAD_L:

                /** Another custom keycode. */



                    getCurrentInputConnection().sendKeyEvent(
                            new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_LEFT));
                    getCurrentInputConnection().sendKeyEvent(
                            new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_LEFT));

                break;

            case LatinKeyboard.KEYCODE_DPAD_R:

                getCurrentInputConnection().sendKeyEvent(
                        new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_RIGHT));
                getCurrentInputConnection().sendKeyEvent(
                        new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_RIGHT));
                break;
            case LatinKeyboard.KEYCODE_DPAD_U:

                getCurrentInputConnection().sendKeyEvent(
                        new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_UP));
                getCurrentInputConnection().sendKeyEvent(
                        new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_UP));
                break;
            case LatinKeyboard.KEYCODE_DPAD_DO:

                getCurrentInputConnection().sendKeyEvent(
                        new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_DOWN));
                getCurrentInputConnection().sendKeyEvent(
                        new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_DOWN));
                break;
            case LatinKeyboard.KEYCODE_ESCAPE:


                getCurrentInputConnection().sendKeyEvent(
                        new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ESCAPE, 0));
                getCurrentInputConnection().sendKeyEvent(
                        new KeyEvent(100, 100, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ESCAPE, 0));
                break;
            case LatinKeyboard.KEYCODE_CTRL:

                if (Variables.isCtrl()) {
                    Variables.setCtrlOff();
                    kv.draw(new Canvas());
                } else {
                    Variables.setCtrlOn();
                    kv.draw(new Canvas());
                }
                break;
            case LatinKeyboard.KEYCODE_ALT:

                if (Variables.isAlt()) {
                    Variables.setAltOff();
                    kv.draw(new Canvas());
                } else {
                    Variables.setAltOn();
                    kv.draw(new Canvas());
                }
                break;
            case LatinKeyboard.KEYCODE_STANDARD_SWITCH:

                /** This key enables the user to switch rapidly between standard/arrow keys layouts.*/

                currentKeyboard = new LatinKeyboard(getBaseContext(), standardKeyboardID);
                currentKeyboard.setRowNumber(getStandardRowNumber());
                kv.setKeyboard(currentKeyboard);
                kv.getLatinKeyboard().changeKeyHeight(getHeightKeyModifier());
                isDpad = false;
                break;
            case LatinKeyboard.KEYCODE_DELL_PROCESS:
                /** Procces DEL key*/

                if(Variables.isAnyOn()){
                    if(Variables.isCtrl() && Variables.isAlt()) {
                        getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL, 0, KeyEvent.META_CTRL_ON | KeyEvent.META_ALT_ON));
                    }
                    if(Variables.isAlt()){
                        getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL, 0, KeyEvent.META_ALT_ON));
                    }
                    if(Variables.isCtrl()){
                        getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL, 0, KeyEvent.META_CTRL_ON));
                    }
                }
                else{
                    getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL , 0));
                    getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL, 0));
                }
                break;
            case LatinKeyboard.KEYCODE_I_DONT_KNOW_WHY_I_PUT_THAT_HERE:

                if(Variables.isAnyOn()){
                    if(Variables.isCtrl() && Variables.isAlt()) {
                        getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_TAB, 0, KeyEvent.META_CTRL_ON | KeyEvent.META_ALT_ON));
                    }
                    if(Variables.isAlt()){
                        getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_TAB, 0, KeyEvent.META_ALT_ON));
                    }
                    if(Variables.isCtrl()){
                        getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_TAB, 0, KeyEvent.META_CTRL_ON));
                    }
                }
                else{
                    getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_TAB , 0));
                    getCurrentInputConnection().sendKeyEvent(new KeyEvent(100, 100, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_TAB, 0));
                }

                break;
            default:

                if (Variables.isAnyOn()) {
                    processKeyCombo(primaryCode);
                } else {
                    handleCharacter(primaryCode, keyCodes);
                }
        }
        try {

            /** Some text processing. Helps some guys improve their writing skills, huh*/

            if(PreferenceManager.getDefaultSharedPreferences(this).getBoolean("caps",true)) {
                if (isWordSeparator(ic.getTextBeforeCursor(2, 0).toString())) {
                    setCapsOn(true);
                    firstCaps = true;
                }
            }
        } catch (Exception e) {
        }
    }

    public short getRowNumber(){

        return rowNumber;

    }
    public void setRowNumber(int number){

        rowNumber = (short) number;
    }
    public short getStandardRowNumber(){

        if(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("arr_qrt", false) && PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("nbr_qrt", false)){
            return 5;
        }
        else{
            if(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("arr_qrt", false)){
                return 4;
            }
            else if(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("nbr_qrt", false)){
                return 5;
            }
            else {
                 return 4;
            }
        }

    }
    public void setStandardKeyboard(){

        int layout = Integer.parseInt(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getString("layout", "1"));

        if(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("arr_qrt", false) && PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("nbr_qrt", false)){
            switch (layout) {
                case 2:
                    standardKeyboardID = R.xml.azerty_arrow_numbers;
                    break;
                case 3:
                    standardKeyboardID = R.xml.qwertz_arrow_numbers;
                    break;
                default:
                    standardKeyboardID = R.xml.qwerty_arrow_numbers;
            }
            setRowNumber(5);
        }
        else{
            if(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("arr_qrt", false)){
                switch (layout) {
                    case 2:
                        standardKeyboardID = R.xml.azerty_arrows;
                        break;
                    case 3:
                        standardKeyboardID = R.xml.qwertz_arrows;
                        break;
                    default:
                        standardKeyboardID = R.xml.qwerty_arrows;
                }
                setRowNumber(4);
            }
            else if(PreferenceManager.getDefaultSharedPreferences(getBaseContext()).getBoolean("nbr_qrt", false)){
                switch (layout) {
                    case 2:
                        standardKeyboardID = R.xml.azerty_numbers;
                        break;
                    case 3:
                        standardKeyboardID = R.xml.qwertz_numbers;
                        break;
                    default:
                        standardKeyboardID = R.xml.qwerty_numbers;
                }
                setRowNumber(5);
            }
            else {
                switch (layout) {
                    case 2:
                        standardKeyboardID = R.xml.azerty;
                        break;
                    case 3:
                        standardKeyboardID = R.xml.qwertz;
                        break;
                    default:
                        standardKeyboardID = R.xml.qwerty;
                }
                setRowNumber(4);
            }
        }
    }
    public double getHeightKeyModifier() {

        return (double)PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getInt("height", 50) / (double)50;
    }
}


================================================
FILE: app/src/main/java/com/vlath/keyboard/Preference.java
================================================
package com.vlath.keyboard;

import android.app.FragmentManager;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;

/**
 * Created by Vlad on 6/20/2017.
 */

public class Preference extends ActionBarActivity {
   @Override
    public void onCreate(Bundle h){
       super.onCreate(h);
       setContentView(R.layout.pref);
       getFragmentManager().beginTransaction().replace(R.id.main, new PreferenceFragment()).commit();
   }
}


================================================
FILE: app/src/main/java/com/vlath/keyboard/PreferenceFragment.java
================================================
package com.vlath.keyboard;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.*;
import android.preference.Preference;

/**
 * Created by todo on 30.06.2017.
 */

public class PreferenceFragment extends android.preference.PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener {

    ListPreference listTheme;
    ListPreference listStart;
    ListPreference listLayout;
    @Override
    public void onCreate(Bundle s){
        super.onCreate(s);
        addPreferencesFromResource(R.xml.ime_preferences);
        listTheme = (ListPreference) findPreference("theme");
        listStart = (ListPreference) findPreference("start");
        listLayout = (ListPreference) findPreference("layout");
        listTheme.setSummary(listTheme.getEntry());
        listStart.setSummary(listStart.getEntry());
        listLayout.setSummary(listLayout.getEntry());
        PreferenceManager.getDefaultSharedPreferences(getActivity().getBaseContext()).registerOnSharedPreferenceChangeListener(this);
    }


    @Override
    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) {
        listTheme.setSummary(listTheme.getEntry());
        listStart.setSummary(listStart.getEntry());
        listLayout.setSummary(listLayout.getEntry());
    }
}


================================================
FILE: app/src/main/java/com/vlath/keyboard/SeekPreference.java
================================================
package com.vlath.keyboard;

/**
 * Created by todo on 01.12.2017.
 */

import android.content.Context;
import android.content.res.TypedArray;
import android.preference.Preference;
import android.util.AttributeSet;
import android.view.View;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;

public class SeekPreference extends Preference implements OnSeekBarChangeListener {
    private SeekBar mSeekBar;
    private int mProgress;

    public SeekPreference(Context context) {
        this(context, null, 0);
    }

    public SeekPreference(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public SeekPreference(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        setLayoutResource(R.layout.seek_dialog);
    }

    @Override
    protected void onBindView(View view) {
        super.onBindView(view);
        mSeekBar = (SeekBar) view.findViewById(R.id.seekbar);
        mSeekBar.setProgress(mProgress);
        mSeekBar.setOnSeekBarChangeListener(this);
    }

    @Override
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
        if (!fromUser)
            return;

        setValue(progress);
    }

    @Override
    public void onStartTrackingTouch(SeekBar seekBar) {
        // not used
    }

    @Override
    public void onStopTrackingTouch(SeekBar seekBar) {
        // not used
    }

    @Override
    protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
        setValue(restoreValue ? getPersistedInt(mProgress) : (Integer) defaultValue);
    }

    public void setValue(int value) {
        if (shouldPersist()) {
            persistInt(value);
        }

        if (value != mProgress) {
            mProgress = value;
            notifyChanged();
        }
    }

    @Override
    protected Object onGetDefaultValue(TypedArray a, int index) {
        return a.getInt(index, 0);
    }
}

================================================
FILE: app/src/main/java/com/vlath/keyboard/Variables.java
================================================
package com.vlath.keyboard;

/**
 * Created by Vlad on 6/22/2017.
 */

public  class Variables {


    /**
     * Here we handle global variables
     */
    private static boolean IS_CTRL = false;
    private static boolean IS_ALT = false;
    private static boolean IS_SHIFT = false;


    public static boolean isAnyOn() {
        return IS_CTRL || IS_ALT;
    }

    public static boolean isCtrl() {
        return IS_CTRL;
    }

    public static boolean isAlt() {
        return IS_ALT;
    }

    public static void setIsCtrl(boolean on) {
        IS_CTRL = on;
    }


    public static void setIsAlt(boolean on) {
        IS_ALT = on;
    }

    public static void setAltOn() {
        IS_ALT = true;
    }

    public static void setAltOff() {
        IS_ALT = false;
    }

    public static void setCtrlOn() {
        IS_CTRL = true;
    }

    public static void setCtrlOff() {
        IS_CTRL = false;
    }

    public static void setShiftOn() {
        IS_SHIFT = true;
    }

    public static void setShiftOff() {
        IS_SHIFT = false;
    }

    public static boolean isShift() {
        return IS_SHIFT;
    }



}





================================================
FILE: app/src/main/res/drawable/key_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- Non focused states -->
    <item
        android:state_focused="false"
        android:state_selected="false"
        android:state_pressed="false"
        android:drawable="@drawable/normal" />
    <!-- Pressed state -->
    <item
        android:state_pressed="true"
        android:drawable="@drawable/press" />
</selector>

================================================
FILE: app/src/main/res/drawable/key_background_back.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- Non focused states -->
    <item
        android:state_focused="false"
        android:state_selected="false"
        android:state_pressed="false"
        android:drawable="@drawable/round_corners" />
    <!-- Pressed state -->
    <item
        android:state_pressed="true"
        android:drawable="@drawable/press" />
</selector>

================================================
FILE: app/src/main/res/drawable/normal.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:left="2dp" android:right="2dp">
        <shape android:shape="rectangle">
            <solid android:color="@color/black" />
        </shape>
    </item>
    <item android:bottom="2dp">
        <shape android:shape="rectangle">
            <solid android:color="@color/black" />
        </shape>
    </item>
</layer-list>

================================================
FILE: app/src/main/res/drawable/preview_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" >

    <solid android:color="#f1f1f1" />

    <corners android:radius="5dip" />

    <stroke
        android:width="1dp"
        android:color="#f1f1f1" />

</shape>

================================================
FILE: app/src/main/res/drawable/round_corners.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/gray_dark"/>

    <stroke android:width="1dp"
        android:color="#ff000000" />

    <padding android:left="1dp"
        android:top="1dp"
        android:right="1dp"
        android:bottom="1dp" />

    <corners android:bottomRightRadius="5dp"
        android:bottomLeftRadius="5dp"
        android:topLeftRadius="5dp"
        android:topRightRadius="5dp" />
</shape>

================================================
FILE: app/src/main/res/layout/activate.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

    <Button
        android:id="@+id/enable"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@+id/settings"
        android:layout_alignBottom="@+id/settings"
        android:layout_alignEnd="@+id/textView"
        android:layout_marginEnd="37dp"
        android:onClick="enable"
        android:text="Enable" />

    <Button
        android:id="@+id/select"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@+id/enable"
        android:layout_alignBottom="@+id/enable"
        android:layout_centerHorizontal="true"
        android:onClick="select"
        android:text="Select" />

    <Button
        android:id="@+id/settings"
        android:onClick="settings"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignStart="@+id/textView"
        android:layout_below="@+id/textView"
        android:layout_marginStart="32dp"
        android:layout_marginTop="37dp"
        android:text="Settings" />


    <EditText
        android:id="@+id/editText"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_below="@+id/settings"
        android:layout_marginTop="17dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:ems="10"
        android:hint="Test your keyboard here"
        android:inputType="textPersonName" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="19dp"
        android:layout_marginRight="8dp"
        android:layout_marginLeft="8dp"
        android:text="@string/activate" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_marginRight="8dp"
        android:layout_marginLeft="8dp"
        android:layout_below="@+id/editText"
        android:layout_marginTop="19dp"
        android:text="@string/license" />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignEnd="@+id/select"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="12dp"
        android:text="@string/version"
        android:textStyle="bold" />

</RelativeLayout>

================================================
FILE: app/src/main/res/layout/keyboard.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<com.vlath.keyboard.CustomKeyboard
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/keyboard"
    android:layout_alignParentBottom="true"
    android:paddingTop="0dp"
    android:layout_marginTop="20dp"
    android:layout_width="match_parent"
    android:keyPreviewLayout="@null"
    android:layout_height="wrap_content"
    android:keyBackground="@drawable/key_background"
    android:popupLayout="@layout/preview"
    android:keyPreviewOffset="5dp"
    android:keyTextColor="@color/text"
    android:shadowColor="@android:color/transparent"
    android:shadowRadius="0.0"
    android:background="@color/black">
    </com.vlath.keyboard.CustomKeyboard>

================================================
FILE: app/src/main/res/layout/keyboard_key_back.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<com.vlath.keyboard.CustomKeyboard
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/keyboard"
    android:layout_alignParentBottom="true"
    android:paddingTop="0dp"
    android:layout_marginTop="20dp"
    android:layout_width="match_parent"
    android:keyPreviewLayout="@null"
    android:layout_height="wrap_content"
    android:keyBackground="@drawable/key_background_back"
    android:popupLayout="@layout/preview"
    android:keyPreviewOffset="5dp"
    android:keyTextColor="@color/text"
    android:shadowColor="@android:color/transparent"
    android:shadowRadius="0.0"
    android:background="@color/black">
</com.vlath.keyboard.CustomKeyboard>

================================================
FILE: app/src/main/res/layout/main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <LinearLayout
        android:id="@+id/layoutDots"
        android:layout_width="match_parent"
        android:layout_height="@dimen/dots_height"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="@dimen/dots_margin_bottom"
        android:gravity="center"
        android:orientation="horizontal"/>

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:alpha=".5"
        android:layout_above="@id/layoutDots"
        android:background="@android:color/white" />

    <Button
        android:id="@+id/btn_next"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:background="@null"
        android:text="Next"
        android:textColor="@android:color/white" />

    <Button
        android:id="@+id/btn_skip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:background="@null"
        android:text="Skip"
        android:textColor="@android:color/white" />

</RelativeLayout>


================================================
FILE: app/src/main/res/layout/popup.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:background="@drawable/round_corners"
    android:textStyle="bold"
    android:textSize="30sp"
    >
</TextView>

================================================
FILE: app/src/main/res/layout/pref.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:id="@+id/main"
              android:layout_height="match_parent">

</LinearLayout>

================================================
FILE: app/src/main/res/layout/preview.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:background="#FFF"
    >
    <android.inputmethodservice.KeyboardView
        android:id="@android:id/keyboardView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:popupLayout="@layout/preview"
        android:keyBackground="@drawable/key_background"
        android:keyPreviewLayout="@null"
        android:keyTextColor="#fff"
        android:background="#a5a7aa"
        android:keyTextSize="22sp"/>
    <ImageButton android:id="@android:id/closeButton"
                 android:background="@android:color/transparent"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
                 android:layout_marginStart="8dp"
                 android:layout_marginEnd="8dp"
                 android:clickable="true"
                 android:src="@drawable/ic_close" />
</LinearLayout>

================================================
FILE: app/src/main/res/layout/seek_dialog.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_vertical">

    <TextView
        android:id="@android:id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="20"
        android:textSize="18sp"
        />

    <SeekBar
        android:id="@+id/seekbar"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="80" />


</LinearLayout>

================================================
FILE: app/src/main/res/layout/slide1.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bg_screen1">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <ImageView
            android:layout_width="@dimen/img_width_height"
            android:layout_height="@dimen/img_width_height"
            android:src="@drawable/icon" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/welcome"
            android:textColor="@android:color/white"
            android:textSize="@dimen/slide_title"
            android:textStyle="bold" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:paddingLeft="@dimen/desc_padding"
            android:paddingRight="@dimen/desc_padding"
            android:text="@string/welcome_desc"
            android:textAlignment="center"
            android:textColor="@android:color/white"
            android:textSize="@dimen/slide_desc" />

    </LinearLayout>
</RelativeLayout>

================================================
FILE: app/src/main/res/layout/slide2.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bg_screen2">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <ImageView
            android:layout_width="@dimen/img_width_height"
            android:layout_height="@dimen/img_width_height"
            android:src="@drawable/second" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/multiple_title"
            android:textColor="@android:color/white"
            android:textSize="@dimen/slide_title"
            android:textStyle="bold" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:paddingLeft="@dimen/desc_padding"
            android:paddingRight="@dimen/desc_padding"
            android:text="@string/multiple_desc"
            android:textAlignment="center"
            android:textColor="@android:color/white"
            android:textSize="@dimen/slide_desc" />

    </LinearLayout>


</RelativeLayout>

================================================
FILE: app/src/main/res/layout/slide3.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bg_screen3">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <ImageView
            android:layout_width="@dimen/img_width_height"
            android:layout_height="@dimen/img_width_height"
            android:src="@drawable/third" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/open_title"
            android:textColor="@android:color/white"
            android:textSize="@dimen/slide_title"
            android:textStyle="bold" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:paddingLeft="@dimen/desc_padding"
            android:paddingRight="@dimen/desc_padding"
            android:text="@string/open_desc"
            android:textAlignment="center"
            android:textColor="@android:color/white"
            android:textSize="@dimen/slide_desc" />

    </LinearLayout>


</RelativeLayout>

================================================
FILE: app/src/main/res/layout/slide4.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bg_screen4">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <ImageView
            android:layout_width="@dimen/img_width_height"
            android:layout_height="@dimen/img_width_height"
            android:src="@drawable/fourth" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/free_title"
            android:textColor="@android:color/white"
            android:textSize="@dimen/slide_title"
            android:textStyle="bold" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:paddingLeft="@dimen/desc_padding"
            android:paddingRight="@dimen/desc_padding"
            android:text="@string/free_desc"
            android:textAlignment="center"
            android:textColor="@android:color/white"
            android:textSize="@dimen/slide_desc" />

    </LinearLayout>


</RelativeLayout>

================================================
FILE: app/src/main/res/values/attr.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <attr name="keyBackColor" format="color|reference"/>
    <attr name="boardBackColor" format="color|reference"/>
</resources>

================================================
FILE: app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#3F51B5</color>
    <color name="colorPrimaryDark">#303F9F</color>
    <color name="colorAccent">#FF4081</color>
    <color name="black">@android:color/black</color>
    <color name="green">#4CAF50</color>
    <color name="blue">#42A5F5</color>
    <color name="red">#EF5350</color>
    <color name="cyan">#26C6DA</color>
    <color name="teal">#26A69A</color>
    <color name="amber">#FFC107</color>
    <color name="lime">#D4E157</color>
    <color name="purple">#AB47BC</color>
    <color name="white">#FFFF</color>
    <color name="gray">#424242</color>
    <color name="gray_dark">#212121</color>
    <color name="text">#a5a7aa</color>
    <color name="candidate_normal">#FF000000</color>
    <color name="candidate_recommended">#000000</color>
    <color name="candidate_other">#ff808080</color>
    <color name="candidate_background">#bbffffff</color>

     <!-- Screens background color-->
    <color name="bg_screen1">#009688</color>
    <color name="bg_screen2">#00bcd4</color>
    <color name="bg_screen3">#4caf50</color>
    <color name="bg_screen4">#8bc34a</color>

    <!-- dots inactive colors -->
    <color name="dot_dark_screen1">#00897b</color>
    <color name="dot_dark_screen2">#00acc1</color>
    <color name="dot_dark_screen3">#43a047</color>
    <color name="dot_dark_screen4">#7cb342</color>

    <!-- dots active colors -->
    <color name="dot_light_screen1">#26a69a</color>
    <color name="dot_light_screen2">#26c6da</color>
    <color name="dot_light_screen3">#66bb6a</color>
    <color name="dot_light_screen4">#9ccc65</color>

    <array name="array_dot_active">
        <item>@color/dot_light_screen1</item>
        <item>@color/dot_light_screen2</item>
        <item>@color/dot_light_screen3</item>
        <item>@color/dot_light_screen4</item>
    </array>

    <array name="array_dot_inactive">
        <item>@color/dot_dark_screen1</item>
        <item>@color/dot_dark_screen2</item>
        <item>@color/dot_dark_screen3</item>
        <item>@color/dot_dark_screen4</item>
    </array>

</resources>


================================================
FILE: app/src/main/res/values/dimens.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
     <dimen name="key_height">52dip</dimen>
     <dimen name="candidate_font_height">20sp</dimen>
     <dimen name="candidate_vertical_padding">16sp</dimen>
     <dimen name="activity_horizontal_margin">16dp</dimen>
     <dimen name="activity_vertical_margin">16dp</dimen>
     <dimen name="fab_margin">16dp</dimen>
     <dimen name="dots_height">30dp</dimen>
     <dimen name="dots_margin_bottom">20dp</dimen>
     <dimen name="img_width_height">120dp</dimen>
     <dimen name="slide_title">30dp</dimen>
     <dimen name="slide_desc">16dp</dimen>
     <dimen name="desc_padding">40dp</dimen>

</resources>

================================================
FILE: app/src/main/res/values/strings.xml
================================================
<resources>
    <string name="app_name">BeHe Keyboard</string>
    <string name="subtype_generic">%s</string>
    <string name="welcome">Welcome to BeHe!</string>
    <string name="activate">Please click the enable button below to navigate to keyboard settings. Find BeHe Keyboard in the list and enable it. A warning dialog will appear, click ok. BeHe Keyboard does NOT collect any data. Then, navigate back and click the select button below and choose BeHe Keyboard from the list. After that you can test the keyboard using the text field below. To open the settings, tap the button below and click on BeHe Keyboard.  \n\nSpecial thanks to Matt and Thomas for donating!</string>
    <string name="donate">If you like the app, please consider supporting me. Thanks!</string>
    <string name="up">Stay up to date</string>
    <string name="follow">Follow me on Twitter to find news about my apps. @VlathXDA</string>
    <string name="version" translatable="false">Version 1.1.2</string>
    <string name="caps">Auto capitalization</string>
    <string name="vib">Vibrate on key press</string>
    <string name="borders">Key borders</string>
    <string name="prediction" translatable="false" >Enable text prediction</string>
    <string name="welcome_desc" translatable="false">Enjoy a full-fledged PC keyboard on your android device</string>
    <string name="multiple_desc" translatable="false">Switch easily between three keyboard faces, all with adjustable height</string>
    <string name="multiple_title" translatable="false">Multiple faces</string>
    <string name="open_desc" translatable="false">No spying, no data collecting. All the source code can be found on GitHub</string>
    <string name="open_title" translatable="false">Open source</string>
    <string name="free_title" translatable="false">Totally free</string>
    <string name="free_desc" translatable="false">If you want, you can support me by donating. E-mail me for details</string>
    <string name="license" translatable="false">BeHe Keyboard is licensed under Apache License 2.0. A copy of the license can be found <a href="https://www.apache.org/licenses/LICENSE-2.0">here.</a> \n\nAlso, the source code is hosted on <a href="https://github.com/VladThodo/behe-keyboard">GitHub.</a> \n\n Got any problems or suggestions? <a href="mailto:vladtodosin@gmail.com?subject=BeHe Keyboard">E-mail me!</a></string>
    <string name="git" translatable="false">Also, the source code is hosted on <a href="">GitHub</a></string>
    <string-array name="color_values">
        <item name="1">1</item>
        <item name="2">2</item>
        <item name="3">3</item>
        <item name="4">4</item>
        <item name="5">5</item>
        <item name="6">6</item>
        <item name="7">7</item>
        <item name="7">8</item>
    </string-array>

    <string-array name="color">
        <item name="1">Black - white text</item>
        <item name="2">White - black text</item>
        <item name="3">Blue - white text</item>
        <item name="4">Blue - black text</item>
        <item name="5">Red - white text</item>
        <item name="6">Red - black text</item>
        <item name="7">Orange - white text</item>
        <item name="7">Material Dark - white text</item>
    </string-array>

    <string-array name="start">
        <item name="1">Standard</item>
        <item name="2">Arrow Keys</item>
        <item name="3">Programming</item>
    </string-array>
    <string-array name="start_values">
        <item name="1">1</item>
        <item name="2">2</item>
        <item name="3">3</item>
    </string-array>

    <string-array name="layout">
        <item name="1">QWERTY (en-us)</item>
        <item name="2">AZERTY (fr-fr)</item>
        <item name="3">QWERTZ (de-de)</item>
    </string-array>
    <string-array name="layout_values">
        <item name="1">1</item>
        <item name="2">2</item>
        <item name="3">3</item>
    </string-array>
    <string name="word_separators" translatable="false">\u0020.,;:!?\n()[]*&amp;@{}/&lt;&gt;_+=|&quot;</string>
</resources>


================================================
FILE: app/src/main/res/values/styles.xml
================================================
<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

    <style name="AppTheme.AppBarOverlay" parent="Theme.AppCompat.Light.DarkActionBar">

        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>

    </style>

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>


================================================
FILE: app/src/main/res/values-pt-rBR/strings.xml
================================================
<resources>
    <string name="app_name">Teclado BeHe</string>
    <string name="subtype_generic">%s</string>
    <string name="welcome">Bem-vindo ao Teclado BeHe!</string>
    <string name="activate">Por favor, clique no botão \"Ativar\" abaixo para navegar até as configurações do teclado. Encontre o teclado BeHe na lista e habilite-o. Uma aviso aparecerá, clique em OK. O Teclado BeHe NÃO coleta nenhum dado. Em seguida, navegue de volta,  clique no botão \"Selecionar\" abaixo e escolha o Teclado BeHe na lista. Depois disso, você pode testar o teclado usando o campo de texto abaixo. Para abrir as configurações, toque no botão abaixo e clique em Teclado BeHe.</string>
    <string name="donate">Se você gosta do aplicativo, considere me apoiar. Obrigado!</string>
    <string name="up">Mantenha-se atualizado</string>
    <string name="follow">Siga-me no Twitter para encontrar novidade sobre meus aplicativos. @VlathXDA</string>
    
    <!-- Should be unstranslatable -->

    
    <string name="caps">Auto capitalização</string>
    <string name="vib">Vibrar ao pressionar uma tecla</string>
    <string name="borders">Bordas do teclado</string>
    
    <string-array name="color_values">
        <item name="1">1</item>
        <item name="2">2</item>
        <item name="3">3</item>
        <item name="4">4</item>
        <item name="5">5</item>
        <item name="6">6</item>
        <item name="7">7</item>
        <item name="7">8</item>
    </string-array>

    <string-array name="color">
        <item name="1">Preto - texto branco</item>
        <item name="2">Branco - texto preto</item>
        <item name="3">Azul - texto branco</item>
        <item name="4">Azul - black text</item>
        <item name="5">Vermelho - texto branco</item>
        <item name="6">Vermelho - texto preto</item>
        <item name="7">Laranja - texto branco</item>
        <item name="7">Material Escuro - texto branco</item>
    </string-array>

    <string-array name="start">
        <item name="1">QWERTY</item>
        <item name="2">Teclas de seta</item>
        <item name="3">Programação</item>
    </string-array>
    
    <string-array name="start_values">
        <item name="1">1</item>
        <item name="2">2</item>
        <item name="3">3</item>
    </string-array>

</resources>


================================================
FILE: app/src/main/res/xml/arrow_keys.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
          android:keyWidth="10%p"
          android:horizontalGap="0px"
          android:verticalGap="0px"
          android:keyHeight="9%p">

    <Row>
        <Key android:codes="131" android:keyLabel="F1" android:keyEdgeFlags="left"/>
        <Key android:codes="132" android:keyLabel="F2"/>
        <Key android:codes="133" android:keyLabel="F3"/>
        <Key android:codes="134" android:keyLabel="F4"/>
        <Key android:codes="-107" android:keyIcon="@drawable/ic_keyboard_arrow_up" android:isRepeatable="true" android:keyWidth="20%p"/>
        <Key android:codes="135" android:keyLabel="F5"/>
        <Key android:codes="136" android:keyLabel="F6"/>
        <Key android:codes="137" android:keyLabel="F7"/>
        <Key android:codes="138" android:keyLabel="F8" android:keyEdgeFlags="right"/>
    </Row>

    <Row>
        <Key android:codes="139" android:keyLabel="F9" android:keyEdgeFlags="left"/>
        <Key android:codes="140" android:keyLabel="F10"/>
        <Key android:codes="-108" android:keyIcon="@drawable/ic_keyboard_arrow_left" android:isRepeatable="true" android:keyWidth="20%p"/>
        <Key android:codes="-4" android:keyLabel="OK" android:keyWidth="20%p"/>
        <Key android:codes="-111" android:keyIcon="@drawable/ic_keyboard_arrow_right" android:isRepeatable="true" android:keyWidth="20%p"/>
        <Key android:codes="-5"  android:keyWidth="18%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace"/>
    </Row>

    <Row>
        <Key android:codes="-113" android:keyLabel="CTRL" android:keyEdgeFlags="left" android:keyWidth="20%p" />
        <Key android:codes="-114" android:keyLabel="ALT" android:keyWidth="20%p"/>
        <Key android:codes="-109" android:keyIcon="@drawable/ic_keyboard_arrow_down" android:isRepeatable="true" android:keyWidth="20%p"/>
        <Key android:codes="-122" android:keyLabel="TAB"  android:keyWidth="20%p" />
        <Key android:codes="-121" android:keyLabel="DEL" android:keyWidth="20%p"/>
    </Row>

    <Row>
        <Key android:codes="-101" android:keyIcon="@drawable/ic_more_horiz" android:keyWidth="10%p"/>
        <Key android:codes="-117" android:keyLabel="ABC" android:keyWidth="10%p"/>
        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
             android:keyWidth="46.154%p"/>
        <Key android:codes="46" android:keyLabel="."/>
        <Key android:codes="10"  android:keyWidth="15%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>
    </Row>

</Keyboard>

================================================
FILE: app/src/main/res/xml/azerty.xml
================================================

<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="10%p"
    android:horizontalGap="0px"
    android:verticalGap="0px"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="97" android:keyLabel="a" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="àâæ"/>
        <Key android:codes="122" android:keyLabel="z"/>
        <Key android:codes="101" android:keyLabel="e" android:popupKeyboard="@xml/popup_template" android:popupCharacters="éèêë"/>
        <Key android:codes="114" android:keyLabel="r"/>
        <Key android:codes="116" android:keyLabel="t"/>
        <Key android:codes="121" android:keyLabel="y" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ÿ" />
        <Key android:codes="117" android:keyLabel="u" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ùûü"/>
        <Key android:codes="105" android:keyLabel="i" android:popupKeyboard="@xml/popup_template" android:popupCharacters="îï"/>
        <Key android:codes="111" android:keyLabel="o" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ôœ" />
        <Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right"/>
    </Row>
    <Row>
        <Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left"/>
        <Key android:codes="115" android:keyLabel="s"/>
        <Key android:codes="100" android:keyLabel="d"/>
        <Key android:codes="102" android:keyLabel="f"/>
        <Key android:codes="103" android:keyLabel="g"/>
        <Key android:codes="104" android:keyLabel="h"/>
        <Key android:codes="106" android:keyLabel="j"/>
        <Key android:codes="107" android:keyLabel="k"/>
        <Key android:codes="108" android:keyLabel="l"/>
        <Key android:codes="109" android:keyLabel="m"/>
    </Row>
    <Row>
        <Key android:codes="-1"   android:keyEdgeFlags="left" android:keyWidth="15%p" android:keyIcon="@drawable/ic_file_upload"/>
        <Key android:codes="119" android:keyLabel="w"/>
        <Key android:codes="120" android:keyLabel="x"/>
        <Key android:codes="99" android:keyLabel="c" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ç"/>
        <Key android:codes="118" android:keyLabel="v"/>
        <Key android:codes="98" android:keyLabel="b"/>
        <Key android:codes="110" android:keyLabel="n"/>
        <Key android:codes="39" android:keyLabel="\'"/>
        <Key android:codes="-5"  android:keyWidth="15%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace" android:keyEdgeFlags="right"/>
    </Row>
    <Row android:rowEdgeFlags="bottom">
        <Key android:codes="-101" android:keyIcon="@drawable/ic_more_horiz" android:keyWidth="10%p"/>
        <Key android:codes="-2" android:keyLabel="123" android:keyWidth="10%p"/>
        <Key android:codes="44" android:keyLabel="," />
        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="ESPACE" android:keyWidth="46.154%p"/>
        <Key android:codes="46" android:keyLabel="."/>
        <Key android:codes="10"   android:keyWidth="15%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>

    </Row>
</Keyboard>


================================================
FILE: app/src/main/res/xml/azerty_arrow_numbers.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="10%p"
    android:horizontalGap="0px"
    android:verticalGap="0px"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="49" android:keyLabel="1" android:keyEdgeFlags="left"/>
        <Key android:codes="50" android:keyLabel="2"/>
        <Key android:codes="51" android:keyLabel="3"/>
        <Key android:codes="52" android:keyLabel="4"/>
        <Key android:codes="53" android:keyLabel="5"/>
        <Key android:codes="54" android:keyLabel="6"/>
        <Key android:codes="55" android:keyLabel="7"/>
        <Key android:codes="56" android:keyLabel="8"/>
        <Key android:codes="57" android:keyLabel="9"/>
        <Key android:codes="48" android:keyLabel="0" android:keyEdgeFlags="right"/>
    </Row>


    <Row>
        <Key android:codes="97"  android:keyLabel="a" android:popupKeyboard="@xml/popup_template"  android:popupCharacters="àáâä" android:keyEdgeFlags="left" />
        <Key android:codes="122" android:keyLabel="z" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="101" android:keyLabel="e" android:popupKeyboard="@xml/popup_template" android:popupCharacters="éèêë" />
        <Key android:codes="114" android:keyLabel="r" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="116" android:keyLabel="t" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="121" android:keyLabel="y" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ÿ" />
        <Key android:codes="117" android:keyLabel="u" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ùûü"/>
        <Key android:codes="105" android:keyLabel="i" android:popupKeyboard="@xml/popup_template" android:popupCharacters="îï"/>
        <Key android:codes="111" android:keyLabel="o" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ôœ" />
        <Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right" />
    </Row>
    <Row>
        <Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" />
        <Key android:codes="115" android:keyLabel="s" />
        <Key android:codes="100" android:keyLabel="d" />
        <Key android:codes="102" android:keyLabel="f" />
        <Key android:codes="103" android:keyLabel="g" />
        <Key android:codes="104" android:keyLabel="h" />
        <Key android:codes="106" android:keyLabel="j" />
        <Key android:codes="107" android:keyLabel="k" />
        <Key android:codes="108" android:keyLabel="l" />
        <Key android:codes="109" android:keyLabel="m" />
    </Row>
    <Row>
        <Key android:codes="-1"  android:keyEdgeFlags="left" android:keyWidth="15%p" android:keyIcon="@drawable/ic_file_upload"/>
        <Key android:codes="119" android:keyLabel="w" />
        <Key android:codes="120" android:keyLabel="x" />
        <Key android:codes="99"  android:keyLabel="c" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ç" />
        <Key android:codes="118" android:keyLabel="v" />
        <Key android:codes="98"  android:keyLabel="b" />
        <Key android:codes="110" android:keyLabel="n" />
        <Key android:codes="39"  android:keyLabel="\'"/>
        <Key android:codes="-5"  android:keyWidth="15%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace" android:keyEdgeFlags="right"/>
    </Row>

    <Row android:rowEdgeFlags="bottom">
        <Key android:codes="-101" android:keyIcon="@drawable/ic_more_horiz" android:keyWidth="10%p"/>
        <Key android:codes="-2" android:keyLabel="123" android:keyWidth="10%p"/>
        <Key android:codes="44" android:keyLabel="," />
        <Key android:codes="-108" android:keyIcon="@drawable/ic_keyboard_arrow_left" android:isRepeatable="true" android:keyWidth="10%p"/>
        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
            android:keyWidth="30%p"/>
        <Key android:codes="-111" android:keyIcon="@drawable/ic_keyboard_arrow_right" android:isRepeatable="true" android:keyWidth="10%p"/>
        <Key android:codes="46" android:keyLabel="."/>
        <Key android:codes="10"   android:keyWidth="10%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>
    </Row>
</Keyboard>


================================================
FILE: app/src/main/res/xml/azerty_arrows.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
    <Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
        android:keyWidth="10%p"
        android:horizontalGap="0px"
        android:verticalGap="0px"
        android:keyHeight="9%p">

    <Row>
        <Key android:codes="97"  android:keyLabel="a" android:popupKeyboard="@xml/popup_template"  android:popupCharacters="àáâä" android:keyEdgeFlags="left" />
        <Key android:codes="122" android:keyLabel="z" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="101" android:keyLabel="e" android:popupKeyboard="@xml/popup_template" android:popupCharacters="éèêë" />
        <Key android:codes="114" android:keyLabel="r" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="116" android:keyLabel="t" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="121" android:keyLabel="y" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ÿ" />
        <Key android:codes="117" android:keyLabel="u" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ùûü"/>
        <Key android:codes="105" android:keyLabel="i" android:popupKeyboard="@xml/popup_template" android:popupCharacters="îï"/>
        <Key android:codes="111" android:keyLabel="o" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ôœ" />
        <Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right" />
    </Row>
    <Row>
        <Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" />
        <Key android:codes="115" android:keyLabel="s" />
        <Key android:codes="100" android:keyLabel="d" />
        <Key android:codes="102" android:keyLabel="f" />
        <Key android:codes="103" android:keyLabel="g" />
        <Key android:codes="104" android:keyLabel="h" />
        <Key android:codes="106" android:keyLabel="j" />
        <Key android:codes="107" android:keyLabel="k" />
        <Key android:codes="108" android:keyLabel="l" />
        <Key android:codes="109" android:keyLabel="m" />
    </Row>
    <Row>
        <Key android:codes="-1"  android:keyEdgeFlags="left" android:keyWidth="15%p" android:keyIcon="@drawable/ic_file_upload"/>
        <Key android:codes="119" android:keyLabel="w" />
        <Key android:codes="120" android:keyLabel="x" />
        <Key android:codes="99"  android:keyLabel="c" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ç" />
        <Key android:codes="118" android:keyLabel="v" />
        <Key android:codes="98"  android:keyLabel="b" />
        <Key android:codes="110" android:keyLabel="n" />
        <Key android:codes="39"  android:keyLabel="\'"/>
        <Key android:codes="-5"  android:keyWidth="15%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace" android:keyEdgeFlags="right"/>
    </Row>
        <Row android:rowEdgeFlags="bottom">
            <Key android:codes="-101" android:keyIcon="@drawable/ic_more_horiz" android:keyWidth="10%p"/>
            <Key android:codes="-2" android:keyLabel="123" android:keyWidth="10%p"/>
            <Key android:codes="44" android:keyLabel="," />
            <Key android:codes="-108" android:keyIcon="@drawable/ic_keyboard_arrow_left" android:isRepeatable="true" android:keyWidth="10%p"/>
            <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
                android:keyWidth="30%p"/>
            <Key android:codes="-111" android:keyIcon="@drawable/ic_keyboard_arrow_right" android:isRepeatable="true" android:keyWidth="10%p"/>
            <Key android:codes="46" android:keyLabel="."/>
            <Key android:codes="10"   android:keyWidth="10%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>

        </Row>
    </Keyboard>


================================================
FILE: app/src/main/res/xml/azerty_numbers.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="10%p"
    android:horizontalGap="0px"
    android:verticalGap="0px"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="49" android:keyLabel="1" android:keyEdgeFlags="left"/>
        <Key android:codes="50" android:keyLabel="2"/>
        <Key android:codes="51" android:keyLabel="3"/>
        <Key android:codes="52" android:keyLabel="4"/>
        <Key android:codes="53" android:keyLabel="5"/>
        <Key android:codes="54" android:keyLabel="6"/>
        <Key android:codes="55" android:keyLabel="7"/>
        <Key android:codes="56" android:keyLabel="8"/>
        <Key android:codes="57" android:keyLabel="9"/>
        <Key android:codes="48" android:keyLabel="0" android:keyEdgeFlags="right"/>
    </Row>

    <Row>
        <Key android:codes="97"  android:keyLabel="a" android:popupKeyboard="@xml/popup_template"  android:popupCharacters="àáâä" android:keyEdgeFlags="left" />
        <Key android:codes="122" android:keyLabel="z" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="101" android:keyLabel="e" android:popupKeyboard="@xml/popup_template" android:popupCharacters="éèêë" />
        <Key android:codes="114" android:keyLabel="r" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="116" android:keyLabel="t" android:popupKeyboard="@xml/popup_template" />
        <Key android:codes="121" android:keyLabel="y" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ÿ" />
        <Key android:codes="117" android:keyLabel="u" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ùûü"/>
        <Key android:codes="105" android:keyLabel="i" android:popupKeyboard="@xml/popup_template" android:popupCharacters="îï"/>
        <Key android:codes="111" android:keyLabel="o" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ôœ" />
        <Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right" />
    </Row>
    <Row>
        <Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" />
        <Key android:codes="115" android:keyLabel="s" />
        <Key android:codes="100" android:keyLabel="d" />
        <Key android:codes="102" android:keyLabel="f" />
        <Key android:codes="103" android:keyLabel="g" />
        <Key android:codes="104" android:keyLabel="h" />
        <Key android:codes="106" android:keyLabel="j" />
        <Key android:codes="107" android:keyLabel="k" />
        <Key android:codes="108" android:keyLabel="l" />
        <Key android:codes="109" android:keyLabel="m" />
    </Row>
    <Row>
        <Key android:codes="-1"  android:keyEdgeFlags="left" android:keyWidth="15%p" android:keyIcon="@drawable/ic_file_upload"/>
        <Key android:codes="119" android:keyLabel="w" />
        <Key android:codes="120" android:keyLabel="x" />
        <Key android:codes="99"  android:keyLabel="c" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ç" />
        <Key android:codes="118" android:keyLabel="v" />
        <Key android:codes="98"  android:keyLabel="b" />
        <Key android:codes="110" android:keyLabel="n" />
        <Key android:codes="39"  android:keyLabel="\'"/>
        <Key android:codes="-5"  android:keyWidth="15%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace" android:keyEdgeFlags="right"/>
    </Row>

    <Row android:rowEdgeFlags="bottom">
        <Key android:codes="-101" android:keyIcon="@drawable/ic_more_horiz" android:keyWidth="10%p"/>
        <Key android:codes="-2" android:keyLabel="123" android:keyWidth="10%p"/>
        <Key android:codes="44" android:keyLabel="," />
        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
            android:keyWidth="46.154%p"/>
        <Key android:codes="46" android:keyLabel="."/>
        <Key android:codes="10"   android:keyWidth="15%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>

    </Row>
</Keyboard>


================================================
FILE: app/src/main/res/xml/dvorak.xml
================================================
<?xml version="1.0" encoding="utf-8"?>

<Keyboard
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="9%p"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="49" android:keyLabel="1" android:keyEdgeFlags="left"/>
        <Key android:codes="50" android:keyLabel="2"/>
        <Key android:codes="51" android:keyLabel="3"/>
        <Key android:codes="52" android:keyLabel="4"/>
        <Key android:codes="53" android:keyLabel="5"/>
        <Key android:codes="54" android:keyLabel="6"/>
        <Key android:codes="55" android:keyLabel="7"/>
        <Key android:codes="56" android:keyLabel="8"/>
        <Key android:codes="57" android:keyLabel="9"/>
        <Key android:codes="-5"  android:keyWidth="9%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace"/>
    </Row>

    <Row>

        <Key android:codes="112" android:keyLabel="p" android:popupCharacters="4π"/>
        <Key android:codes="121" android:keyLabel="y" android:popupCharacters="5ýÿψ"/>
        <Key android:codes="102" android:keyLabel="f" android:popupCharacters="6ϕ"/>
        <Key android:codes="103" android:keyLabel="g" android:popupCharacters="7ĝ"/>
        <Key android:codes="99"  android:keyLabel="c" android:popupCharacters="8çćĉčγ"/>
        <Key android:codes="114" android:keyLabel="r" android:popupCharacters="9řŕρ"/>
        <Key android:codes="108" android:keyLabel="l" android:popupCharacters="0ľĺłλ" android:keyEdgeFlags="right"/>
    </Row>

    <Row>
        <Key android:codes="97" android:keyLabel="a" android:keyEdgeFlags="left"/>
        <Key android:codes="111" android:keyLabel="o" android:popupCharacters="òóôõöøőœōo"/>
        <Key android:codes="101" android:keyLabel="e" android:popupCharacters="èéêëęē€"/>
        <Key android:codes="117" android:keyLabel="u" android:popupCharacters="ùúûüŭűū"/>
        <Key android:codes="105" android:keyLabel="i" android:popupCharacters="ìíîïīι*"/>
        <Key android:codes="100" android:keyLabel="d" android:popupCharacters="đďδ"/>
        <Key android:codes="104" android:keyLabel="h" android:popupCharacters="ĥθ"/>
        <Key android:codes="116" android:keyLabel="t" android:popupCharacters="țť\u0163τ"/>
        <Key android:codes="110" android:keyLabel="n" android:popupCharacters="ñńν"/>
        <Key android:codes="115" android:keyLabel="s" android:popupCharacters="ßśŝšșσ" android:keyEdgeFlags="right"/>
        <Key android:codes="34" android:keyLabel="&quot;" android:keyWidth="7%p"/>
        <Key android:codes="10" android:keyWidth="9%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>
    </Row>

    <Row>
        <Key android:codes="-1"   android:keyEdgeFlags="left" android:keyWidth="9%p" android:keyIcon="@drawable/ic_file_upload"/>
        <Key android:codes="59" android:keyLabel=";"/>
        <Key android:codes="113" android:keyLabel="q" android:popupCharacters="β"/>
        <Key android:codes="106" android:keyLabel="j" android:popupCharacters="ĵ"/>
        <Key android:codes="107" android:keyLabel="k" android:popupCharacters="κ"/>
        <Key android:codes="120" android:keyLabel="x" android:popupCharacters="ξχ"/>
        <Key android:codes="98"  android:keyLabel="b" android:popupCharacters="β"/>
        <Key android:codes="109" android:keyLabel="m" android:popupCharacters="μ"/>
        <Key android:codes="119" android:keyLabel="w" android:popupCharacters="ŵω"/>
        <Key android:codes="118" android:keyLabel="v" android:popupCharacters=""/>
        <Key android:codes="122" android:keyLabel="z" android:popupCharacters="żžźζ"/>
        <Key android:codes="-5" android:keyEdgeFlags="right" android:isRepeatable="true"/>

    </Row>

    <Row>
        <Key android:codes="-113" android:keyLabel="CTRL" android:keyEdgeFlags="left" android:keyWidth="20%p" />

        <Key android:codes="-101" android:keyIcon="@drawable/ic_more_horiz" android:keyWidth="8%p"/>

        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
            android:keyWidth="50%p"/>

        <Key android:codes="-114" android:keyLabel="ALT" android:keyWidth="20%p"/>

    </Row>

</Keyboard>

================================================
FILE: app/src/main/res/xml/emoji.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="10%p"
    android:horizontalGap="0px"
    android:verticalGap="0px"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="0x1f601" android:keyLabel="\ud83d\ude01" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ʠɋq̃"/>
        <Key android:codes="0x1f602" android:keyLabel="\ud83d\ude02" />
        <Key android:codes="0x1f603" android:keyLabel="\ud83d\ude03" />
        <Key android:codes="0x1f604" android:keyLabel="\ud83d\ude04" />
        <Key android:codes="0x1f605" android:keyLabel="\ud83d\ude05" />
        <Key android:codes="0x1f606" android:keyLabel="\ud83d\ude06" />
        <Key android:codes="0x1f607" android:keyLabel="\ud83d\ude07" />
        <Key android:codes="0x1f608" android:keyLabel="\ud83d\ude08" />
        <Key android:codes="0x1f609" android:keyLabel="\ud83d\ude09" />
        <Key android:codes="0x1f60a" android:keyLabel="\ud83d\ude0a" />
    </Row>

    <Row>
        <Key android:codes="0x1f60b" android:keyLabel="\ud83d\ude0b" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ʠɋq̃"/>
        <Key android:codes="0x1f60c" android:keyLabel="\ud83d\ude0c" />
        <Key android:codes="0x1f60d" android:keyLabel="\ud83d\ude0d" />
        <Key android:codes="0x1f60f" android:keyLabel="\ud83d\ude0f" />
        <Key android:codes="0x1f612" android:keyLabel="\ud83d\ude12" />
        <Key android:codes="0x1f613" android:keyLabel="\ud83d\ude13" />
        <Key android:codes="0x1f614" android:keyLabel="\ud83d\ude14" />
        <Key android:codes="0x1f615" android:keyLabel="\ud83d\ude15" />
        <Key android:codes="0x1f616" android:keyLabel="\ud83d\ude16" />
        <Key android:codes="0x1f618" android:keyLabel="\ud83d\ude18" />
    </Row>

    <Row>
        <Key android:codes="0x1f61a" android:keyLabel="\ud83d\ude1a" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ʠɋq̃"/>
        <Key android:codes="0x1f61c" android:keyLabel="\ud83d\ude1c" />
        <Key android:codes="0x1f61d" android:keyLabel="\ud83d\ude1d" />
        <Key android:codes="0x1f61e" android:keyLabel="\ud83d\ude1e" />
        <Key android:codes="0x1f620" android:keyLabel="\ud83d\ude20" />
        <Key android:codes="0x1f621" android:keyLabel="\ud83d\ude21" />
        <Key android:codes="0x1f622" android:keyLabel="\ud83d\ude22" />
        <Key android:codes="0x1f623" android:keyLabel="\ud83d\ude23" />
        <Key android:codes="0x1f624" android:keyLabel="\ud83d\ude24" />
        <Key android:codes="0x1f625" android:keyLabel="\ud83d\ude25" />
    </Row>


    <Row android:rowEdgeFlags="bottom">
        <Key android:codes="-117" android:keyLabel="ABC" android:keyWidth="13.46%p"/>
        <Key android:codes="-123" android:keyIcon="@drawable/ic_keyboard_arrow_right" android:keyWidth="13.46%p"/>
        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
            android:keyWidth="46.154%p"/>
        <Key android:codes="-5"  android:keyWidth="13.46%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace" android:keyEdgeFlags="right"/>
        <Key android:codes="10"   android:keyWidth="13.46%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>
    </Row>

</Keyboard>

================================================
FILE: app/src/main/res/xml/emoji2.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="10%p"
    android:horizontalGap="0px"
    android:verticalGap="0px"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="0x1f628" android:keyLabel="\ud83d\ude28" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ʠɋq̃"/>
        <Key android:codes="0x1f629" android:keyLabel="\ud83d\ude29" />
        <Key android:codes="0x1f62a" android:keyLabel="\ud83d\ude2a" />
        <Key android:codes="0x1f62b" android:keyLabel="\ud83d\ude2b" />
        <Key android:codes="0x1f62d" android:keyLabel="\ud83d\ude2d" />
        <Key android:codes="0x1f630" android:keyLabel="\ud83d\ude30" />
        <Key android:codes="0x1f631" android:keyLabel="\ud83d\ude31" />
        <Key android:codes="0x1f632" android:keyLabel="\ud83d\ude32" />
        <Key android:codes="0x1f633" android:keyLabel="\ud83d\ude33" />
        <Key android:codes="0x1f635" android:keyLabel="\ud83d\ude35" />
    </Row>

    <Row>
        <Key android:codes="0x1f636" android:keyLabel="\ud83d\ude36" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ʠɋq̃"/>
        <Key android:codes="0x1f637" android:keyLabel="\ud83d\ude37" />
        <Key android:codes="0x1f638" android:keyLabel="\ud83d\ude38" />
        <Key android:codes="0x1f639" android:keyLabel="\ud83d\ude39" />
        <Key android:codes="0x1f63a" android:keyLabel="\ud83d\ude3a" />
        <Key android:codes="0x1f63b" android:keyLabel="\ud83d\ude3b" />
        <Key android:codes="0x1f63c" android:keyLabel="\ud83d\ude3c" />
        <Key android:codes="0x1f63d" android:keyLabel="\ud83d\ude3d" />
        <Key android:codes="0x1f63e" android:keyLabel="\ud83d\ude3e" />
        <Key android:codes="0x1f63f" android:keyLabel="\ud83d\ude3f" />
    </Row>

    <Row>
        <Key android:codes="0x1f640" android:keyLabel="\ud83d\ude40" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ʠɋq̃"/>
        <Key android:codes="0x1f645" android:keyLabel="\ud83d\ude45" />
        <Key android:codes="0x1f646" android:keyLabel="\ud83d\ude46" />
        <Key android:codes="0x1f647" android:keyLabel="\ud83d\ude47" />
        <Key android:codes="0x1f648" android:keyLabel="\ud83d\ude48" />
        <Key android:codes="0x1f649" android:keyLabel="\ud83d\ude49" />
        <Key android:codes="0x1f64a" android:keyLabel="\ud83d\ude4a" />
        <Key android:codes="0x1f64b" android:keyLabel="\ud83d\ude4b" />
        <Key android:codes="0x1f64c" android:keyLabel="\ud83d\ude4c" />
        <Key android:codes="0x1f64d" android:keyLabel="\ud83d\ude4d" />
    </Row>

    <Row android:rowEdgeFlags="bottom">
        <Key android:codes="-117" android:keyLabel="ABC" android:keyWidth="13.46%p"/>
        <Key android:codes="-124" android:keyIcon="@drawable/ic_keyboard_arrow_left" android:keyWidth="13.46%p"/>
        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
            android:keyWidth="46.154%p"/>
        <Key android:codes="-5"  android:keyWidth="13.46%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace" android:keyEdgeFlags="right"/>
        <Key android:codes="10"   android:keyWidth="13.46%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>
    </Row>

</Keyboard>


================================================
FILE: app/src/main/res/xml/ime_preferences.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Google Inc.
     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
          http://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.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

    <ListPreference
     android:title="Theme"
     android:key="theme"
     android:entryValues="@array/color_values"
     android:defaultValue="2"
     android:entries="@array/color"/>

    <ListPreference
        android:title="Default Keyboard"
        android:key="start"
        android:entryValues="@array/start_values"
        android:defaultValue="1"
        android:entries="@array/start"/>

    <ListPreference
        android:title="Layout"
        android:key="layout"
        android:entryValues="@array/layout_values"
        android:defaultValue="1"
        android:entries="@array/layout"/>

    <SwitchPreference android:title="@string/caps"
        android:key="caps"
        android:defaultValue="true" />

    <SwitchPreference android:title="@string/vib"
        android:key="vib"
        android:defaultValue="false" />

    <SwitchPreference android:title="@string/borders"
        android:key="bord"
        android:defaultValue="false" />

    <SwitchPreference android:title="@string/prediction"
        android:key="pred"
        android:defaultValue="false" />

    <SwitchPreference android:title="Arrow keys on standard layout"
        android:key="arr_qrt"
        android:defaultValue="false" />

    <SwitchPreference android:title="Number keys on standard layout"
        android:key="nbr_qrt"
        android:defaultValue="false" />

    <com.vlath.keyboard.SeekPreference
        android:defaultValue="50"
        android:key="height"
        android:title="Key Height" />



</PreferenceScreen>

================================================
FILE: app/src/main/res/xml/method.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<input-method xmlns:android="http://schemas.android.com/apk/res/android">
    <subtype
             android:label=""
             android:imeSubtypeMode="keyboard"
             android:imeSubtypeExtraValue="TrySuppressingImeSwitcher,AsciiCapable,SupportTouchPositionCorrection,EmojiCapable" />
</input-method>

================================================
FILE: app/src/main/res/xml/numbers.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="26.67%p"
    android:horizontalGap="0px"
    android:keyHeight="10%p"
    android:verticalGap="1px"
    >
    <Row
        android:rowEdgeFlags="top"
        >
        <Key
            android:codes="49"
            android:keyLabel="1"
            android:keyEdgeFlags="left" />
        <Key
            android:codes="50"
            android:keyLabel="2"/>
        <Key
            android:codes="51"
            android:keyLabel="3" />
        <Key
            android:keyLabel="-"
            android:keyWidth="20%p"
            android:isModifier="true"
            android:keyEdgeFlags="right" />
    </Row>
    <Row>
        <Key
            android:codes="52"
            android:keyLabel="4"
            android:keyEdgeFlags="left" />
        <Key
            android:codes="53"
            android:keyLabel="5" />
        <Key
            android:codes="54"
            android:keyLabel="6" />
        <Key
            android:keyLabel="."
            android:keyWidth="20%p"
            android:isModifier="true"
            android:keyEdgeFlags="right" />
    </Row>
    <Row>
        <Key
            android:codes="55"
            android:keyLabel="7"
            android:keyEdgeFlags="left" />
        <Key
            android:codes="56"
            android:keyLabel="8" />
        <Key
            android:codes="57"
            android:keyLabel="9" />
        <Key
            android:codes="-5"
            android:keyIcon="@drawable/ic_backspace"
            android:keyWidth="20%p"
            android:isModifier="true"
            android:isRepeatable="true"
            android:keyEdgeFlags="right" />
    </Row>
    <Row
        android:rowEdgeFlags="bottom">
        <Key
            android:codes="48"
            android:keyLabel="0"/>
        <Key
            android:codes="32"
            android:keyIcon="@drawable/ic_space_bar"
            android:isRepeatable="true"
            android:keyEdgeFlags="right"
            android:keyWidth="50%p"
            />
        <Key android:codes="10"   android:keyWidth="15%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>
    </Row>
</Keyboard>

================================================
FILE: app/src/main/res/xml/popup_template.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
          android:keyWidth="10%p"
          android:horizontalGap="0px"
          android:verticalGap="0px"
          android:keyHeight="56dp">
</Keyboard>

================================================
FILE: app/src/main/res/xml/programming.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="8.3%p"
    android:horizontalGap="0px"
    android:verticalGap="0px"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="49" android:keyLabel="1" android:keyEdgeFlags="left"/>
        <Key android:codes="50" android:keyLabel="2"/>
        <Key android:codes="51" android:keyLabel="3"/>
        <Key android:codes="52" android:keyLabel="4"/>
        <Key android:codes="53" android:keyLabel="5"/>
        <Key android:codes="54" android:keyLabel="6"/>
        <Key android:codes="55" android:keyLabel="7"/>
        <Key android:codes="56" android:keyLabel="8"/>
        <Key android:codes="57" android:keyLabel="9"/>
        <Key android:codes="48" android:keyLabel="0" android:keyEdgeFlags="right"/>
        <Key android:codes="40" android:keyLabel="("/>
        <Key android:codes="41" android:keyLabel=")" android:keyEdgeFlags="right"/>
    </Row>
    <Row>
        <Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left"/>
        <Key android:codes="119" android:keyLabel="w"/>
        <Key android:codes="101" android:keyLabel="e"/>
        <Key android:codes="114" android:keyLabel="r"/>
        <Key android:codes="116" android:keyLabel="t" />
        <Key android:codes="121" android:keyLabel="y"/>
        <Key android:codes="117" android:keyLabel="u"/>
        <Key android:codes="105" android:keyLabel="i"/>
        <Key android:codes="111" android:keyLabel="o"/>
        <Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right"/>
        <Key android:codes="123" android:keyLabel="{"/>
        <Key android:codes="125" android:keyLabel="}" android:keyEdgeFlags="right"/>
    </Row>
    <Row>
        <Key android:codes="97" android:keyLabel="a" />
        <Key android:codes="115" android:keyLabel="s" />
        <Key android:codes="100" android:keyLabel="d"/>
        <Key android:codes="102" android:keyLabel="f"/>
        <Key android:codes="103" android:keyLabel="g"/>
        <Key android:codes="104" android:keyLabel="h"/>
        <Key android:codes="106" android:keyLabel="j"/>
        <Key android:codes="107" android:keyLabel="k"/>
        <Key android:codes="108" android:keyLabel="l"/>
        <Key android:codes="91" android:keyLabel="["/>
        <Key android:codes="93" android:keyLabel="]" />
        <Key android:codes="59" android:keyLabel=";" android:keyEdgeFlags="right"/>
    </Row>
    <Row>
        <Key android:codes="-1"   android:keyEdgeFlags="left" android:keyWidth="9%p" android:keyIcon="@drawable/ic_file_upload"/>
        <Key android:codes="122" android:keyLabel="z" />
        <Key android:codes="120" android:keyLabel="x"/>
        <Key android:codes="99" android:keyLabel="c"/>
        <Key android:codes="118" android:keyLabel="v"/>
        <Key android:codes="98" android:keyLabel="b"/>
        <Key android:codes="110" android:keyLabel="n"/>
        <Key android:codes="109" android:keyLabel="m"/>
        <Key android:codes="124" android:keyLabel="|"/>
        <Key android:codes="58" android:keyLabel=":"/>
        <Key android:codes="34" android:keyLabel="&quot;" android:keyWidth="7%p"/>
        <Key android:codes="-5"  android:keyWidth="9%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace"/>
    </Row>
    <Row android:rowEdgeFlags="bottom">
        <Key android:codes="-101" android:keyIcon="@drawable/ic_more_horiz" android:keyWidth="8%p"/>
        <Key android:codes="61" android:keyLabel="="/>
        <Key android:codes="33" android:keyLabel="!" />
        <Key android:codes="47" android:keyLabel="/" />
        <Key android:codes="44" android:keyLabel="," />
        <Key android:codes="46" android:keyLabel="."/>
        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
            android:keyWidth="20%p"/>
        <Key android:codes="43" android:keyLabel="+"/>
        <Key android:codes="45" android:keyLabel="-"/>
        <Key android:codes="10"   android:keyWidth="9%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>

    </Row>
</Keyboard>

================================================
FILE: app/src/main/res/xml/qwerty.xml
================================================

<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="10%p"
    android:horizontalGap="0px"
    android:verticalGap="0px"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ʠɋq̃"/>
        <Key android:codes="119" android:keyLabel="w" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ẃẁŵẅ"/>
        <Key android:codes="101" android:keyLabel="e" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ĕḝȇêé" />
        <Key android:codes="114" android:keyLabel="r" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ŕɍřŗṙ"/>
        <Key android:codes="116" android:keyLabel="t" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ťṫţṭțṱṯ"/>
        <Key android:codes="121" android:keyLabel="y" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ýỳŷÿỹ" />
        <Key android:codes="117" android:keyLabel="u" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ŭʉụüǜ"/>
        <Key android:codes="105" android:keyLabel="i" android:popupKeyboard="@xml/popup_template" android:popupCharacters="íìĭîǐï"/>
        <Key android:codes="111" android:keyLabel="o" android:popupKeyboard="@xml/popup_template" android:popupCharacters="øǿöȫóò" />
        <Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ṕṗᵽ"/>
    </Row>
    <Row>
        <Key android:codes="97" android:keyLabel="a" android:popupKeyboard="@xml/popup_template"  android:popupCharacters="áăäâ" android:keyEdgeFlags="left"  android:horizontalGap="5%p"/>
        <Key android:codes="115" android:keyLabel="s" android:popupCharacters="śṥŝšṧṡş" android:popupKeyboard="@xml/popup_template"/>
        <Key android:codes="100" android:keyLabel="d" android:popupKeyboard="@xml/popup_template" android:popupCharacters="đɗḋḍḑḓ"/>
        <Key android:codes="102" android:keyLabel="f" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ƒḟ" />
        <Key android:codes="103" android:keyLabel="g" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ǵǥĝǧğģ"/>
        <Key android:codes="104" android:keyLabel="h" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ĥȟħḩⱨẖ"/>
        <Key android:codes="106" android:keyLabel="j" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ĵɈɉj̇̃"/>
        <Key android:codes="107" android:keyLabel="k" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ƙꝁḱǩḳķ"/>
        <Key android:codes="108" android:keyLabel="l" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ĺłľḹl̃ļ" />
    </Row>
    <Row>
        <Key android:codes="-1"   android:keyEdgeFlags="left" android:keyWidth="15%p" android:keyIcon="@drawable/ic_file_upload"/>
        <Key android:codes="122" android:keyLabel="z" android:popupKeyboard="@xml/popup_template" android:popupCharacters="źẑžżẓ"/>
        <Key android:codes="120" android:keyLabel="x" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ẍẋ"/>
        <Key android:codes="99" android:keyLabel="c" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ćĉčċḉƈc̈ȼç"/>
        <Key android:codes="118" android:keyLabel="v" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ṽṿ" />
        <Key android:codes="98" android:keyLabel="b" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ƀḃḅḇ"/>
        <Key android:codes="110" android:keyLabel="n" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ńñňǹṅṇṉ"/>
        <Key android:codes="109" android:keyLabel="m" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ḿṁṃm̃"/>
        <Key android:codes="-5"  android:keyWidth="15%p"  android:isRepeatable="true" android:keyIcon="@drawable/ic_backspace" android:keyEdgeFlags="right"/>
    </Row>
    <Row android:rowEdgeFlags="bottom">
        <Key android:codes="-101" android:keyIcon="@drawable/ic_more_horiz" android:keyWidth="10%p"/>
        <Key android:codes="-2" android:keyLabel="123" android:keyWidth="10%p"/>
        <Key android:codes="44" android:keyLabel="," />
        <Key android:codes="32"   android:isRepeatable="true" android:keyLabel="SPACE"
            android:keyWidth="46.154%p"/>
        <Key android:codes="46" android:keyLabel="."/>
        <Key android:codes="10"   android:keyWidth="15%p"  android:keyIcon="@drawable/ic_keyboard_return" android:keyEdgeFlags="right"/>

    </Row>
</Keyboard>

================================================
FILE: app/src/main/res/xml/qwerty_arrow_numbers.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="10%p"
    android:horizontalGap="0px"
    android:verticalGap="0px"
    android:keyHeight="9%p">

    <Row>
        <Key android:codes="49" android:keyLabel="1" android:keyEdgeFlags="left"/>
        <Key android:codes="50" android:keyLabel="2"/>
        <Key android:codes="51" android:keyLabel="3"/>
        <Key android:codes="52" android:keyLabel="4"/>
        <Key android:codes="53" android:keyLabel="5"/>
        <Key android:codes="54" android:keyLabel="6"/>
        <Key android:codes="55" android:keyLabel="7"/>
        <Key android:codes="56" android:keyLabel="8"/>
        <Key android:codes="57" android:keyLabel="9"/>
        <Key android:codes="48" android:keyLabel="0" android:keyEdgeFlags="right"/>
    </Row>

    <Row>
        <Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ʠɋq̃"/>
        <Key android:codes="119" android:keyLabel="w" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ẃẁŵẅ"/>
        <Key android:codes="101" android:keyLabel="e" android:popupKeyboard="@xml/popup_template" android:popupCharacters="ĕḝȇêé" />
        <Key android:codes="1
Download .txt
gitextract_6wnfhx6g/

├── .github/
│   └── workflows/
│       ├── greetings.yml
│       ├── label.yml
│       └── labeler.yaml
├── .gitignore
├── .idea/
│   ├── codeStyleSettings.xml
│   ├── compiler.xml
│   ├── copyright/
│   │   └── profiles_settings.xml
│   ├── gradle.xml
│   ├── misc.xml
│   ├── modules.xml
│   ├── runConfigurations.xml
│   └── vcs.xml
├── .scrutinizer.yml
├── .travis.yml
├── LICENSE
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── com/
│       │           └── vlath/
│       │               └── keyboard/
│       │                   └── ExampleInstrumentedTest.java
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── vlath/
│       │   │           └── keyboard/
│       │   │               ├── CandidateView.java
│       │   │               ├── CustomKeyboard.java
│       │   │               ├── LatinKeyboard.java
│       │   │               ├── Main.java
│       │   │               ├── PCKeyboard.java
│       │   │               ├── Preference.java
│       │   │               ├── PreferenceFragment.java
│       │   │               ├── SeekPreference.java
│       │   │               └── Variables.java
│       │   └── res/
│       │       ├── drawable/
│       │       │   ├── key_background.xml
│       │       │   ├── key_background_back.xml
│       │       │   ├── normal.xml
│       │       │   ├── preview_background.xml
│       │       │   └── round_corners.xml
│       │       ├── layout/
│       │       │   ├── activate.xml
│       │       │   ├── keyboard.xml
│       │       │   ├── keyboard_key_back.xml
│       │       │   ├── main.xml
│       │       │   ├── popup.xml
│       │       │   ├── pref.xml
│       │       │   ├── preview.xml
│       │       │   ├── seek_dialog.xml
│       │       │   ├── slide1.xml
│       │       │   ├── slide2.xml
│       │       │   ├── slide3.xml
│       │       │   └── slide4.xml
│       │       ├── values/
│       │       │   ├── attr.xml
│       │       │   ├── colors.xml
│       │       │   ├── dimens.xml
│       │       │   ├── strings.xml
│       │       │   └── styles.xml
│       │       ├── values-pt-rBR/
│       │       │   └── strings.xml
│       │       └── xml/
│       │           ├── arrow_keys.xml
│       │           ├── azerty.xml
│       │           ├── azerty_arrow_numbers.xml
│       │           ├── azerty_arrows.xml
│       │           ├── azerty_numbers.xml
│       │           ├── dvorak.xml
│       │           ├── emoji.xml
│       │           ├── emoji2.xml
│       │           ├── ime_preferences.xml
│       │           ├── method.xml
│       │           ├── numbers.xml
│       │           ├── popup_template.xml
│       │           ├── programming.xml
│       │           ├── qwerty.xml
│       │           ├── qwerty_arrow_numbers.xml
│       │           ├── qwerty_arrows.xml
│       │           ├── qwerty_numbers.xml
│       │           ├── qwertz.xml
│       │           ├── qwertz_arrow_numbers.xml
│       │           ├── qwertz_arrows.xml
│       │           ├── qwertz_numbers.xml
│       │           ├── symbols.xml
│       │           └── symbols2.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── vlath/
│                       └── keyboard/
│                           └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
Download .txt
SYMBOL INDEX (142 symbols across 11 files)

FILE: app/src/androidTest/java/com/vlath/keyboard/ExampleInstrumentedTest.java
  class ExampleInstrumentedTest (line 17) | @RunWith(AndroidJUnit4.class)
    method useAppContext (line 19) | @Test

FILE: app/src/main/java/com/vlath/keyboard/CandidateView.java
  class CandidateView (line 39) | public class CandidateView extends View {
    method CandidateView (line 75) | public CandidateView(Context context) {
    method setService (line 131) | public void setService(PCKeyboard listener) {
    method computeHorizontalScrollRange (line 135) | @Override
    method onMeasure (line 140) | @Override
    method onDraw (line 160) | @Override
    method scrollToTarget (line 224) | private void scrollToTarget() {
    method setSuggestions (line 243) | public void setSuggestions(List<String> suggestions, boolean completions,
    method clear (line 258) | public void clear() {
    method onTouchEvent (line 265) | @Override
    method takeSuggestionAt (line 311) | public void takeSuggestionAt(float x) {
    method removeHighlight (line 321) | private void removeHighlight() {

FILE: app/src/main/java/com/vlath/keyboard/CustomKeyboard.java
  class CustomKeyboard (line 32) | public class CustomKeyboard extends KeyboardView {
    method CustomKeyboard (line 39) | public CustomKeyboard(Context context, AttributeSet attrs) {
    method CustomKeyboard (line 44) | public CustomKeyboard(Context context, AttributeSet attrs, int defStyl...
    method getLatinKeyboard (line 48) | public LatinKeyboard getLatinKeyboard(){
    method onLongPress (line 52) | @Override
    method onDraw (line 61) | @Override

FILE: app/src/main/java/com/vlath/keyboard/LatinKeyboard.java
  class LatinKeyboard (line 15) | public class LatinKeyboard extends Keyboard {
    method LatinKeyboard (line 70) | public LatinKeyboard(Context context, int xmlLayoutResId) {
    method LatinKeyboard (line 74) | public LatinKeyboard(Context context, int layoutTemplateResId,
    method createKeyFromXml (line 79) | @Override
    method setLanguageSwitchKeyVisibility (line 101) | void setLanguageSwitchKeyVisibility(boolean visible) {
    method setImeOptions (line 124) | void setImeOptions(Resources res, int options) {
    method setRowNumber (line 156) | public void setRowNumber(short number){
    method setSpaceIcon (line 164) | void setSpaceIcon(final Drawable icon) {
    method changeKeyHeight (line 169) | public void changeKeyHeight(double height_modifier){
    method getHeight (line 186) | @Override
    method setKeyHeight (line 192) | public void setKeyHeight(int height) {
    class LatinKey (line 197) | static class LatinKey extends Keyboard.Key {
      method LatinKey (line 199) | public LatinKey(Resources res, Keyboard.Row parent, int x, int y,
      method isInside (line 208) | @Override

FILE: app/src/main/java/com/vlath/keyboard/Main.java
  class Main (line 31) | public class Main extends AppCompatActivity {
    method onCreate (line 40) | @Override
    method addBottomDots (line 123) | private void addBottomDots(int currentPage) {
    method getItem (line 142) | private int getItem(int i) {
    method launchHomeScreen (line 146) | private void launchHomeScreen() {
    method onPageSelected (line 156) | @Override
    method onPageScrolled (line 172) | @Override
    method onPageScrollStateChanged (line 177) | @Override
    method changeStatusBarColor (line 186) | private void changeStatusBarColor() {
    method normalStatusBar (line 194) | private void normalStatusBar(){
    class MyViewPagerAdapter (line 207) | public class MyViewPagerAdapter extends PagerAdapter {
      method MyViewPagerAdapter (line 210) | public MyViewPagerAdapter() {
      method instantiateItem (line 213) | @Override
      method getCount (line 223) | @Override
      method isViewFromObject (line 228) | @Override
      method destroyItem (line 234) | @Override
    method getPresentationShown (line 241) | public boolean getPresentationShown(){
    method setPresentationShown (line 253) | public void setPresentationShown(){
    method showTwitterDialog (line 259) | public void showTwitterDialog(){
    method settings (line 285) | public void settings(View v){
    method enable (line 290) | public void enable(View v){
    method select (line 294) | public void select(View v){

FILE: app/src/main/java/com/vlath/keyboard/PCKeyboard.java
  class PCKeyboard (line 55) | public class PCKeyboard extends InputMethodService
    method onCreate (line 165) | @Override public void onCreate() {
    method onInitializeInterface (line 178) | @Override public void onInitializeInterface() {
    method onCreateInputView (line 200) | @Override public View onCreateInputView() {
    method setLatinKeyboard (line 209) | private void setLatinKeyboard(LatinKeyboard nextKeyboard) {
    method onCreateCandidatesView (line 219) | @Override public View onCreateCandidatesView() {
    method onStartInput (line 242) | @Override public void onStartInput(EditorInfo attribute, boolean resta...
    method onFinishInput (line 297) | @Override public void onFinishInput() {
    method onUpdateSelection (line 319) | @Override public void onUpdateSelection(int oldSelStart, int oldSelEnd,
    method onDisplayCompletions (line 344) | @Override public void onDisplayCompletions(CompletionInfo[] completion...
    method translateKeyDown (line 366) | private boolean translateKeyDown(int keyCode, KeyEvent event) {
    method onKeyUp (line 403) | @Override public boolean onKeyUp(int keyCode, KeyEvent event) {
    method onKeyDown (line 407) | @Override public boolean onKeyDown(int keyCode, KeyEvent event) {
    method commitTyped (line 415) | private void commitTyped(InputConnection inputConnection) {
    method updateShiftKeyState (line 427) | private void updateShiftKeyState(EditorInfo attr) {
    method isAlphabet (line 442) | private boolean isAlphabet(int code) {
    method keyDownUp (line 453) | private void keyDownUp(int keyEventCode) {
    method sendKey (line 463) | private void sendKey(int keyCode) {
    method onText (line 479) | public void onText(CharSequence text) {
    method swipeLeft (line 492) | @Override
    method swipeRight (line 497) | @Override
    method swipeDown (line 502) | @Override
    method swipeUp (line 507) | @Override
    method updateCandidates (line 517) | private void updateCandidates() {
    method setSuggestions (line 530) | public void setSuggestions(List<String> suggestions, boolean completions,
    method handleBackspace (line 543) | private void handleBackspace() {
    method handleCharacter (line 559) | private void handleCharacter(int primaryCode, int[] keyCodes) {
    method handleClose (line 593) | private void handleClose() {
    method getToken (line 599) | private IBinder getToken() {
    method handleLanguageSwitch (line 611) | private void handleLanguageSwitch() {
    method checkToggleCapsLock (line 615) | private void checkToggleCapsLock() {
    method getWordSeparators (line 625) | private String getWordSeparators() {
    method isWordSeparator (line 629) | public boolean isWordSeparator(String s) {
    method pickDefaultCandidate (line 639) | public void pickDefaultCandidate() {
    method pickSuggestionManually (line 643) | public void pickSuggestionManually(int index) {
    method onPress (line 662) | public void onPress(int primaryCode) {
    method onRelease (line 670) | public void onRelease(int primaryCode) {
    method onGetSuggestions (line 682) | @Override
    method dumpSuggestionsInfoInternal (line 699) | private void dumpSuggestionsInfoInternal(
    method onGetSentenceSuggestions (line 708) | @Override
    method setCapsOn (line 724) | private void setCapsOn(boolean on) {
    method processKeyCombo (line 738) | private void processKeyCombo(int keycode) {
    method getHardKeyCode (line 758) | private int getHardKeyCode(int keycode) {
    method handleAction (line 848) | private void handleAction() {
    method setTheme (line 874) | public void setTheme() {
    method setInputType (line 903) | private void setInputType() {
    method setDefaultKeyboard (line 943) | public void setDefaultKeyboard() {
    method capsOnFirst (line 960) | private void capsOnFirst() {
    method getCursorCapsMode (line 979) | private int getCursorCapsMode(InputConnection ic, EditorInfo attr) {
    method onKey (line 992) | @Override
    method getRowNumber (line 1252) | public short getRowNumber(){
    method setRowNumber (line 1257) | public void setRowNumber(int number){
    method getStandardRowNumber (line 1261) | public short getStandardRowNumber(){
    method setStandardKeyboard (line 1279) | public void setStandardKeyboard(){
    method getHeightKeyModifier (line 1338) | public double getHeightKeyModifier() {

FILE: app/src/main/java/com/vlath/keyboard/Preference.java
  class Preference (line 11) | public class Preference extends ActionBarActivity {
    method onCreate (line 12) | @Override

FILE: app/src/main/java/com/vlath/keyboard/PreferenceFragment.java
  class PreferenceFragment (line 12) | public class PreferenceFragment extends android.preference.PreferenceFra...
    method onCreate (line 17) | @Override
    method onSharedPreferenceChanged (line 31) | @Override

FILE: app/src/main/java/com/vlath/keyboard/SeekPreference.java
  class SeekPreference (line 15) | public class SeekPreference extends Preference implements OnSeekBarChang...
    method SeekPreference (line 19) | public SeekPreference(Context context) {
    method SeekPreference (line 23) | public SeekPreference(Context context, AttributeSet attrs) {
    method SeekPreference (line 27) | public SeekPreference(Context context, AttributeSet attrs, int defStyl...
    method onBindView (line 32) | @Override
    method onProgressChanged (line 40) | @Override
    method onStartTrackingTouch (line 48) | @Override
    method onStopTrackingTouch (line 53) | @Override
    method onSetInitialValue (line 58) | @Override
    method setValue (line 63) | public void setValue(int value) {
    method onGetDefaultValue (line 74) | @Override

FILE: app/src/main/java/com/vlath/keyboard/Variables.java
  class Variables (line 7) | public  class Variables {
    method isAnyOn (line 18) | public static boolean isAnyOn() {
    method isCtrl (line 22) | public static boolean isCtrl() {
    method isAlt (line 26) | public static boolean isAlt() {
    method setIsCtrl (line 30) | public static void setIsCtrl(boolean on) {
    method setIsAlt (line 35) | public static void setIsAlt(boolean on) {
    method setAltOn (line 39) | public static void setAltOn() {
    method setAltOff (line 43) | public static void setAltOff() {
    method setCtrlOn (line 47) | public static void setCtrlOn() {
    method setCtrlOff (line 51) | public static void setCtrlOff() {
    method setShiftOn (line 55) | public static void setShiftOn() {
    method setShiftOff (line 59) | public static void setShiftOff() {
    method isShift (line 63) | public static boolean isShift() {

FILE: app/src/test/java/com/vlath/keyboard/ExampleUnitTest.java
  class ExampleUnitTest (line 12) | public class ExampleUnitTest {
    method addition_isCorrect (line 13) | @Test
Condensed preview — 84 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (264K chars).
[
  {
    "path": ".github/workflows/greetings.yml",
    "chars": 594,
    "preview": "name: Greetings\n\non: [pull_request, issues]\n\njobs:\n  greeting:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions"
  },
  {
    "path": ".github/workflows/label.yml",
    "chars": 196,
    "preview": "name: \"Pull Request Labeler\"\non:\n- pull_request\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actio"
  },
  {
    "path": ".github/workflows/labeler.yaml",
    "chars": 55,
    "preview": "translation:\n  - app/src/main/res/values/strings.xml\n\n\n"
  },
  {
    "path": ".gitignore",
    "chars": 127,
    "preview": "*.iml\r\n.gradle\r\n/local.properties\r\n/.idea/workspace.xml\r\n/.idea/libraries\r\n.DS_Store\r\n/build\r\n/captures\r\n.externalNative"
  },
  {
    "path": ".idea/codeStyleSettings.xml",
    "chars": 8805,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectCodeStyleSettingsManager\">\n    <o"
  },
  {
    "path": ".idea/compiler.xml",
    "chars": 686,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CompilerConfiguration\">\n    <resourceExt"
  },
  {
    "path": ".idea/copyright/profiles_settings.xml",
    "chars": 76,
    "preview": "<component name=\"CopyrightManager\">\r\n  <settings default=\"\" />\r\n</component>"
  },
  {
    "path": ".idea/gradle.xml",
    "chars": 626,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linke"
  },
  {
    "path": ".idea/misc.xml",
    "chars": 1626,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"NullableNotNullManager\">\n    <option nam"
  },
  {
    "path": ".idea/modules.xml",
    "chars": 353,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n   "
  },
  {
    "path": ".idea/runConfigurations.xml",
    "chars": 564,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <o"
  },
  {
    "path": ".idea/vcs.xml",
    "chars": 180,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping dire"
  },
  {
    "path": ".scrutinizer.yml",
    "chars": 23,
    "preview": "checks:\n    java: true\n"
  },
  {
    "path": ".travis.yml",
    "chars": 487,
    "preview": "language: android\nsudo: required\ndist: trusty\ngroup: deprecated-2017Q4\n\nandroid:\n  components:\n    - tools\n\n    - build-"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.md",
    "chars": 1926,
    "preview": "[![Travis](https://img.shields.io/travis/VladThodo/behe-keyboard/master?label=master&style=flat-square)]()\n[![Travis](ht"
  },
  {
    "path": "app/.gitignore",
    "chars": 8,
    "preview": "/build\r\n"
  },
  {
    "path": "app/build.gradle",
    "chars": 989,
    "preview": "apply plugin: 'com.android.application'\r\n\r\nandroid {\r\n     lintOptions {\r\n          abortOnError false\r\n    }\r\n    compi"
  },
  {
    "path": "app/proguard-rules.pro",
    "chars": 952,
    "preview": "# Add project specific ProGuard rules here.\r\n# By default, the flags in this file are appended to flags specified\r\n# in "
  },
  {
    "path": "app/src/androidTest/java/com/vlath/keyboard/ExampleInstrumentedTest.java",
    "chars": 766,
    "preview": "package com.vlath.keyboard;\r\n\r\nimport android.content.Context;\r\nimport android.support.test.InstrumentationRegistry;\r\nim"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "chars": 1270,
    "preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    package=\"com.vlath.keyboard\">\r\n\r\n    <uses-per"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/CandidateView.java",
    "chars": 10410,
    "preview": "package com.vlath.keyboard;\n\n/**\n * Created by todo on 02.08.2017.\n */\n\n/*\n * Copyright (C) 2008-2009 The Android Open S"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/CustomKeyboard.java",
    "chars": 3760,
    "preview": "package com.vlath.keyboard;\r\n\r\n/**\r\n * Created by Vlad on 6/14/2017.\r\n */\r\n\r\nimport android.graphics.Bitmap;\r\nimport and"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/LatinKeyboard.java",
    "chars": 7698,
    "preview": "package com.vlath.keyboard;\r\n\r\n/**\r\n * Created by Vlad on 6/14/2017.\r\n */\r\n\r\nimport android.content.Context;\r\nimport and"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/Main.java",
    "chars": 9714,
    "preview": "package com.vlath.keyboard;\n\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.cont"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/PCKeyboard.java",
    "chars": 50245,
    "preview": "package com.vlath.keyboard;\r\n\r\n/*\r\n * Copyright (C) 2008-2009 The Android Open Source Project\r\n *\r\n * Licensed under the"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/Preference.java",
    "chars": 475,
    "preview": "package com.vlath.keyboard;\r\n\r\nimport android.app.FragmentManager;\r\nimport android.os.Bundle;\r\nimport android.support.v7"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/PreferenceFragment.java",
    "chars": 1337,
    "preview": "package com.vlath.keyboard;\n\nimport android.content.SharedPreferences;\nimport android.os.Bundle;\nimport android.preferen"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/SeekPreference.java",
    "chars": 1989,
    "preview": "package com.vlath.keyboard;\n\n/**\n * Created by todo on 01.12.2017.\n */\n\nimport android.content.Context;\nimport android.c"
  },
  {
    "path": "app/src/main/java/com/vlath/keyboard/Variables.java",
    "chars": 1215,
    "preview": "package com.vlath.keyboard;\r\n\r\n/**\r\n * Created by Vlad on 6/22/2017.\r\n */\r\n\r\npublic  class Variables {\r\n\r\n\r\n    /**\r\n   "
  },
  {
    "path": "app/src/main/res/drawable/key_background.xml",
    "chars": 456,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\r\n    <!-- "
  },
  {
    "path": "app/src/main/res/drawable/key_background_back.xml",
    "chars": 451,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <!-- No"
  },
  {
    "path": "app/src/main/res/drawable/normal.xml",
    "chars": 462,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\r\n    <it"
  },
  {
    "path": "app/src/main/res/drawable/preview_background.xml",
    "chars": 312,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:s"
  },
  {
    "path": "app/src/main/res/drawable/round_corners.xml",
    "chars": 510,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <solid and"
  },
  {
    "path": "app/src/main/res/layout/activate.xml",
    "chars": 2981,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/layout/keyboard.xml",
    "chars": 744,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<com.vlath.keyboard.CustomKeyboard\r\n    xmlns:android=\"http://schemas.android.co"
  },
  {
    "path": "app/src/main/res/layout/keyboard_key_back.xml",
    "chars": 728,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.vlath.keyboard.CustomKeyboard\n    xmlns:android=\"http://schemas.android.com/"
  },
  {
    "path": "app/src/main/res/layout/main.xml",
    "chars": 1741,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xm"
  },
  {
    "path": "app/src/main/res/layout/popup.xml",
    "chars": 341,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/layout/pref.xml",
    "chars": 319,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n      "
  },
  {
    "path": "app/src/main/res/layout/preview.xml",
    "chars": 1214,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<LinearLayout\r\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n "
  },
  {
    "path": "app/src/main/res/layout/seek_dialog.xml",
    "chars": 636,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "app/src/main/res/layout/slide1.xml",
    "chars": 1464,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/layout/slide2.xml",
    "chars": 1476,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/layout/slide3.xml",
    "chars": 1467,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/layout/slide4.xml",
    "chars": 1468,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/values/attr.xml",
    "chars": 179,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <attr name=\"keyBackColor\" format=\"color|reference\"/>\n    <attr na"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "chars": 2176,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<resources>\r\n    <color name=\"colorPrimary\">#3F51B5</color>\r\n    <color name=\"co"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "chars": 657,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n     <dimen name=\"key_height\">52dip</dimen>\n     <dimen name=\"candida"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "chars": 4127,
    "preview": "<resources>\r\n    <string name=\"app_name\">BeHe Keyboard</string>\r\n    <string name=\"subtype_generic\">%s</string>\r\n    <st"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "chars": 774,
    "preview": "<resources>\r\n    <!-- Base application theme. -->\r\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBa"
  },
  {
    "path": "app/src/main/res/values-pt-rBR/strings.xml",
    "chars": 2300,
    "preview": "<resources>\n    <string name=\"app_name\">Teclado BeHe</string>\n    <string name=\"subtype_generic\">%s</string>\n    <string"
  },
  {
    "path": "app/src/main/res/xml/arrow_keys.xml",
    "chars": 2686,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n          "
  },
  {
    "path": "app/src/main/res/xml/azerty.xml",
    "chars": 3264,
    "preview": "\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:keyWidth=\"10%p\"\n    android:horizontal"
  },
  {
    "path": "app/src/main/res/xml/azerty_arrow_numbers.xml",
    "chars": 4377,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/azerty_arrows.xml",
    "chars": 3815,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n    <Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        "
  },
  {
    "path": "app/src/main/res/xml/azerty_numbers.xml",
    "chars": 4102,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/dvorak.xml",
    "chars": 4171,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<Keyboard\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    and"
  },
  {
    "path": "app/src/main/res/xml/emoji.xml",
    "chars": 3455,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/emoji2.xml",
    "chars": 3454,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/ime_preferences.xml",
    "chars": 2324,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<!-- Copyright (C) 2011 Google Inc.\r\n     Licensed under the Apache License, Ver"
  },
  {
    "path": "app/src/main/res/xml/method.xml",
    "chars": 354,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<input-method xmlns:android=\"http://schemas.android.com/apk/res/android\">\r\n    <"
  },
  {
    "path": "app/src/main/res/xml/numbers.xml",
    "chars": 2361,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Keyboard\r\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    a"
  },
  {
    "path": "app/src/main/res/xml/popup_template.xml",
    "chars": 269,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n          "
  },
  {
    "path": "app/src/main/res/xml/programming.xml",
    "chars": 4174,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/qwerty.xml",
    "chars": 4771,
    "preview": "\r\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:keyWidth=\"10%p\"\r\n    android:horizon"
  },
  {
    "path": "app/src/main/res/xml/qwerty_arrow_numbers.xml",
    "chars": 5661,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/qwerty_arrows.xml",
    "chars": 5101,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n    <Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        "
  },
  {
    "path": "app/src/main/res/xml/qwerty_numbers.xml",
    "chars": 5388,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/qwertz.xml",
    "chars": 4773,
    "preview": "\r\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:keyWidth=\"10%p\"\r\n    android:horizon"
  },
  {
    "path": "app/src/main/res/xml/qwertz_arrow_numbers.xml",
    "chars": 5662,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/qwertz_arrows.xml",
    "chars": 5102,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n    <Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        "
  },
  {
    "path": "app/src/main/res/xml/qwertz_numbers.xml",
    "chars": 5389,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:"
  },
  {
    "path": "app/src/main/res/xml/symbols.xml",
    "chars": 2980,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    androi"
  },
  {
    "path": "app/src/main/res/xml/symbols2.xml",
    "chars": 2990,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    androi"
  },
  {
    "path": "app/src/test/java/com/vlath/keyboard/ExampleUnitTest.java",
    "chars": 412,
    "preview": "package com.vlath.keyboard;\r\n\r\nimport org.junit.Test;\r\n\r\nimport static org.junit.Assert.*;\r\n\r\n/**\r\n * Example local unit"
  },
  {
    "path": "build.gradle",
    "chars": 521,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\r\n\r\nbuildscript {\r\n  "
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 237,
    "preview": "#Wed Jun 14 12:07:36 EEST 2017\r\ndistributionBase=GRADLE_USER_HOME\r\ndistributionPath=wrapper/dists\r\nzipStoreBase=GRADLE_U"
  },
  {
    "path": "gradle.properties",
    "chars": 747,
    "preview": "# Project-wide Gradle settings.\r\n\r\n# IDE (e.g. Android Studio) users:\r\n# Gradle settings configured through the IDE *wil"
  },
  {
    "path": "gradlew",
    "chars": 4971,
    "preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start "
  },
  {
    "path": "gradlew.bat",
    "chars": 2404,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
  },
  {
    "path": "settings.gradle",
    "chars": 16,
    "preview": "include ':app'\r\n"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the VladThodo/behe-keyboard GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 84 files (235.8 KB), approximately 60.7k tokens, and a symbol index with 142 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!