School of Science and Technology 科技學院
Computing Programmes 電腦學系

JavaKey: A Java Programming Keyboard

Peter Wai Chuen CHEUNG, Allan Yu Hin LAM

Programme Bachelor of Computing with Honours in Internet Technology
Supervisor Dr. Kelvin LEE
Areas E-learning
Year of Completion 2019

Objectives

Recently, many programmers have used mobile devices, such as smartphone and tablet, to code since IDE (Integrated Development Environment) is available in Android devices, and coding on mobile devices is more convenient while programmers working in the outdoors. However, when using mobile IDEs in Android devices to write apps, the speed of typing will be slower than coding on the computer. Moreover, because of the limited screen size in devices, it also easily leads to typos, causing user typing with slow speed.

This project aims to provide a new keyboard interface for programmers who write Android apps and programs in Android devices in order to achieve a coding speed that is similar to using a traditional hardware keyboard.

To achieve the aim, the main objective is to provide a new keyboard interface for Java, C, and Python programmers to work more convenient

The project has defined a number of sub-objectives as follows:

  • Design a new keyboard layout of four different buttons and combines them into one face for Java programmers who use IDEs in Android devices.
  • Design an Auto-Prediction of program keywords.
  • Design a new layout which only consists of common methods in computer programming.
  • Design a new programming language library to replace the default library.

Video Demonstration

Background and Methodology

Techniques and technologies used

N-gram Language Model

N-gram Language Model has dealt with the problem of Auto-Prediction. Based on users' input, Auto-Prediction will predict what programming keywords that users are going to write.

T-9 Keyboard

In order to help Java programmers achieve a coding speed as fast as the coding speed of programmers using hardware keyboards, the project has applied T-9 Keyboard which is an approach to design each key combing with three characters.

KeyboardView

Associated with T-9 Keyboard, KeyboardView helps design a desktop-like QWERTY keyboard, in which each key consists of three to four characters.

System architecture

Figure 1: The data flow between the components

Text Predictive System will match user inputs to the corresponding keywords.

The user input is actually a series of numbers. Then, pre-processing will convert each of the numbers to the corresponding letters. Before starting the search, a dictionary including common programming keywords is required and is loaded into the system for searching the possible results.

Figure 2: JavaKey’s keyboard layout

Figure 3: Pre-set programming methods

Figure 4: A user searching for programming keywords

The system will return the possible results while users typing on the keyboard. Developers are also able to check out the methods list to see if there are suitable methods. In addition, users are able to manage the programming keywords in the dictionary. Permissions are given to users to add, edit, remove, and retrieve the keywords from the dictionary.

Figure 5: Clearing keyword dictionary

Evaluation

Keyboard TypeTesting Time
Android Traditional KeyboardAround 251 seconds
CodeBoard Keyboard for CodingAround 186 seconds
JavaKey (Our project)Around 102 seconds

Table 1: Average of each keyboard typing time

In the test, JavaKey was a lot faster than Android traditional keyboard around three minutes. Besides, by the same token of Keyboard type, CodeBoard Keyboard for Coding was slower than our project. Therefore, among the selected three existing programming keyboards for smartphones, JavaKey was the fastest.

Conclusion and Future Development

First, newer application should deal with the problem of repeated searching and fixed-length searching engine.

Second, the function of changeable key size should be added since different users might have different finger sizes.

Third, in the future, the project should include the function of uploading the whole dictionary instead of users inputting the programming keywords one by one.

Forth, more common programming languages, such as CSS, HTML, and Kotlin, should be supported in JavaKey.

Finally, in the further version of the application, the keyboard can contain other styles of keyboard interfaces for users to download based on users' preferences.