Class KeyboardRemapperAugmentation

java.lang.Object
com.iizix.term.KeyboardRemapperAugmentation

public class KeyboardRemapperAugmentation extends Object
The key augmentation maps a key with the shift, control and alt keys to a particular send key. The augmentations are:
  - Shift=0, Control=0, Alt=0: No augmentation
  - Shift=1, Control=0, Alt=0: Shift
  - Shift=0, Control=1, Alt=0: Control
  - Shift=1, Control=1, Alt=0: Shift+Control
  - Shift=0, Control=0, Alt=1: Alt
  - Shift=1, Control=0, Alt=1: Shift+Alt
  - Shift=0, Control=1, Alt=1: Control+Alt
  - Shift=1, Control=1, Alt=1: Shift+Control+Alt
 
  • Constructor Details

    • KeyboardRemapperAugmentation

      public KeyboardRemapperAugmentation(XFile file) throws IOException
      Loads the definition of the augmentation array from the file.
      Throws:
      IOException - when a file error occurs.
    • KeyboardRemapperAugmentation

      public KeyboardRemapperAugmentation(int[] augmentations)
      Creates a definition of the augmentation array.
  • Method Details

    • mapToSendKey

      public int mapToSendKey(boolean isShift, boolean isControl, boolean isAlt)
      Maps augmentation keys to a send key.
    • getSendKeys

      public final int[] getSendKeys()
      Gets the send keys for all the augmentation keys assigned on a particular key.

      The augmentation keys table:

        0 - Shift=0, Control=0, Alt=0: No augmentation
        1 - Shift=1, Control=0, Alt=0: Shift
        2 - Shift=0, Control=1, Alt=0: Control
        3 - Shift=1, Control=1, Alt=0: Shift+Control
        4 - Shift=0, Control=0, Alt=1: Alt
        5 - Shift=1, Control=0, Alt=1: Shift+Alt
        6 - Shift=0, Control=1, Alt=1: Control+Alt
        7 - Shift=1, Control=1, Alt=1: Shift+Control+Alt