ListTextKeys

JTextArea component = new JTextArea();
Keymap map = component.getKeymap();

while (map != null) {
    KeyStroke[] keys = map.getBoundKeyStrokes();

    for (int i=0; i<keys.length; i++) {
        // This method is defined in Converting a KeyStroke to a String
        String keystrokeStr =  keyStroke2String(keys[i]);
        // Get the action name bound to this keystroke
        Action action = (Action)map.getAction(keys[i]);
    }

    // The default action is invoked if a character is typed
    // and no key binding exists in the component's InputMap or Keymap.
    Action defAction = map.getDefaultAction();

    // Process all parent keymaps as well
    map = map.getResolveParent();
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.