SourceForge.net Logo
VietKeyInput    Java & .NET Class Library for Vietnamese Text Input

An open-source class library, available in both Java JAR and .NET Managed DLL formats, is supplied to application developers for integration with their programs to provide Vietnamese text input capability to standard text components. It requires only a few lines of code to incorporate the functionality. Support for editable combobox is also included.

Java:

     import net.sourceforge.vietpad.inputmethod.*;
     ...
     JTextComponent textComp = new JTextArea();
     VietKeyListener keyLst = new VietKeyListener(textComp);
     textComp.addKeyListener(keyLst);
     VietKeyListener.setInputMethod(InputMethods.Telex);
     VietKeyListener.setVietModeEnabled(true);
     VietKeyListener.setSmartMark(true);
     JComboBox comboBox = new JComboBox();
     comboBox.setEditable(true);
     keyLst = new VietKeyListener(comboBox);

Make sure the JAR is in your program classpath.

.NET:

     using Net.SourceForge.Vietpad.InputMethod;
     ...
     TextBoxBase textComp = new TextBox();
     VietKeyHandler keyHandler = new VietKeyHandler(textComp);
     textComp.KeyPress += new KeyPressEventHandler(keyHandler.OnKeyPress);
     VietKeyHandler.InputMethod = InputMethods.Telex;
     VietKeyHandler.VietModeEnabled = true;
     VietKeyHandler.SmartMark = true;
     ComboBox comboBox = new ComboBox();
     comboBox.KeyPress += new KeyPressEventHandler(new VietKeyHandler(comboBox).OnKeyPress);

You will need to add in your program a reference to the managed DLL.

The API documentation is listed at http://vietpad.sourceforge.net/doc/index.html. An example application of the library can be found in VietPad.