Class KeyboardRemapperAugmentation


  • public class KeyboardRemapperAugmentation
    extends java.lang.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
     
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      int[]getSendKeys()
      Gets the send keys for all the augmentation keys assigned on a particular key.
      intmapToSendKey​(boolean isShift, boolean isControl, boolean isAlt)
      Maps augmentation keys to a send key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyboardRemapperAugmentation

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

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

      • 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