## org.gjt.sp.jedit.gui
Class DefaultInputHandler

    java.lang.Object
      org.gjt.sp.jedit.input.AbstractInputHandler<EditAction>
          org.gjt.sp.jedit.gui.InputHandler
              org.gjt.sp.jedit.gui.DefaultInputHandler

    public class DefaultInputHandler

extends InputHandler

The default input handler. It maps sequences of keystrokes into actions and inserts key typed events into the text area.

Field Summary

Fields inherited from class org.gjt.sp.jedit.gui.InputHandler
`view`

Fields inherited from class org.gjt.sp.jedit.input.AbstractInputHandler
`bindings, currentBindings, keyEventInterceptor, lastAction, lastActionCount, PREFIX_STR, readNextChar, REPEAT_COUNT_THRESHOLD, repeatCount, shortcutOn`

Constructor Summary
`DefaultInputHandler(View view)` Creates a new input handler with no key bindings defined.
`DefaultInputHandler(View view, DefaultInputHandler copy)` Creates a new input handler with the same set of key bindings as the one specified.
`DefaultInputHandler(View view, java.util.Hashtable bindings)` Creates a new input handler with no key bindings defined.

Method Summary
`static java.lang.String` `getModifierString(java.awt.event.InputEvent evt)` Returns a string containing symbolic modifier names set in the specified event.
`static char` `getSymbolicModifierName(int mod)` Returns a the symbolic modifier name for the specified Java modifier flag.
`boolean` `handleKey(KeyEventTranslator.Key keyStroke, boolean dryRun)` Handles the given keystroke.
`boolean` `isPrefixActive()` Returns if a prefix key has been pressed.
`void` `setCurrentBindings(java.util.Hashtable bindings)`

Methods inherited from class org.gjt.sp.jedit.gui.InputHandler
`getLastAction, getRepeatCount, handleKey, invokeAction, invokeAction, invokeLastAction, invokeReadNextChar, processKeyEvent, readNextChar, setRepeatCount, userInput`

Methods inherited from class org.gjt.sp.jedit.input.AbstractInputHandler
`addKeyBinding, addKeyBinding, addKeyBinding, getKeyBinding, getKeyEventInterceptor, getLastActionCount, processKeyEventKeyStrokeHandling, removeAllKeyBindings, removeKeyBinding, resetLastActionCount, sendShortcutPrefixOff, setBindings, setKeyEventInterceptor, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultInputHandler

    public DefaultInputHandler(View view,
                               java.util.Hashtable bindings)

  Creates a new input handler with no key bindings defined.

  Parameters:
    `view` - The view
    `bindings` - An explicitly-specified set of key bindings, must not be null.
  Since:
    jEdit 4.3pre1

### DefaultInputHandler

    public DefaultInputHandler(View view)

  Creates a new input handler with no key bindings defined.

  Parameters:
    `view` - The view

### DefaultInputHandler

    public DefaultInputHandler(View view,
                               DefaultInputHandler copy)

  Creates a new input handler with the same set of key bindings as the one specified. Note that both input handlers share a pointer to exactly the same key binding table; so adding a key binding in one will also add it to the other.

  Parameters:
    `copy` - The input handler to copy key bindings from
    `view` - The view

Method Detail

### isPrefixActive

    public boolean isPrefixActive()

  Returns if a prefix key has been pressed.

  Overrides:
    `isPrefixActive` in class `AbstractInputHandler<EditAction>`

### setCurrentBindings

    public void setCurrentBindings(java.util.Hashtable bindings)

  Overrides:
    `setCurrentBindings` in class `AbstractInputHandler<EditAction>`

### handleKey

    public boolean handleKey(KeyEventTranslator.Key keyStroke,
                             boolean dryRun)

  Handles the given keystroke.

  Specified by:
    `handleKey` in class `AbstractInputHandler<EditAction>`
  Parameters:
    `keyStroke` - The key stroke
    `dryRun` - only calculate the return value, do not have any other effect
  Returns:
    true if the input could be handled.
  Since:
    jEdit 4.2pre5

### getSymbolicModifierName

    public static char getSymbolicModifierName(int mod)

  Returns a the symbolic modifier name for the specified Java modifier flag.

  Parameters:
    `mod` - A modifier constant from `InputEvent`
  Since:
    jEdit 4.1pre3

### getModifierString

    public static java.lang.String getModifierString(java.awt.event.InputEvent evt)

  Returns a string containing symbolic modifier names set in the specified event.

  Parameters:
    `evt` - The event
  Since:
    jEdit 4.1pre3