Class InputBehavior

    • Constructor Detail

      • InputBehavior

        public InputBehavior​(KeyType[] keyCombo,
                             EventType eventType)
      • InputBehavior

        public InputBehavior​(KeyType[] keyCombo)
        if using auto hook be sure to add this behavior last, otherwise it might not pickup the event.. Also it will only hook up to the last event if more are present (use other constructor to specify manually) Note on keyCombo The shortcut keys should be specified in this format ... Modifier[+Modifier..]+Key Meaning that you should specify in this order, modifier keys first like 'ctrl' and then normal keys like 'a'
        Parameters:
        keyCombo -
    • Method Detail

      • getEscapedComponentMarkupId

        protected final String getEscapedComponentMarkupId()
        Gets the escaped DOM id that the input will get attached to. All non word characters (\W) will be removed from the string.
        Returns:
        The DOM id of the input - same as the component's markup id}
      • getDisable_in_input

        protected Boolean getDisable_in_input()
        If this is set to true, keyboard capture will be disabled in input and textarea fields. If these elements have focus, the keyboard shortcut will not work. This is very useful for single key shortcuts. Default: false
        Returns:
      • getType

        protected KeyHookOn getType()
        The event type - can be 'keydown','keyup','keypress'. Default: 'keydown'
        Returns:
      • getPropagate

        protected Boolean getPropagate()
        Should the command be passed onto the browser afterwards?
        Returns:
      • getTarget

        protected String getTarget()
        target - DOM Node The element that should be watched for the keyboard event. Default : document
        Returns: