public void mirrorKeys() {
    /* how to mirror?
    width = 55
    [0..15] [20..35] [40..55]
    phase 1: multiple by -1
    [0] [-20] [-40]
    phase 2: add keyboard width
    [55] [35] [15]
    phase 3: subtracting the key's width
    [40] [20] [0]
    cool?
     */
    final int keyboardWidth = getMinWidth();
    for (Key k : getKeys()) {
      var newX = -1 * k.x; // phase 1
      newX += keyboardWidth; // phase 2
      newX -= k.width; // phase 3
      k.x = newX;
    }
  }
@Test
  public void testKeyboardPopupSupportsMirrorMultipleFullRows() throws Exception {
    String popupCharacters = "qwertasdfg";
    // asdfg
    // qwert
    AnyPopupKeyboard keyboard =
        new AnyPopupKeyboard(
            new DefaultAddOn(getApplicationContext(), getApplicationContext()),
            getApplicationContext(),
            popupCharacters,
            SIMPLE_KeyboardDimens,
            "POP_KEYBOARD");
    int vGap = (int) SIMPLE_KeyboardDimens.getRowVerticalGap();
    int keyHeight = (int) SIMPLE_KeyboardDimens.getNormalKeyHeight();
    int hGap = (int) SIMPLE_KeyboardDimens.getKeyHorizontalGap();
    final int keyWidth =
        (int)
                (SIMPLE_KeyboardDimens.getKeyboardMaxWidth()
                    - SIMPLE_KeyboardDimens.getKeyHorizontalGap() * popupCharacters.length())
            / 10;

    Assert.assertEquals(10, keyboard.getKeys().size());
    assertKeyValues(keyboard, 'q', vGap + keyHeight + vGap, 0);
    assertKeyValues(keyboard, 'w', vGap + keyHeight + vGap, keyWidth);
    assertKeyValues(keyboard, 'e', vGap + keyHeight + vGap, hGap + 2 * keyWidth);
    assertKeyValues(keyboard, 'r', vGap + keyHeight + vGap, 2 * hGap + 3 * keyWidth);
    assertKeyValues(keyboard, 't', vGap + keyHeight + vGap, 3 * hGap + 4 * keyWidth);
    assertKeyValues(keyboard, 'a', vGap, 0);
    assertKeyValues(keyboard, 's', vGap, keyWidth);
    assertKeyValues(keyboard, 'd', vGap, hGap + 2 * keyWidth);
    assertKeyValues(keyboard, 'f', vGap, 2 * hGap + 3 * keyWidth);
    assertKeyValues(keyboard, 'g', vGap, 3 * hGap + 4 * keyWidth);

    keyboard.mirrorKeys();
    // same order, mirrored X position
    Assert.assertEquals(10, keyboard.getKeys().size());
    assertKeyValues(keyboard, 'q', vGap + keyHeight + vGap, 5 * hGap + 4 * keyWidth);
    assertKeyValues(keyboard, 'w', vGap + keyHeight + vGap, 4 * hGap + 3 * keyWidth);
    assertKeyValues(keyboard, 'e', vGap + keyHeight + vGap, 3 * hGap + 2 * keyWidth);
    assertKeyValues(keyboard, 'r', vGap + keyHeight + vGap, 2 * hGap + keyWidth);
    assertKeyValues(keyboard, 't', vGap + keyHeight + vGap, hGap);
    assertKeyValues(keyboard, 'a', vGap, 5 * hGap + 4 * keyWidth);
    assertKeyValues(keyboard, 's', vGap, 4 * hGap + 3 * keyWidth);
    assertKeyValues(keyboard, 'd', vGap, 3 * hGap + 2 * keyWidth);
    assertKeyValues(keyboard, 'f', vGap, 2 * hGap + keyWidth);
    assertKeyValues(keyboard, 'g', vGap, hGap);
  }