Index: /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyStroke.java
===================================================================
--- /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyStroke.java	(revision 837)
+++ /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyStroke.java	(revision 838)
@@ -1,46 +1,92 @@
+
 package de.ugoe.cs.tasktree.keyboardmaps;
 
 /**
- * TODO comment
+ * <p>
+ * This class is used to define key strokes.
+ * </p>
  * 
- * @version $Revision: $ $Date: 11.07.2012$
- * @author 2012, last modified by $Author: patrick$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class KeyStroke {
 
-    /** */
+    /**
+     * <p>
+     * Name of the key stroke.
+     * </p>
+     */
     private String keyStrokeName;
 
-    /** */
+    /**
+     * <p>
+     * {@link VirtualKey} associated with the key stroke.
+     * </p>
+     */
     private VirtualKey virtualKey;
 
-    /** */
+    /**
+     * <p>
+     * Defines whether numlock is pressed during the stroke.
+     * </p>
+     */
     private boolean numlock;
 
-    /** */
+    /**
+     * <p>
+     * Defines whether localstate is pressed during the stroke.
+     * </p>
+     */
     private boolean localstate;
 
-    /** */
+    /**
+     * <p>
+     * Defines whether shift is pressed during the stroke.
+     * </p>
+     */
     private boolean shift;
 
-    /** */
+    /**
+     * <p>
+     * Defines whether altgr is pressed during the stroke.
+     * </p>
+     */
     private boolean altgr;
 
-    /** */
+    /**
+     * <p>
+     * Defines whether inhibit is pressed during the stroke.
+     * </p>
+     */
     private boolean inhibit;
 
-    /** */
+    /**
+     * <p>
+     * Defines the character in which the key stroke results.
+     * </p>
+     */
     private char character;
 
     /**
-     * TODO: comment
+     * <p>
+     * Constructor. Creates a new key stroke
+     * </p>
      * 
      * @param keyStrokeName
-     * @param mapKeyIdToVirtualKey
+     *            name of the key stroke
+     * @param virtualKey
+     *            virtual key associated with the key stroke
      * @param numlock
+     *            defines whether numlock is pressed during the key stroke
      * @param localstate
-     * @param b
+     *            defines whether localstate is pressed during the key stroke
+     * @param shift
+     *            defines whether shift is pressed during the key stroke
      * @param altgr
+     *            defines whether altgr is pressed during the key stroke
      * @param inhibit
+     *            defines whether inhibit is pressed during the key stroke
+     * @param character
+     *            defines that character in which the key stroke results
      */
     public KeyStroke(String keyStrokeName,
@@ -64,5 +110,9 @@
 
     /**
-     * @return the keyStrokeName
+     * <p>
+     * Returns the name of the key stroke.
+     * </p>
+     * 
+     * @return the name
      */
     public String getKeyStrokeName() {
@@ -71,7 +121,9 @@
 
     /**
-     * TODO: comment
-     * 
-     * @return
+     * <p>
+     * Returns the virtual key associated with the key stroke.
+     * </p>
+     * 
+     * @return the virtual key
      */
     public VirtualKey getVirtualKey() {
@@ -80,7 +132,9 @@
 
     /**
-     * TODO: comment
-     * 
-     * @return
+     * <p>
+     * Returns the character in which the key stroke results.
+     * </p>
+     * 
+     * @return the character
      */
     public char getCharacter() {
@@ -89,7 +143,9 @@
 
     /**
-     * TODO: comment
-     * 
-     * @return
+     * <p>
+     * Returns whether inhibit is pressed.
+     * </p>
+     * 
+     * @return true if pressed; false otherwise
      */
     public boolean getInhibit() {
@@ -98,7 +154,9 @@
 
     /**
-     * TODO: comment
-     * 
-     * @return
+     * <p>
+     * Returns whether altgr is pressed.
+     * </p>
+     * 
+     * @return true if pressed; false otherwise
      */
     public boolean getAltgr() {
@@ -107,7 +165,9 @@
 
     /**
-     * TODO: comment
-     * 
-     * @return
+     * <p>
+     * Returns whether shift is pressed.
+     * </p>
+     * 
+     * @return true if pressed; false otherwise
      */
     public boolean getShift() {
@@ -116,7 +176,9 @@
 
     /**
-     * TODO: comment
-     * 
-     * @return
+     * <p>
+     * Returns whether localstate is pressed.
+     * </p>
+     * 
+     * @return true if pressed; false otherwise
      */
     public boolean getLocalstate() {
@@ -125,7 +187,9 @@
 
     /**
-     * TODO: comment
-     * 
-     * @return
+     * <p>
+     * Returns whether numlock is pressed.
+     * </p>
+     * 
+     * @return true if pressed; false otherwise
      */
     public boolean getNumlock() {
Index: /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMap.java
===================================================================
--- /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMap.java	(revision 837)
+++ /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMap.java	(revision 838)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.tasktree.keyboardmaps;
 
@@ -16,28 +17,42 @@
 
 /**
- * TODO comment
+ * <p>
+ * Helper class that maps keyboard input based on a key map.
+ * </p>
  * 
- * @version $Revision: $ $Date: 11.07.2012$
- * @author 2012, last modified by $Author: patrick$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class KeyboardMap {
 
-    /** */
+    /**
+     * <p>
+     * Locale used for the mapping.
+     * </p>
+     */
     private Locale locale;
 
-    /** */
+    /**
+     * <p>
+     * Name of the mappings-file.
+     * </p>
+     */
     private String fileName;
 
-    /** */
+    /**
+     * <p>
+     * Map that defines which key strokes define a virtual key.
+     * </p>
+     */
     private Map<VirtualKey, List<KeyStroke>> keyStrokes =
         new HashMap<VirtualKey, List<KeyStroke>>();
 
-    /** TODO: remove this stuff */
-    private List<Object[]> mKeyIds = new ArrayList<Object[]>();
-
     /**
-     * TODO: comment
+     * <p>
+     * Creates a new KeyboardMap.
+     * </p>
      * 
      * @param locale
+     *            Locale that is used for the keyboard map
      */
     KeyboardMap(Locale locale) {
@@ -58,20 +73,26 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Returns a character that is generated, given a {@link VirtualKey} is pressed while the
+     * respective modifiers are active.
+     * </p>
      * 
-     * @param digit1
-     * @param b
-     * @param c
-     * @param d
-     * @param e
-     * @param f
-     * @return
+     * @param key
+     *            key that is pressed
+     * @param numlock
+     *            true, if numlock is pressed; false otherwise
+     * @param shift
+     *            true, if shift is pressed; false otherwise
+     * @param altgr
+     *            true, if altgr is pressed; false otherwise
+     * @param inhibit
+     *            true, if inhibit is pressed; false otherwise
+     * @return generated character
      */
     public char getCharacterFor(VirtualKey key,
-                                boolean    numlock,
-                                boolean    shift,
-                                boolean    altgr,
-                                boolean    inhibit)
-        throws IllegalArgumentException
+                                boolean numlock,
+                                boolean shift,
+                                boolean altgr,
+                                boolean inhibit)
     {
         List<KeyStroke> candidates = keyStrokes.get(key);
@@ -104,6 +125,10 @@
 
     /**
-     * TODO: comment
      * 
+     * <p>
+     * Initializes the keyboard map.
+     * </p>
+     * 
+     * @throws IllegalArgumentException thrown if there is a problem loading the keyboard map
      */
     void init() throws IllegalArgumentException {
@@ -115,24 +140,23 @@
 
         Console.traceln(Level.FINER, "read " + keyStrokes.size() + " key strokes and " +
-                        deadKeySequences.size() + " dead key sequences");
+            deadKeySequences.size() + " dead key sequences");
 
         VirtualKeySynonyms virtualKeySynonyms = determineVirtualKeySynonyms(keyStrokes);
         processKeyStrokes(keyStrokes, virtualKeySynonyms);
-        processDeadKeySequences(deadKeySequences);
-
-        for (Object[] keyId : mKeyIds) {
-            System.out.println(Integer.toHexString((Integer) keyId[0]) + "  " + keyId[1]);
-        }
+        // TODO still required? processDeadKeySequences(deadKeySequences);
     }
 
     /**
-     * TODO: comment
+     * <p>
+     * Returns a {@link InputStream} for a given filename.
+     * </p>
      * 
-     * @param fileName
-     * @return
+     * @param name
+     *            the filename
+     * @return the {@link InputStream}
      */
     private InputStream getStream(String name) {
-        Console.traceln
-          (Level.FINER, "reading keymap for locale " + locale + " from resource keymaps/" + name);
+        Console.traceln(Level.FINER, "reading keymap for locale " + locale +
+            " from resource keymaps/" + name);
 
         InputStream stream =
@@ -147,14 +171,20 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Reads a keyboard map from a input stream.
+     * </p>
      * 
      * @param stream
-     * @param virtualKeySynonyms
+     *            input stream with the keyboard map
      * @param deadKeySequences
+     *            the dead key sequences
+     * @param keyStrokes
+     *            the keystrokes
+     * @throws IllegalArgumentException
+     *             thrown if there is an error reading the keyboard map
      */
-    private void readStream(InputStream    stream,
+    private void readStream(InputStream stream,
                             List<String[]> deadKeySequences,
-                            List<String[]> keyStrokes)
-        throws IllegalArgumentException
+                            List<String[]> keyStrokes) throws IllegalArgumentException
     {
         BufferedReader in = null;
@@ -164,6 +194,6 @@
         catch (UnsupportedEncodingException e) {
             Console.traceln(Level.WARNING, "no keyboard map available for locale " + locale);
-            throw new IllegalArgumentException
-                ("provided stream can not be read due to invalid encoding", e);
+            throw new IllegalArgumentException("provided stream can not be read due to invalid encoding",
+                                               e);
         }
 
@@ -185,6 +215,6 @@
             }
             catch (IOException e) {
-                Console.traceln
-                    (Level.WARNING, "could not close input stream for reading keyboard map");
+                Console.traceln(Level.WARNING,
+                                "could not close input stream for reading keyboard map");
             }
         }
@@ -192,12 +222,16 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Processes a line of a keyboard map file.
+     * </p>
      * 
      * @param line
+     *            the line in the keyboard map file
      * @param deadKeySequences
+     *            the dead key sequences
+     * @param keyStrokes
+     *            the keystrokes
      */
-    private void processLine(String         line,
-                             List<String[]> deadKeySequences,
-                             List<String[]> keyStrokes)
+    private void processLine(String line, List<String[]> deadKeySequences, List<String[]> keyStrokes)
     {
         String[] values = line.split(" ");
@@ -251,8 +285,11 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Determines synonyms for virtual keys for the keyboard map.
+     * </p>
      * 
      * @param keyStrokes
-     * @return
+     *            the keystrokes
+     * @return the synonyms
      */
     private VirtualKeySynonyms determineVirtualKeySynonyms(List<String[]> keyStrokes) {
@@ -291,8 +328,11 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Converts a hexadecimal Id that is contained in a string into the integer Id of the key.
+     * </p>
      * 
-     * @param string
-     * @return
+     * @param keyIdString
+     *            the Id string
+     * @return the Id as integer
      */
     private int getKeyId(String keyIdString) {
@@ -305,8 +345,12 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Processes a list of key strokes.
+     * </p>
      * 
      * @param keyStrokes
+     *            the key strokes
      * @param virtualKeySynonyms
+     *            synonyms of the involved virtual keys
      */
     private void processKeyStrokes(List<String[]> keyStrokes, VirtualKeySynonyms virtualKeySynonyms)
@@ -320,7 +364,12 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Handles a key stroke.
+     * </p>
      * 
      * @param values
+     *            contains the name, string Id, and modifiers of the key stroke
+     * @param virtualKeySynonyms
+     *            synonyms of the involved virtual keys
      */
     private void handleKeyStroke(String[] values, VirtualKeySynonyms virtualKeySynonyms) {
@@ -379,23 +428,35 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Adds a key stroke and all synonyms to the keyboard map.
+     * </p>
      * 
      * @param keyStrokeName
+     *            name of the key stroke
      * @param keyId
+     *            id of the key stroke
      * @param numlock
+     *            true, if numlock is pressed; false otherwise
      * @param localstate
+     *            true, if localstate is pressed; false otherwise
      * @param shift
+     *            true, if shift is pressed; false otherwise
      * @param altgr
+     *            true, if altgr is pressed; false otherwise
      * @param addupper
+     *            true, if addupper is pressed; false otherwise
      * @param inhibit
+     *            true, if inhibit is pressed; false otherwise
+     * @param virtualKeySynonyms
+     *            synonyms of the involved virtual keys
      */
-    private void addAllRepresentedKeyStrokes(String             keyStrokeName,
-                                             int                keyId,
-                                             boolean            numlock,
-                                             boolean            localstate,
-                                             boolean            shift,
-                                             boolean            altgr,
-                                             boolean            addupper,
-                                             boolean            inhibit,
+    private void addAllRepresentedKeyStrokes(String keyStrokeName,
+                                             int keyId,
+                                             boolean numlock,
+                                             boolean localstate,
+                                             boolean shift,
+                                             boolean altgr,
+                                             boolean addupper,
+                                             boolean inhibit,
                                              VirtualKeySynonyms virtualKeySynonyms)
     {
@@ -404,7 +465,5 @@
         if (virtualKeys == null) {
             Console.traceln(Level.SEVERE, "no virtual key mapped to key stroke " + keyStrokeName +
-                            " of keyboard map for locale " + locale);
-            // throw new IllegalArgumentException("no keyboard map available for locale " +
-            // mLocale);
+                " of keyboard map for locale " + locale);
             return;
         }
@@ -413,15 +472,15 @@
             if (addupper) {
                 char c = determineCharacter(keyStrokeName, true);
-                addKeyStroke
-                  (keyStrokeName, virtualKey, numlock, localstate, true, altgr, inhibit, c);
+                addKeyStroke(keyStrokeName, virtualKey, numlock, localstate, true, altgr, inhibit,
+                             c);
 
                 c = determineCharacter(keyStrokeName, false);
-                addKeyStroke
-                  (keyStrokeName, virtualKey, numlock, localstate, false, altgr, inhibit, c);
+                addKeyStroke(keyStrokeName, virtualKey, numlock, localstate, false, altgr, inhibit,
+                             c);
             }
             else {
                 char c = determineCharacter(keyStrokeName, false);
-                addKeyStroke
-                  (keyStrokeName, virtualKey, numlock, localstate, shift, altgr, inhibit, c);
+                addKeyStroke(keyStrokeName, virtualKey, numlock, localstate, shift, altgr, inhibit,
+                             c);
             }
         }
@@ -429,19 +488,39 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Adds a key stroke and to the keyboard map.
+     * </p>
      * 
-     * @param keyStroke
+     * @param keyStrokeName
+     *            name of the key stroke
+     * @param virtualKey
+     *            the associated virtual key
+     * @param numlock
+     *            true, if numlock is pressed; false otherwise
+     * @param localstate
+     *            true, if localstate is pressed; false otherwise
+     * @param shift
+     *            true, if shift is pressed; false otherwise
+     * @param altgr
+     *            true, if altgr is pressed; false otherwise
+     * @param addupper
+     *            true, if addupper is pressed; false otherwise
+     * @param inhibit
+     *            true, if inhibit is pressed; false otherwise
+     * @param character
+     *            the resulting character
      */
-    private void addKeyStroke(String     keyStrokeName,
+    private void addKeyStroke(String keyStrokeName,
                               VirtualKey virtualKey,
-                              boolean    numlock,
-                              boolean    localstate,
-                              boolean    shift,
-                              boolean    altgr,
-                              boolean    inhibit,
-                              char       character)
+                              boolean numlock,
+                              boolean localstate,
+                              boolean shift,
+                              boolean altgr,
+                              boolean inhibit,
+                              char character)
     {
-        KeyStroke keyStroke = new KeyStroke
-            (keyStrokeName, virtualKey, numlock, localstate, shift, altgr, inhibit, character);
+        KeyStroke keyStroke =
+            new KeyStroke(keyStrokeName, virtualKey, numlock, localstate, shift, altgr, inhibit,
+                          character);
 
         List<KeyStroke> keyStrokeList = keyStrokes.get(keyStroke.getVirtualKey());
@@ -456,6 +535,7 @@
 
     /**
-     * TODO: comment
-     * 
+     * <p>
+     * Adds key strokes independent of numlock.
+     * </p>
      */
     private void addKeyStrokesIndependentOfNumLock() {
@@ -492,19 +572,11 @@
 
     /**
-     * TODO: comment
-     * 
-     * @param deadKeySequences
-     */
-    private void processDeadKeySequences(List<String[]> deadKeySequences) {
-        // TODO Auto-generated method stub
-        // System.out.println("PATRICK: KeyboardMap.processDeadKeySequences ");
-    }
-
-    /**
-     * TODO: comment
+     * <p>
+     * Determines a {@link VirtualKey} depending on a key stroke name
+     * </p>
      * 
      * @param keyStrokeName
-     * @param shift
-     * @return
+     *            name of the key stroke
+     * @return related virtual key
      */
     private VirtualKey determineVirtualKey(String keyStrokeName) {
@@ -1021,5 +1093,5 @@
         else {
             Console.traceln(Level.FINEST, "unknown virtual key for key stroke " + keyStrokeName +
-                            " specified through " + "keyboard map for locale " + locale);
+                " specified through " + "keyboard map for locale " + locale);
 
             return null;
@@ -1053,9 +1125,11 @@
 
     /**
-     * TODO: comment
-     * 
-     * @param keyStrokeName
-     * @param shift
-     * @return
+     * <p>
+     * Determines the character that is generated by a key stroke.
+     * </p>
+     *
+     * @param keyStrokeName name of the key stroke
+     * @param getUpper defines whether the upper case version of the key stroke is returned or not
+     * @return the character
      */
     private char determineCharacter(String keyStrokeName, boolean getUpper) {
@@ -2042,114 +2116,3 @@
         }
     }
-
-    /**
-     * this is a former implementation
-     * 
-     * @param keyId
-     * @return
-     */
-    /*
-     * private VirtualKey[] mapKeyIdToVirtualKeys(int keyId, String keyStrokeName) {
-     * 
-     * Set<String> names = null;
-     * 
-     * for (int i = 0; i < mKeyIds.size(); i++) { if (((Integer) mKeyIds.get(i)[0]) == keyId) {
-     * names = (Set<String>) mKeyIds.get(i)[1]; break; } }
-     * 
-     * if (names == null) { names = new HashSet<String>(); boolean added = false;
-     * 
-     * for (int i = 0; i < mKeyIds.size(); i++) { if (((Integer) mKeyIds.get(i)[0]) > keyId) {
-     * mKeyIds.add(i, new Object[] { keyId, names }); added = true; break; } }
-     * 
-     * if (!added) { mKeyIds.add(new Object[] { keyId, names }); } }
-     * 
-     * names.add(keyStrokeName);
-     * 
-     * 
-     * switch(keyId) { case 0x36: case 0x2a: return new VirtualKey[] { VirtualKey.SHIFT }; case
-     * 0xb8: return new VirtualKey[] { VirtualKey.ALT_GRAPH }; case 0x38: return new VirtualKey[] {
-     * VirtualKey.ALT }; case 0x9d: case 0x1d: return new VirtualKey[] { VirtualKey.CONTROL }; case
-     * 0xdd: return new VirtualKey[] { VirtualKey.WINDOWS }; case 0x2: return new VirtualKey[] {
-     * VirtualKey.DIGIT_1 }; case 0x3: return new VirtualKey[] { VirtualKey.DIGIT_2 }; case 0x4:
-     * return new VirtualKey[] { VirtualKey.DIGIT_3 }; case 0x5: return new VirtualKey[] {
-     * VirtualKey.DIGIT_4 }; case 0x6: return new VirtualKey[] { VirtualKey.DIGIT_5 }; case 0x7:
-     * return new VirtualKey[] { VirtualKey.DIGIT_6 }; case 0x8: return new VirtualKey[] {
-     * VirtualKey.DIGIT_7 }; case 0x9: return new VirtualKey[] { VirtualKey.DIGIT_8 }; case 0xa:
-     * return new VirtualKey[] { VirtualKey.DIGIT_9 }; case 0xb: return new VirtualKey[] {
-     * VirtualKey.DIGIT_0 }; case 0xe: return new VirtualKey[] { VirtualKey.BACK_SPACE }; case 0xf:
-     * return new VirtualKey[] { VirtualKey.TAB }; case 0x10: return new VirtualKey[] {
-     * VirtualKey.LETTER_Q }; case 0x11: return new VirtualKey[] { VirtualKey.LETTER_W }; case 0x12:
-     * return new VirtualKey[] { VirtualKey.LETTER_E }; case 0x13: return new VirtualKey[] {
-     * VirtualKey.LETTER_R }; case 0x14: return new VirtualKey[] { VirtualKey.LETTER_T }; case 0x15:
-     * return new VirtualKey[] { VirtualKey.LETTER_Y }; case 0x16: return new VirtualKey[] {
-     * VirtualKey.LETTER_U }; case 0x17: return new VirtualKey[] { VirtualKey.LETTER_I }; case 0x18:
-     * return new VirtualKey[] { VirtualKey.LETTER_O }; case 0x19: return new VirtualKey[] {
-     * VirtualKey.LETTER_P }; case 0x1e: return new VirtualKey[] { VirtualKey.LETTER_A }; case 0x1f:
-     * return new VirtualKey[] { VirtualKey.LETTER_S }; case 0x20: return new VirtualKey[] {
-     * VirtualKey.LETTER_D }; case 0x21: return new VirtualKey[] { VirtualKey.LETTER_F }; case 0x22:
-     * return new VirtualKey[] { VirtualKey.LETTER_G }; case 0x23: return new VirtualKey[] {
-     * VirtualKey.LETTER_H }; case 0x24: return new VirtualKey[] { VirtualKey.LETTER_J }; case 0x25:
-     * return new VirtualKey[] { VirtualKey.LETTER_K }; case 0x26: return new VirtualKey[] {
-     * VirtualKey.LETTER_L }; case 0x1c: return new VirtualKey[] { VirtualKey.ENTER }; case 0x2c:
-     * return new VirtualKey[] { VirtualKey.LETTER_Z }; case 0x2d: return new VirtualKey[] {
-     * VirtualKey.LETTER_X }; case 0x2e: return new VirtualKey[] { VirtualKey.LETTER_C }; case 0x2f:
-     * return new VirtualKey[] { VirtualKey.LETTER_V }; case 0x30: return new VirtualKey[] {
-     * VirtualKey.LETTER_B }; case 0x31: return new VirtualKey[] { VirtualKey.LETTER_N }; case 0x32:
-     * return new VirtualKey[] { VirtualKey.LETTER_M }; case 0x39: return new VirtualKey[] {
-     * VirtualKey.SPACE }; case 0x56: return new VirtualKey[] { VirtualKey.LESS }; case 0x1: return
-     * new VirtualKey[] { VirtualKey.ESCAPE }; case 0x3b: return new VirtualKey[] { VirtualKey.F1 };
-     * case 0x3c: return new VirtualKey[] { VirtualKey.F2 }; case 0x3d: return new VirtualKey[] {
-     * VirtualKey.F3 }; case 0x3e: return new VirtualKey[] { VirtualKey.F4 }; case 0x3f: return new
-     * VirtualKey[] { VirtualKey.F5 }; case 0x40: return new VirtualKey[] { VirtualKey.F6 }; case
-     * 0x41: return new VirtualKey[] { VirtualKey.F7 }; case 0x42: return new VirtualKey[] {
-     * VirtualKey.F8 }; case 0x43: return new VirtualKey[] { VirtualKey.F9 }; case 0x44: return new
-     * VirtualKey[] { VirtualKey.F10 }; case 0x57: return new VirtualKey[] { VirtualKey.F11 }; case
-     * 0x58: return new VirtualKey[] { VirtualKey.F12 }; case 0xb7: return new VirtualKey[] {
-     * VirtualKey.PRINTSCREEN }; case 0x46: return new VirtualKey[] { VirtualKey.SCROLL_LOCK }; case
-     * 0xd2: return new VirtualKey[] { VirtualKey.INSERT }; case 0xd3: return new VirtualKey[] {
-     * VirtualKey.DELETE }; case 0xc7: return new VirtualKey[] { VirtualKey.HOME }; case 0xcf:
-     * return new VirtualKey[] { VirtualKey.END }; case 0xc9: return new VirtualKey[] {
-     * VirtualKey.PAGE_UP }; case 0xd1: return new VirtualKey[] { VirtualKey.PAGE_DOWN }; case 0xcb:
-     * return new VirtualKey[] { VirtualKey.LEFT }; case 0xc8: return new VirtualKey[] {
-     * VirtualKey.UP }; case 0xd0: return new VirtualKey[] { VirtualKey.DOWN }; case 0xcd: return
-     * new VirtualKey[] { VirtualKey.RIGHT }; case 0x45: return new VirtualKey[] {
-     * VirtualKey.NUM_LOCK }; case 0xb5: return new VirtualKey[] { VirtualKey.DIVIDE }; case 0x37:
-     * return new VirtualKey[] { VirtualKey.MULTIPLY }; case 0x4a: return new VirtualKey[] {
-     * VirtualKey.SUBTRACT }; case 0x4e: return new VirtualKey[] { VirtualKey.ADD }; case 0x9c:
-     * return new VirtualKey[] { VirtualKey.ENTER }; case 0x53: return new VirtualKey[] {
-     * VirtualKey.DECIMAL, VirtualKey.DELETE }; case 0x52: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_0, VirtualKey.INSERT }; case 0x4f: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_1, VirtualKey.END }; case 0x50: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_2, VirtualKey.KP_DOWN }; case 0x51: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_3, VirtualKey.PAGE_UP }; case 0x4b: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_4, VirtualKey.KP_LEFT }; case 0x4c: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_5, VirtualKey.BEGIN }; case 0x4d: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_6, VirtualKey.KP_RIGHT }; case 0x47: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_7, VirtualKey.HOME }; case 0x48: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_8, VirtualKey.KP_UP }; case 0x49: return new VirtualKey[] {
-     * VirtualKey.NUMPAD_9, VirtualKey.PAGE_DOWN }; case 0x0: return new VirtualKey[] {
-     * VirtualKey.CAPS_LOCK }; case 0xc: return new VirtualKey[] { VirtualKey.MINUS,
-     * VirtualKey.UNDERSCORE }; case 0xd: return new VirtualKey[] { VirtualKey.EQUALS,
-     * VirtualKey.PLUS }; case 0x1a: return new VirtualKey[] { VirtualKey.OPEN_BRACKET,
-     * VirtualKey.BRACELEFT }; case 0x1b: return new VirtualKey[] { VirtualKey.CLOSE_BRACKET,
-     * VirtualKey.BRACERIGHT }; case 0x27: return new VirtualKey[] { VirtualKey.SEMICOLON,
-     * VirtualKey.COLON }; /* case 0x28: return new VirtualKey[] { VirtualKey.APOSTROPHE,
-     * VirtualKey.QUOTEDBL }; case 0x29: return new VirtualKey[] { VirtualKey.DEAD_GRAVE,
-     * VirtualKey.DEAD_TILDE }; case 0x2b: return new VirtualKey[] { VirtualKey.BACK_SLASH,
-     * VirtualKey.BAR }; case 0x33: return new VirtualKey[] { VirtualKey.COMMA, VirtualKey.LESS };
-     * case 0x34: return new VirtualKey[] { VirtualKey.PERIOD, VirtualKey.GREATER }; case 0x35:
-     * return new VirtualKey[] { VirtualKey.SLASH, VirtualKey.QUESTIONMARK }; case 0x73: return new
-     * VirtualKey[] { VirtualKey.BACK_SLASH, VirtualKey.DEGREE, VirtualKey.QUESTIONMARK,
-     * VirtualKey.UNDERSCORE }; case 0x7d: return new VirtualKey[] { VirtualKey.BAR }; case 0x79:
-     * return new VirtualKey[] { VirtualKey.HENKAN_MODE }; case 0x70: return new VirtualKey[] {
-     * VirtualKey.KATAKANA }; case 0x7b: return new VirtualKey[] { VirtualKey.MUHENKAN }; case 0x3a:
-     * return new VirtualKey[] { VirtualKey.EISU_TOGGLE, VirtualKey.CAPS_LOCK }; case 0xdc: return
-     * new VirtualKey[] { VirtualKey.F13 }; case 0xf2: return new VirtualKey[] { VirtualKey.HANGUL
-     * }; case 0xf1: return new VirtualKey[] { VirtualKey.HANGUL_HANJA }; case 0x54: return new
-     * VirtualKey[] { VirtualKey.EXECUTE }; default: LOG.severe("unknown key id 0x" +
-     * Integer.toHexString(keyId) + " specified for key stroke " + keyStrokeName +
-     * " through keyboard map for locale " + mLocale); throw new
-     * IllegalArgumentException("no keyboard map available for locale " + mLocale); } }
-     */
-
 }
Index: /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMapFactory.java
===================================================================
--- /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMapFactory.java	(revision 837)
+++ /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/KeyboardMapFactory.java	(revision 838)
@@ -4,22 +4,28 @@
 
 /**
- * TODO comment
+ * <p>
+ * Creates keyboard maps.
+ * </p>
  * 
- * @version $Revision: $ $Date: 11.07.2012$
- * @author 2012, last modified by $Author: patrick$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public class KeyboardMapFactory {
 
     /**
-     * TODO: comment
-     * 
+     * <p>
+     * Constructor. Private to prevent initialization of this class.
+     * </p>
      */
     private KeyboardMapFactory() {
-        // TODO Auto-generated constructor stub
     }
 
     /**
-     * TODO: comment
-     * 
+     * <p>
+     * Returns a {@link KeyboardMap} for the given {@link Locale}.
+     * </p>
+     *
+     * @param locale the locale
+     * @return the keyboard map
      */
     public static KeyboardMap createKeyboardMap(Locale locale) {
Index: /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKey.java
===================================================================
--- /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKey.java	(revision 837)
+++ /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKey.java	(revision 838)
@@ -4,8 +4,10 @@
 
 /**
- * TODO comment
+ * <p>
+ * Enumeration of virtual keys.
+ * </p>
  * 
- * @version $Revision: $ $Date: 01.04.2012$
- * @author 2012, last modified by $Author: patrick$
+ * @version 1.0
+ * @author Patrick Harms
  */
 public enum VirtualKey {
@@ -233,13 +235,26 @@
      */
 
-    /** the virtual key code of the virtual key. */
+    /**
+     * <p>
+     * Virtual key code of the virtual key.
+     * </p>
+     */
     private int virtualKeyCode = -1;
 
-    /** the description of the virtual key */
+    /**
+     * <p>
+     * Description of the virtual key.
+     * </p>
+     */
     private String description;
 
     /**
-   *
-   */
+     * <p>
+     * Constructor. Creates a new VirtualKey.
+     * </p>
+     * 
+     * @param virtualKeyCode
+     *            key code of the virtual key
+     */
     private VirtualKey(int virtualKeyCode) {
         this.virtualKeyCode = virtualKeyCode;
@@ -248,5 +263,9 @@
 
     /**
-     * @return Returns the description.
+     * <p>
+     * Returns the description of the virtual key.
+     * </p>
+     * 
+     * @return the description.
      */
     String getDescription() {
@@ -255,6 +274,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the key is a combination key (e.g., shift, alt) or not.
+     * </p>
+     * 
+     * @return true, if the key is a combiniation key; false otherwise
+     */
     public boolean isCombinationKey() {
         switch (this)
@@ -273,6 +296,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the key is a lock key (e.g., caps lock, num lock) or not.
+     * </p>
+     * 
+     * @return true, if the key is a lock key; false otherwise
+     */
     public boolean isLockKey() {
         switch (this)
@@ -289,6 +316,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the key is shift.
+     * </p>
+     * 
+     * @return true, if the key is shift; false otherwise
+     */
     public boolean isShiftKey() {
         switch (this)
@@ -303,6 +334,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the is an alt key.
+     * </p>
+     * 
+     * @return true, if the key is alt or altgr; false otherwise
+     */
     public boolean isAltKey() {
         switch (this)
@@ -318,6 +353,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the key is control.
+     * </p>
+     * 
+     * @return true, if the key is control; false otherwise
+     */
     public boolean isControlKey() {
         switch (this)
@@ -332,6 +371,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the key is the windows key.
+     * </p>
+     * 
+     * @return true, if the key is the windows key; false otherwise
+     */
     public boolean isWindowsKey() {
         switch (this)
@@ -346,6 +389,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the key is the meta key.
+     * </p>
+     * 
+     * @return true, if the key is the meta key; false otherwise
+     */
     public boolean isMetaKey() {
         switch (this)
@@ -360,6 +407,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the key is a letter.
+     * </p>
+     * 
+     * @return true, if the key is a letter; false otherwise
+     */
     public boolean isLetter() {
         if (virtualKeyCode > -1) {
@@ -372,6 +423,10 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether the key is a digit.
+     * </p>
+     * 
+     * @return true, if the key is a digit; false otherwise
+     */
     public boolean isDigit() {
         if (virtualKeyCode > -1) {
@@ -384,8 +439,13 @@
 
     /**
-     * TODO: comment
-     * 
-     * @param parameter
-     * @return
+     * <p>
+     * Parses an {@link String} and returns the respective VirtualKey if possible.
+     * </p>
+     * 
+     * @param numberString
+     *            String representation of the virtual key
+     * @return created VirtualKey
+     * @throws IllegalArgumentException
+     *             thrown if there is no VirtualKey that correlates to string
      */
     public static VirtualKey parseVirtualKey(String string) {
@@ -401,6 +461,14 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns the VirtualKey associated with an integer.
+     * </p>
+     * 
+     * @param number
+     *            integer to which the according VirtualKey is returned
+     * @return the VirtualKey
+     * @throws IllegalArgumentException
+     *             thrown if there is no VirtualKey that correlates to number
+     */
     public static VirtualKey valueOf(int number) {
         for (VirtualKey virtualKey : VirtualKey.values()) {
Index: /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKeySynonyms.java
===================================================================
--- /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKeySynonyms.java	(revision 837)
+++ /trunk/quest-misc/src/main/java/de/ugoe/cs/tasktree/keyboardmaps/VirtualKeySynonyms.java	(revision 838)
@@ -1,2 +1,3 @@
+
 package de.ugoe.cs.tasktree.keyboardmaps;
 
@@ -10,22 +11,36 @@
 
 /**
- * TODO comment
+ * <p>
+ * Helper class to handle synonymous {@link VirtualKey}s.
+ * </p>
  * 
- * @version $Revision: $ $Date: 12.07.2012$
- * @author 2012, last modified by $Author: pharms$
+ * @version 1.0
+ * @author Patrick Harms
  */
 class VirtualKeySynonyms {
-    
-    /** */
+
+    /**
+     * <p>
+     * Map of synonymous keys.
+     * </p>
+     */
     private Map<Integer, List<VirtualKey>> synonyms = new HashMap<Integer, List<VirtualKey>>();
 
-    /** */
+    /**
+     * <p>
+     * Mapping of {@link VirtualKey}s to integer Ids.
+     * </p>
+     */
     private Map<VirtualKey, Integer> keyIds = new HashMap<VirtualKey, Integer>();
 
     /**
-     * TODO: comment
+     * <p>
+     * Adds a new synonymous key.
+     * </p>
      * 
      * @param keyId
+     *            id of the synonym
      * @param virtualKey
+     *            the synonym
      */
     public void add(int keyId, VirtualKey virtualKey) {
@@ -46,6 +61,6 @@
         if ((existingKeyId != null) && (existingKeyId != keyId)) {
             Console.traceln(Level.FINEST, "virtual key " + virtualKey + " is mapped to more " +
-                            "than one key id (current is " + existingKeyId + ", new is " + keyId +
-                            "). New key id will be used (" + keyId + ").");
+                "than one key id (current is " + existingKeyId + ", new is " + keyId +
+                "). New key id will be used (" + keyId + ").");
         }
 
@@ -54,6 +69,12 @@
 
     /**
-   *
-   */
+     * <p>
+     * Returns whether a key is contained in the set of synonyms.
+     * </p>
+     * 
+     * @param keyId
+     *            id of the key
+     * @return true, if the key is contained; false otherwise
+     */
     public boolean containsKey(int keyId) {
         return synonyms.containsKey(keyId);
@@ -61,8 +82,11 @@
 
     /**
-     * TODO: comment
+     * <p>
+     * Returns all synonyms known for a given key.
+     * </p>
      * 
      * @param keyId
-     * @return
+     *            the id of the key
+     * @return the synonyms
      */
     public VirtualKey[] getVirtualKeySynonyms(int keyId) {
