README.md (1765B)
1 # Keyboard Layout Editor 2 3 PyGTK program that helps create or edit XKB keyboard layouts. Created by [@simos](https://github.com/simos) in Google Summer of Code 2008. [More information](http://simos.info/blog/archives/747/) 4 5  6 7 ## Requirements 8 9 To run the application, you need the python UI binding packages. 10 For Ubuntu 14.04, the packages below are already pre-installed. 11 12 * Cairo 13 * Pango 14 * GObject 15 * lxml 16 17 ## Installation 18 19 Clone the repository with 20 21 ``` 22 $ git clone https://github.com/simos/keyboardlayouteditor.git 23 ``` 24 25 You need to process the ANTLR grammars in order to generate the necessary Python code. 26 This is a process that you do one time only (unless you make changes in the grammar files). 27 28 All *.g files should be processed with ANTLR: 29 30 ``` 31 $ cd keyboardlayouteditor/ 32 $ sudo apt-get install python-pip 33 $ sudo pip install http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.2.tar.gz 34 $ wget http://www.antlr3.org/download/antlr-3.1.2.jar 35 $ java -classpath antlr-3.1.2.jar org.antlr.Tool *.g 36 ``` 37 38 The first command installs the Python 2 package manager. 39 The second command installs the Python 2 Antlr 3.1.2 runtime. 40 The third command downloads the antlr 3.1.2 JAR file (code of Antlr) in the current directory. 41 The antlr3 package in Ubuntu is for Antlr 3.2, but we cannot use it because it is a bit complicated to get a 3.2 python runtime. 42 The fourth command runs the Antlr code on the .g grammar files that exist in the KeyboardLayoutEditor directory. 43 These are four files, and produces the processed grammar. 44 Then, you can start the KeyboardLayoutEditor program. 45 46 ## Running 47 48 You finally run this program with: 49 50 ``` 51 $ ./KeyboardLayoutEditor 52 ```