1) How to use VirtualKeyboard
Read: German(Deutsch)
Read: Russian(Русский)
Read: English:
1) To use virtual keyboard please download and add VirtualKeyboard.jar to your project.
2) Add import to your java class.
| #!/usr/bin/java
# package your.package;
#
# import virtualkeyboard.gui.DialogVirtualKeyboardReal;
|
3) Add ActionListener to your GUIComponent extended from JTextComponent.
Default: JTextField, JTextArea, JPasswordField, JEditorPane, JFormatedTextField, ...
| #!/usr/bin/java
# JTextComponent.addActionListener(new java.awt.event.ActionListener() {
# public void actionPerformed(java.awt.event.ActionEvent evt) {
# DialogVirtualKeyboardReal dlg =
# new DialogVirtualKeyboardReal(this, false, jFormattedTextField);
# dlg.setPoitToUp(jCheckBoxAutoUp.isSelected());
# dlg.setShiftBs(jCheckBoxShiftBs.isSelected());
# dlg.setLocaleL(Locale.getDefault());
# }
# });
|
2) How to add new language layout to VirtualKeyboard
1) To add new layout to the VirtualKeyboard, create Java properties file.
Give name for the properties file in this form: Keyboard_fr.properties (fr for french).
(Best practise: copy existing file and rename it)
2) Modify the properties file, for you individual keyboard layout.
Small excerpt of property file:
| #!/usr/bin/java
# filename: Keyboard_fr.properties
#
# #ROW2*********************************************************************
# jBR2B1=Tab
# jBR2B2=q
# jBR2B3=w
# jBR2B4=e
# jBR2B5=r
# jBR2B6=t
# ... // Other keys
|
3) Add your layout to Keyboard_lang.properties
| #!/usr/bin/java
# filename: Keyboard_fr.properties
#
# ru=ru
# de=de
# en=en
# fr=fr // Added layout
|
Project Admins: