Skip to content

vgresak/keyboard-layout-editor

Repository files navigation

Keyboard layout editor

Keyboard layout editor is a JavaFX application made to help create custom keyboard layouts. The application works with the X Keyboard Extension (XKB) (often found in the Linux, OpenSolaris, BSD).

Keyboard layout editor

Requirements

As this is a JavaFX application, you need both Java 8 and JavaFX to build and run the editor.

Linux

You can use your package manager to obtain Java 8 JDK: sudo apt-get install openjdk-8-jdk. Next install JavaFX. You can get OpenJFX (open source JavaFX implementation) build for Java 8 for example at www.chriswhocodes.com. Don't forget to include it in your JDK directory like this: sudo unzip openjfx-8u60-sdk-overlay-linux-amd64.zip -d /usr/lib/jvm/java-8-openjdk-amd64/.

Optionally you can install xkblayout-state on your system. If you won't, the editor will run just fine but the currently selected group will not be automatically displayed by the editor (you can still choose desired group via the menu in the editor).

Creating a runnable JAR file

To build the application and to create an executable JAR file from sources run /bin/bash ./gradlew fatJar in the project directory (you can also run gradle fatJar if you have gradle installed). Gradle task fatJar will create single JAR file that contains keyboard layout editor and all third-party libraries. Output file is located at build/libs/keyboard-layout-editor-all-1.0-SNAPSHOT.jar.

Running

You can run the application using the java -jar keyboard-layout-editor-all-1.0-SNAPSHOT.jar command.

Features

  • Current keyboard layout is automatically imported from the X Server.
  • Symbol file can be exported and used by XKB to change the keyboard mapping.
  • There is a support for up to 4 characters (levels) per key.
  • Up to 8 layout groups are supported allowing definition of multiple keyboard layouts among which you can switch.
  • It is possible to set key type (xkb_type).
  • Generated characters are defined using Unicode (UXXXX and 0x100XXXX formats are supported), character map or using keysym.
  • There are a lot of characters in Unicode and this application aims to be able to display them all correctly. Choose which font you want to be used in the virtual keyboard. When font does not support displayed character, application tries to detect it and select an alternative.
  • You can choose how the model of the keyboard is displayed. Select desired appearance of the keyboard or create and use your own. Keyboard model is described using simple JSON file – see an example of a 104-key ANSI keyboard.
  • Editor is not dependent on any specific GUI environment. It does not matter whether you use KDE, GNOME, Xfce or anything else.
  • Application can be used on any platform that supports Java 8 and JavaFX. If you are not using XKB, you can still work with the application and generate a symbol file (although you will not be able to use the file itself to change your keyboard mapping).

Creating new XKB variants using the editor

Working with XKB variants is not supported by the editor for now. Exported configuration is xkb_symbols "basic". However, you can define your variant in different group and set export settings so that you export only current group without type - this way you get only symbols definitions for the current group. You can then use the definition however you like (e.g. define your own custom XKB variant).

License

Keyboard layout editor is MIT licensed (see LICENSE file).

About

Keyboard layout editor for XKB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published