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.

Jonathan Chiu
Marketing Director
3DP Technology Limited

Jonathan handles all external affairs include business development, patents write up and public relations. He is frequently interviewed by media and is considered a pioneer in 3D printing products.

Krutz Cheuk
Biomedical Engineer
Hong Kong Sanatorium & Hospital

After graduating from OUHK, Krutz obtained an M.Sc. in Engineering Management from CityU. He is now completing his second master degree, M.Sc. in Biomedical Engineering, at CUHK. Krutz has a wide range of working experience. He has been with Siemens, VTech, and PCCW.

Hugo Leung
Software and Hardware Engineer
Innovation Team Company Limited

Hugo Leung Wai-yin, who graduated from his four-year programme in 2015, won the Best Paper Award for his ‘intelligent pill-dispenser’ design at the Institute of Electrical and Electronics Engineering’s International Conference on Consumer Electronics – China 2015.

The pill-dispenser alerts patients via sound and LED flashes to pre-set dosage and time intervals. Unlike units currently on the market, Hugo’s design connects to any mobile phone globally. In explaining how it works, he said: ‘There are three layers in the portable pillbox. The lowest level is a controller with various devices which can be connected to mobile phones in remote locations. Patients are alerted by a sound alarm and flashes. Should they fail to follow their prescribed regime, data can be sent via SMS to relatives and friends for follow up.’ The pill-dispenser has four medicine slots, plus a back-up with a LED alert, topped by a 500ml water bottle. It took Hugo three months of research and coding to complete his design, but he feels it was worth all his time and effort.

Hugo’s public examination results were disappointing and he was at a loss about his future before enrolling at the OUHK, which he now realizes was a major turning point in his life. He is grateful for the OUHK’s learning environment, its industry links and the positive guidance and encouragement from his teachers. The University is now exploring the commercial potential of his design with a pharmaceutical company. He hopes that this will benefit the elderly and chronically ill, as well as the society at large.

Soon after completing his studies, Hugo joined an automation technology company as an assistant engineer. He is responsible for the design and development of automation devices. The target is to minimize human labor and increase the quality of products. He is developing products which are used in various sections, including healthcare, manufacturing and consumer electronics.

Course Code Title Credits
  COMP S321F Advanced Database and Data Warehousing 5
  COMP S333F Advanced Programming and AI Algorithms 5
  COMP S351F Software Project Management 5
  COMP S362F Concurrent and Network Programming 5
  COMP S363F Distributed Systems and Parallel Computing 5
  COMP S382F Data Mining and Analytics 5
  COMP S390F Creative Programming for Games 5
  COMP S492F Machine Learning 5
  ELEC S305F Computer Networking 5
  ELEC S348F IOT Security 5
  ELEC S371F Digital Forensics 5
  ELEC S431F Blockchain Technologies 5
  ELEC S425F Computer and Network Security 5
 Course CodeTitleCredits
 ELEC S201FBasic Electronics5
 IT S290FHuman Computer Interaction & User Experience Design5
 STAT S251FStatistical Data Analysis5
 Course CodeTitleCredits
 COMPS333FAdvanced Programming and AI Algorithms5
 COMPS362FConcurrent and Network Programming5
 COMPS363FDistributed Systems and Parallel Computing5
 COMPS380FWeb Applications: Design and Development5
 COMPS381FServer-side Technologies and Cloud Computing5
 COMPS382FData Mining and Analytics5
 COMPS390FCreative Programming for Games5
 COMPS413FApplication Design and Development for Mobile Devices5
 COMPS492FMachine Learning5
 ELECS305FComputer Networking5
 ELECS363FAdvanced Computer Design5
 ELECS425FComputer and Network Security5