Skip to content

Status and Installation

Status

  • Keyboard
    • JVM
      • Windows x86_64 (64 bit)
      • Windows x86 (32 bit)
      • Linux x86_64 (64 bit)
      • Linux x86 (32 bit)
      • Linux Arm32
      • Linux Arm64
      • MacOS
    • JS
      • Windows x86_64 (64 bit)
      • Windows x86 (32 bit)
      • Linux x86_64 (64 bit)
      • Linux x86 (32 bit)
      • Linux Arm32
      • Linux Arm64
      • MacOS
    • Native
      • Windows x86_64 (64 bit)
      • Windows x86 (32 bit)
      • Linux x86_64 (64 bit)
      • Linux x86 (32 bit)
      • Linux Arm32
      • Linux Arm64
      • MacOS
  • Mouse
    • Windows
    • Linux
    • MacOS
    • JVM

Installation

Latest Release Bintray Version Code Size License

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plugins {
    kotlin("jvm") version "<kotlin-version>"
}

repositories {
    maven(url = "https://dl.bintray.com/animeshz/maven")
}

dependencies {
    implementation("com.github.animeshz:keyboard-kt-jvm:<version>")
    implementation("com.github.animeshz:mouse-kt-jvm:<version>")
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plugins {
    kotlin("js") version "<kotlin-version>"
}

repositories {
    maven(url = "https://dl.bintray.com/animeshz/maven")
}

dependencies {
    implementation("com.github.animeshz:keyboard-kt-js:<version>")
    implementation("com.github.animeshz:mouse-kt-js:<version>")
}   
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plugins {
    java
}

repositories {
    maven(url = "https://dl.bintray.com/animeshz/maven")
}

dependencies {
    // Using from Java 8 or above (with complete Java support)
    implementation("com.github.animeshz:keyboard-kt-jvm:<version>")
    implementation("com.github.animeshz:keyboard-kt-jdk8:<version>")

    implementation("com.github.animeshz:mouse-kt-jvm:<version>")
    implementation("com.github.animeshz:mouse-kt-jdk8:<version>")
}   
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
plugins {
    kotlin("mutliplatform") version "<kotlin-version>"
}

repositories {
    maven(url = "https://dl.bintray.com/animeshz/maven")
}

kotlin {
    // Your targets
    jvm()
    js()  // IR not supported right now, but will be soon.
    mingwX64 {
        binaries { executable { entryPoint = "main" } }
    }
    linuxX64 {
        binaries { executable { entryPoint = "main" } }
    }

    // Dependency to the library
    sourceSets {
        // Either as common
        val commonMain by getting {
            dependencies {
                implementation(kotlin("stdlib-common"))
                implementation("com.github.animeshz:keyboard-kt:<version>")
                implementation("com.github.animeshz:mouse-kt:<version>")
            }
        }

        // Or configure each-platform by the suffix such as -jvm, -linuxX64, etc.
        val jvmMain by getting {
            dependsOn(commonMain)
            dependencies {
                implementation("com.github.animeshz:keyboard-kt-jvm:<version>")
                implementation("com.github.animeshz:mouse-kt-jvm:<version>")
            }
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plugins {
    id "kotlin-jvm" version "<kotlin-version>"
}

repositories {
    maven { url "https://dl.bintray.com/animeshz/maven" }
}

dependencies {
    implementation("com.github.animeshz:keyboard-kt-jvm:<version>")
    implementation("com.github.animeshz:mouse-kt-jvm:<version>")
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plugins {
    id "kotlin-js" version "<kotlin-version>"
}

repositories {
    maven { url "https://dl.bintray.com/animeshz/maven" }
}

dependencies {
    implementation("com.github.animeshz:keyboard-kt-js:<version>")
    implementation("com.github.animeshz:mouse-kt-js:<version>")
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plugins {
    java
}

repositories {
    maven { url "https://dl.bintray.com/animeshz/maven" }
}

dependencies {
    // Using from Java 8 or above (with complete Java support)
    implementation("com.github.animeshz:keyboard-kt-jvm:<version>")
    implementation("com.github.animeshz:keyboard-kt-jdk8:<version>")

    implementation("com.github.animeshz:mouse-kt-jvm:<version>")
    implementation("com.github.animeshz:mouse-kt-jdk8:<version>")
}   
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
plugins {
    id "kotlin-mutliplatform" version "<kotlin-version>"
}

repositories {
    maven { url "https://dl.bintray.com/animeshz/maven" }
}

kotlin {
    // Your targets
    jvm()
    js()  // IR not supported right now, but will be soon.
    mingwX64 {
        binaries { executable { entryPoint = "main" } }
    }
    linuxX64 {
        binaries { executable { entryPoint = "main" } }
    }

    // Dependency to the library
    sourceSets {
        // Either as common
        commonMain {
            dependencies {
                implementation(kotlin("stdlib-common"))
                implementation("com.github.animeshz:keyboard-kt:<version>")
                implementation("com.github.animeshz:mouse-kt:<version>")
            }
        }

        // Or configure each-platform by the suffix such as -jvm, -linuxX64, etc.
        jvmMain {
            dependsOn(commonMain)
            dependencies {
                implementation("com.github.animeshz:keyboard-kt-jvm:<version>")
                implementation("com.github.animeshz:mouse-kt-jvm:<version>")
            }
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <repositories>
    <repository>
      <id>bintray-animeshz-maven</id>
      <name>bintray</name>
      <url>https://dl.bintray.com/animeshz/maven</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>com.github.animeshz</groupId>
      <artifactId>keyboard-kt-jvm</artifactId>
      <version>0.2.2</version>
      <type>pom</type>
    </dependency>
  </dependencies>

</project>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <repositories>
    <repository>
      <id>bintray-animeshz-maven</id>
      <name>bintray</name>
      <url>https://dl.bintray.com/animeshz/maven</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>com.github.animeshz</groupId>
      <artifactId>keyboard-kt-jvm</artifactId>
      <version>0.2.2</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>com.github.animeshz</groupId>
      <artifactId>keyboard-kt-jdk8</artifactId>
      <version>0.2.2</version>
      <type>pom</type>
    </dependency>
  </dependencies>

</project>
1
2
3
4
5
6
7
8
{
    "name": "<project-name>",
    "version": "<project-version>",

    "dependencies": {
        "keyboard-kt": "^0.3.0"
    }
}

Use interactively with Jupyter Notebook

Don't have time to setup a Gradle/Maven project? No worries, roll up a Kotlin's Jupyter Kernel, and use it as a REPL (it even has kotlin-autocompletion).

If you don't already have jupyter or kotlin-kernel, click here
1
python3 -m pip install jupyterlab
1
git clone https://github.com/Kotlin/kotlin-jupyter.git && cd kotlin-jupyter && ./gradlew install && cd -

Get the quickstart notebook for quickly start using the library without any hassles.

1
curl https://raw.githubusercontent.com/Animeshz/keyboard-mouse-kt/master/docs/getting_started.ipynb -o getting_started.ipynb
Note: If you are in windows assuming you're using powershell

Start the jupyter lab with:

1
jupyter lab

A browser will open with current directory, open the getting_started.ipynb and start playing with it.

If you're new to jupyer, click here

use Ctrl + Enter to run a cell, Esc to get in command mode, X to cut a cell, Z to undo, B to create a new cell below, and so on. Refer to jupyter docs for more info.

A simple demo gif:

keyboard-kt-jupyter-sample.gif